I recently went from phpmyadmin 2.6 to 5.1, also installed wamp…I know long time coming.
I have a webform with simple variables and they are no longer inserting into my database
<form method="POST" action="record.php">
td style="width: 472px">
<input type=text name=travel size=40 style="color: black;background-color:#FFFF66; width: 270px;"></td>
</tr>
and the insert php:::
<?
$travel=$_POST['travel'];
$db="xacall";
$link = mysql_connect("localhost", "sql", "sql");
//$link = mysql_connect("localhost",$_POST['username'],$_POST['password']);
if (! $link)
die("Couldn't connect to MySQL");
mysql_select_db($db , $link) or die("Select Error: ".mysql_error());
$result=mysql_query("INSERT INTO ircb (travel) VALUES ('$travel')")or die("Insert Error: ".mysql_error());
//write to file
$fp = fopen("IR_Call_Entries.txt", "a");
fwrite($fp, $_POST['travel'] . "\n" .
close($fp);
?>
I submit , get no error message..but nothing is eneterd and nothing is written…is POST wrong..should I use GET ??? arrgh, confused, thanks
I have also echo’ed the variable and nothing shows
Use the form as:
And also debug the post variable with:
print_r($_POST)I have also used single quotes as much as possible.