Doing something wrong

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have been working on this one page for 2 days now, and can't figure 
out what I am doing. So I thought I would turn to the wise souls here 
in PHP land.  I am building a selection list that uses a sql query to 
build the values.  I then want to pass the selected value back to the 
database. This is a data entry form.  Any help anyone can give me 
would be great.


<html>
<head><title>Technology Education Lesson Plan Database</title><link 
href="/Library/general.css" rel="stylesheet" type="text/css"></head>
<body>
<h1>National Benchmark Entry</h1>
<form action='benchmarkaddnational.php' method='post' name='National 
Benchmarks'>
	<?
	$id = $_REQUEST["rec_id"];
	$name = $_REQUEST["name"];
	$DBconn = mysql_connect("archammer", "DBuser", "password");
	mysql_select_db("tessmerproject", $DBconn) or die(mysql_error
());
		// create the query
		$sql = "select code from tbl_national_goal_seed order 
by code";
		$results = mysql_query($sql, $DBconn);
		print "<select name='code'>";
		while ($row = mysql_fetch_array($results)){
			$code = $row['code'];
		print "<option value='$code'>$code</option>";
	}
	print $code;
	$sql = "INSERT INTO tbl_unit_national (id, name, natcode) 
VALUES ('$id','$name', '$codeselection')";
	$results = mysql_query($sql, $DBconn)
	?>
	<input name="Submit" type="submit" value="Submit">
</form>
</body>
</html>





PHP Data object relational mapping generator
http://www.metastorage.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux