MYSQL Ver. 3.23.32 PHP Ver. 4.0 Apache Ver. 1.3.14 on LocalHost.
When I submit my html page it goes to the php page with a blank screen. No error messages. I took the code from CHINNI_77 from a posting on 02/13/2003. I had it working this am until I went to show a friend and we messed with it and now (duhh) it isn't working again. I'm sure you you noticed I am a newbie.
Here is the code for the html:
<html>
<form method="post" action="updatedb.php">
First name:<input type="Text" name="cust_fname"><br>
Last name:<input type="Text" name="cust_lname"><br>
Address:<input type="Text" name="cust_addr1"><br>
City:<input type="Text" name="cust_city"><br>
State:<input type="Text" name="cust_st"><br>
<input type="submit" name="submit" value=" Enter information"></form>
</html>
and here is the code for the file updatedb.php:
<HTML>
<?php
if($submit)
{
$db = mysql_connect("localhost", "root","");
mysql_select_db("test",$db) or die ("counld not open db");
$sql = "INSERT INTO customer (
cust_fname,
cust_lname,
cust_addr1,
cust_city,
cust_st) VALUES
('$cust_fname',
'$cust_lname',
'$cust_addr1',
'$cust_city',
'$cust_st')";
$result =(mysql_query($sql) or die (mysql_error());
echo "Thank you! Information entered.\n";
}
?>
</HTML>
Like I said this was working this am until I messed around with it again. Global Variables set to on. I hope this shows up in colored PHP tags
I would appreciate any help.
Thanks.