Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
dg:greenbox:add [14 Sep 2011 20:33] – james | dg:greenbox:add [14 Sep 2011 21:44] – james |
---|
include("/var/www/html/greenbox/sqlconnect2.php"); | include("/var/www/html/greenbox/sqlconnect2.php"); |
| |
$query = "INSERT INTO Items (Year,Type,Freq,Class,Description,Comments,SAN,Contributor,Email,MoreInfoURL,Cell) | $query = "INSERT INTO Items (Year,Type,Freq,Class,Description,Comments,SAN,Contributor,Email,MoreInfoURL,Cell) |
VALUES | VALUES ('$_POST[Year]','$Type','$Freq','$Class','$Description','$Comments','$SAN','$Contributor','$Email','$MoreInfoURL','$Cell')"; |
('$Year','$Type','$Freq','$Class','$Description','$Comments','$SAN','$Contributor','$Email','$MoreInfoURL','$Cell')"; | |
$result = mysql_query($query) | $result = mysql_query($query) |
or die ("Couldn't execute query."); | or die ("Couldn't execute query."); |
$NameID = mysql_insert_id(); // 46 | </php> |
| |
echo "The following item has been added to the database:<br> | |
<ul> | |
<li>Type: '$Type' | |
<li>Frequency: '$Freq' | |
<li>Class: '$Class' | |
<li><b>'$Description' </b> '$Comments' | |
<li>SAN penalty: '$SAN' | |
<li>Contributed by: '$Contributor' '$Email' | |
<li>More info from: '$MoreInfoURL' | |
<li>Cell '$Cell' available from '$Year' | |
\n"; | |
| |
echo "</ul>"; | |
echo "Add Another Item\n"; | |
| |
</php> | |
<html> | <html> |
| <br> |
<b>Add as much detail as you can in the form below, fields which cannot be blank are indicated with an Asterisk <font color=red>*</font></b> | <b>Add as much detail as you can in the form below, fields which cannot be blank are indicated with an Asterisk <font color=red>*</font></b> |
<form action="/doku.php/dg/greenbox/add" method="post"> | <form action="/doku.php/dg/greenbox/add" method="post"> |