For some reason this is not inserting the information into the database. What am I doing wrong? This is the actual script and Im so clueless.
<?
if($Submit) {
//connecting to database
mysql_connect("localhost","cspot_main","main");
mysql_select_db("cspot_diy");
//Inserting information into database
$result=mysql_query("INSERT INTO list
(name, details, pic1, pic2, pic3, pic4, pic5, pic6, pic7, pic8)".
"VALUES ('$name', '$details', '$pic1', '$pic2', '$pic3', '$pic4', '$pic5', '$pic6', '$pic7', '$pic8')");
echo "$name added";
}
?>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Just enter the
following information and it will save it to a database.<br>
Later I will open it up for everyone once we get enough in the <br>
database. Thanks for helping out.</font></p>
<form name="form1" method="post" action="<? $PHP_SELF; ?>">
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Name of DIY:
<input name="name" type="text" id="name" size="40">
<br>
Steps:<br>
<textarea name="details" cols="50" rows="6" id="details"></textarea>
<br>
Pic 1:
<input name="pic1" type="text" id="pic1" size="65">
<br>
Pic 2:
<input name="pic2" type="text" id="pic2" size="65">
<br>
Pic 3:
<input name="pic3" type="text" id="pic3" size="65">
<br>
Pic 4:
<input name="pic4" type="text" id="pic4" size="65">
<br>
Pic 5:
<input name="pic5" type="text" id="pic5" size="65">
<br>
Pic 6:
<input name="pic6" type="text" id="pic6" size="65">
<br>
Pic 7:
<input name="pic7" type="text" id="pic7" size="65">
<br>
Pic 8:
<input name="pic8" type="text" id="pic8" size="65">
</font></p>
<p> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<input type="submit" name="Submit" value="Add to DIY Database">
<br>
</font></p>
</form>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">How to add a picture?<br>
You need to enter the full HTML for example... say you found a picture and the
URL is "<strong>[url]http://www.civics.com/images/bumperpaint.jpg[/url]</strong>"
or something like that. Well what you need to do is enter this in the text box</font></p>
<p> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<input name="textfield" type="text" value="<img src="[url]http://www.civics.com/images/bumperpaint.jpg">[/url]" size="65">
</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Now if you want
to add a picture and have it uploaded to Civic Spot which I recommend. This
is what you do. Right click the file save it to whatever file name you want.
Let's say the file name is "<strong>paint.gif</strong>" - this is
what you would write in the text box</font></p>
<p> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<input name="textfield2" type="text" value="<img src="[url]http://www.civicspot.com/diy/paint.gif">[/url]" size="65">
</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Make sure to include
the following address above and just put the filename after the url of "<strong>[url]http://www.civicspot.com/diy/[/url]</strong>"</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Any questions email
me at <a href="mailto:info@civicspot.com">info@civicspot.com</a> and I can reply
fast. You don't have to enter all the pictures they are just there if you need
them. Also make sure to use HTML for the steps. If you need to put a break or
a enter line break put this is "<br>" or if you need to start
a new paragraph then put this before you start "<p>" and when
the paragraph ends put in "</p>"</font></p>
<p> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
</font></p>