7 hours of googling, trial and error, countless forums and the manual - no success.
Can it be done? INSERT INTO 2 tables with one form?
I've got this form:
<form action="save_data.php" method="post">
<input type="hidden" name="id" value="null">
<input type="hidden" name="linkid" value="null">
<table>
<tr><td align="left">Page Title</td>
<td><input type="text" name="linkName"></td>
</tr>
<tr><td align="left">link</td>
<td><input type="text" name="links"></td>
</tr>
</table>
<?php
$oFCKeditor = new FCKeditor('copyOne') ;
$oFCKeditor->BasePath = '/FCKeditor/';
$oFCKeditor->Value = 'Default text in editor';
$oFCKeditor->Create() ;
?>
<br>
<input type="submit" value="Submit">
</form>
linkid, linkName & links should insert to table "links", and
id and copyOne should insert to table "about"
Here is my last attempt at the form handler:
<?
include 'opendb.php';
$sqlquery = "INSERT INTO table (about) VALUES('$id','$copyOne');";
$sqlquery .= "INSERT INTO table (links) VALUES('$linkid','$links','$linkName');";
$results = mysql_query($sqlquery);
mysql_close();
print "<html><body><center>";
print "<p>Success! Here is the information you entered.<p>";
print "Title : $linkName<br>";
print "Link : $links<br>";
print "Article : $copyOne<br>";
print "</body></html>";
?>
The connection is good, I can post to one table at a time.
I really try not to post my trivial problems here, sorry for being such a noob.
TIA to anyone that an help me out
Steve