Hi!
When I use the echo command for every line of html code I have no problem using the mysql_insert' command.. But, when I try to echo as the code below shows, the command itself gets echoed, and not the data is it trying to pull. What am I doing wrong?
Thanks!
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>scheduler added!</title>
</head>
<body>
<?php
$connect= mysql_connect("localhost","*****","*****")
or die("Could not connect to database in localhost !");
$result=mysql_select_db("testdiw")
or die("Could not select that database !");
$joined = date("Y-m-d h:i:s");
$sqlquery = "INSERT INTO testdiw VALUES('','". $diwtitle ."','". $dropdowndeponent ."','". $joined ."')";
$queryresult = mysql_query($sqlquery) or die(" Could not execute mysql query !");
$sqlquery = "SELECT * from testdiw";
echo '<table border=1 align=center width=500>
<tr>
<td > ID Number</td>
<td > mysql_insert_id() // will print the number used in last successful insert
</td >
</tr>
<tr>
<td > DIW Title</td>
<td>' .$diwtitle. '</td>
</tr>
<tr>
<td> Deponent</td>
<td>' .$dropdowndeponent. '</td>
</tr>
<tr>
<td > Timestamp</td>
<td>' .$joined. '</td>
</tr>
</table>';
?>
Add another record <a href="http://localhost/testa1.php">LINK</a>
</body>
</html>