User Profile

Collapse

Profile Sidebar

Collapse
Vivekneo
Vivekneo
Last Activity: May 30 '12, 02:03 PM
Joined: Sep 20 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Atli,
    the above code generates random value after every page refresh, how do i correct the code so that the addition happens once 24hrs, and i am okay to save the value into the file.

    Please advice.
    See more | Go to post

    Leave a comment:


  • Hello Atli,
    Thank you for your reply, is their any other way then using files, also the value stored into the file is over written very time.

    I am fare new to files and php, yet i will try to run your solution.
    See more | Go to post

    Leave a comment:


  • Add random number per day to an amount which never go less than its previous value.

    Hello,

    I am trying to make a fake product sales value counter, which will update it self to certain amount not more than $100 per day i.e in 24hrs.

    To make this even simple here an Ex:
    Code:
    <?php
    	$amt = 100000;
    	srand(floor(time() / (60*60*24)));
    	$total = $amt + rand() % 100;
    	echo "$". $total ."/-";
    	$amt = $total;
    ?>
    How ever the...
    See more | Go to post

  • Vivekneo
    started a topic How do i consolidate jQuery repetitive code

    How do i consolidate jQuery repetitive code

    Hi,
    I have a series of textbox wired up with jQuery Autocomplete feature, there are 12 textbox in total.

    is thr any way to avoid repetitive code,
    Any help, i will be very thankful.

    Code:
    $('#prod_rate_0').val("");
    			$('#vat_0').val("");
    			
    			$('#prod_rate_1').val("");
    			$('#vat_1').val("");
    			
    			$('#prod_rate_2').val("");
    ...
    See more | Go to post

  • Vivekneo
    started a topic php mysql WHERE clause Syntax error
    in PHP

    php mysql WHERE clause Syntax error

    Hi, iam trying to insert values in the child table, with condition that both pk and fk should match,
    pk = stud_id and fk dstud_id.
    here is what iam trying
    Code:
    include('config.php'); 
    if (isset($_GET['stud_id']) ) { 
    $id = (int) $_GET['stud_id']; 
    if (isset($_POST['submitted'])) { 
    
    foreach($_POST AS $key => $value) { $_POST[$key] = mysql_real_escape_string($value); } 
    
    $sql
    ...
    See more | Go to post

  • Hi,

    sorry was moved on different form,

    can i add db id value to the reg code generated
    ex : "1ANK07DIP1 A" to "1ANK07DIP1 A1"
    See more | Go to post

    Leave a comment:


  • Hi, i tried both the above solutions - 1) to change the alternate row bg color & 2) serial number,

    doesn't work,
    can anybody please look into this here is my updated code
    Code:
    <style type="text/css">
    table.tbg {
    	text-align:center;
    }
    </style>
    <? 
    include('config.php');
    
    echo "<a href='Student Details Form.php'>New Record</a>";
    ...
    See more | Go to post

    Leave a comment:


  • Thank you boss,

    well i have one more question, how do i display Sl No., right now as you can see i am using the following code to display Serial Number - 'stud_id'
    Code:
    echo "<td><b>Sl No.</b></td>";
    corresponding to
    Code:
    echo "<td valign='top'>" . nl2br( $row['stud_id']) . "</td>";
    the stud_id value changes if i delete...
    See more | Go to post

    Leave a comment:


  • Mysql data display in a HTML Table layout, with alt row bg color Using php

    Hi, iam trying to display student names along with their course selected and status of their selection, from mysql db, the result has to be in tabular format, with alternate row bg color, here is my code, please help me out...
    Please share a complete code, i will be very thankful
    Code:
    <? 
    include('config.php');
    
    echo "<a href='Student Details Form.php'>New Record</a>";
    ...
    See more | Go to post

  • Hi Atli,

    Sorry for my late reply, i was trying the following code,
    i have a radio button group, for status, if status==0 student is selected, if status == 1, student is rejected,
    Code:
    <? 
    include('config.php'); 
    if (isset($_POST['submitted'])) { 
    foreach($_POST AS $key => $value) { $_POST[$key] = mysql_real_escape_string($value); } 
    $sql = "INSERT INTO `cjet`.`student_details` (`stud_name`,`stud_address`,`stud_father_name`,
    ...
    See more | Go to post

    Leave a comment:


  • Hi Atli,

    Yes students_detail s table is the main table, and course_details is the child table linking stud_id from the main table.

    mean while i read about a function, but don't how to use it, any code example wold greatly help me.
    Code:
    mysql.insert_id();
    See more | Go to post

    Leave a comment:


  • Vivekneo
    started a topic Multiple partial insert into two related tables

    Multiple partial insert into two related tables

    Hi this my second request at bytes,

    i am having a db with two tables,
    table1 - has the details of student, stud_id as primary key set to auto increment, stud_name and other details

    table2 - has the details of courses applied by each individual students, stud_id as foreign key and course_id as primary key

    any help, i will be very thankful,

    i need to create php mysql quires
    ...
    See more | Go to post

  • Hi Ramanan,

    is there any way to add id number or some thing at the end of the textbox value generated.

    ex : "1ANK07DIP1 A" to "1ANK07DIP1A000 1"

    and auto increment the value every time it goes to database.
    See more | Go to post

    Leave a comment:


  • Thank you very much,

    i admit to my mistake, had placed it in the wrong place, i know this is a silly issue to fix, i am learning a lot from my mistakes :)
    See more | Go to post

    Leave a comment:


  • Hi Ramanan,

    Got partial success,
    1. for place if i select the default value "Select Place" is selected by the function, is their any way to validate so the only respective code values is setected
      Ex:
      Code:
      <option value="1ANK">Ankola</option>
      1ANK

      i think this is causing to select the default value.
      Code:
      if(selObj1.selectedIndex>0)

    1. i ma still not able to set
    ...
    See more | Go to post

    Leave a comment:


  • Hi Ramanan,

    thank you very much for your quick response, i greatly appreciate, i will try this, and let you know about the success.

    Thank you again.
    See more | Go to post

    Leave a comment:


  • hello sir,

    I have tried this logic, but still i am not able to add(concat) 3 different values from the 3 different dropdown values, and display them in a readonly text box or label.

    thank you every much for your time, pls can you try and help me in the above problem.
    See more | Go to post

    Leave a comment:


  • Vivekneo
    started a topic Populate textbox value with option value

    Populate textbox value with option value

    Hi
    I am very new to web programming, trying to achieve a task, I have a form with 3 dropdown box and a text field(which is readonly).
    My problem now is, after selecting the above 3 dropdown boxes, its values should be populated at the text box value, Ex

    dropdown value 01 = Place (1MUM)
    dropdown value 02 = Year (10)
    dropdown value 03 = Course (MCA)

    text value = Place+Year+Cour se
    ...
    See more | Go to post
No activity results to display
Show More
Working...