passing form information.
| From: | Payne | Date: | Thu, 02 Oct 2003 18:08:10 +0000 |
| Subject: | passing form information. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-164792@lists.php.net to get a copy of this message | ||
Hi,
I am working a form to pass information from it to mysql data. I am able to connect to the database. But nothing is being pass from the form to the php page. This is my php code...
---------------------form.html----------------------------------------------------
<html>
<head>
<title>Untitled</title>
</style>
</head>
<body>
<form name="form1" method="post" action="addlead.php">
<input name="title" type="text" size="40">
<input name="f_name" type="text" size="40">
<input name="l_name" type="text" size="40">
<input type="submit" name="Submit" value="Submit Information">
</form>
</body>
</html>
--------------------------addleads.php------------------------------------------
<?
include("./config.php");
$sql = "INSERT INTO $table_name
(leads_id, title, f_name, l_name)
VALUES
('$leads_id', \"$title\", \"$f_name\", \"$l_name\")";
//debug toolprint $sql; $result = mysql_query($sql, $connection) or die ("Couldn't execute query."); ?> <html> <head> <title>Untitled</title> </style> </head> <body> <? echo $title ?> <br> <? echo $f_name ?> <br> <? echo $l_name> ----------------------------------------------------------------------------------- What I am getting this.... INSERT INTO leads (leads_id, title, f_name, l_name) VALUES ('', "", "", "") *Salutation* *First Name* *Last Name* As you can see nothing is being pass...is there some other command beside the print $sql statement to see why nothing is being passed. Thanks.