Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
how can i insert my php variables in mysql?..
Old 01-31-2006, 11:01 PM how can i insert my php variables in mysql?..
Novice Talker

Posts: 5
Trades: 0
can anybody help me about this?.
here is my code:

if($submit == clickHere)
{
require_once('applicant.php');

echo"<tr><td align='center'>
<h2>No.
</td>
<td>
<h2>Name
</td>
<td align=center>
<h2>Age
</td>
<td>
<h2>School
</td>
<td colspan='3'>
<h2>Year Level/Grade
</td></tr>";
for($i=1; $i<$noDepend+1; $i++)
{
echo "<tr><td align=center>
<h2>$i
</td>
<td>
<input type=text name=dName[$i] size=26 >
</td>
<td align=left>
<input type=text name=dage[$i] size=2>
</td>
<td>
<input type=text name=dSchool[$i] size=25 >
</td>
<td>
<input type=text name=dYrlevel[$i] size=7 >
</td></tr>";
}
echo"<tr><td>&nbsp;</td></tr>";
}
?>

how can i insert those value in my textboxes?...


ace04 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-03-2006, 03:23 PM
hiptobesquare's Avatar
Extreme Talker

Posts: 186
Location: London UK
Trades: 0
Im not clear on what you mean. but if you want to create a query to insert dage, dschool,etc into a table you need to do something like this:
PHP Code:
for($i=1$i<$noDepend+1$i++) 

$dname='dName[$i]'
$dage='dage[$i]'
$dschool='dSchool[$i]';
$dYrlevel='dYrlevel[$i]'

$insert "INSERT INTO tablename VALUES ('$dage','$dname','$dschool','dyrlevel')";
mysql_query($insert);
mysql_close();

This will create a new row in your database table 'tablename' each time $i increments.

If thats not what you mean then post back with more info on what you want and il have a look for you

Last edited by hiptobesquare; 02-03-2006 at 03:26 PM..
hiptobesquare is offline
Reply With Quote
View Public Profile
 
Old 02-06-2006, 10:16 PM Re: how can i insert my php variables in mysql?..
Novice Talker

Posts: 5
Trades: 0
hi! wanna say thanx 4 ur concern what if i had a code like this....??

<input type=text name=name[0]value="">
<input type=text name=name[1] value="">

<input type=text name=age[0]value="">
<input type=text name=age[1] value="">

how can i insert those in mysql???....
thanx again in advance and god bless....

ace04 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to how can i insert my php variables in mysql?..
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27836 seconds with 12 queries