Shike
Ok, when i use a php script to add rows to my database table it doesn't take the script from the form.
my form is Here. Any help would be great.
| Code: |
|
<?php $name = $_POST['name']; $school = $_POST['school']; $subschool = $_POST['subschool']; $descriptor = $_POST['descriptor']; $caster = $_POST['caster']; $components = $_POST['components']; $time = $_POST['casttime']; $range = $_POST['range1']; $target = $_POST['target']; $save = $_POST['save']; $sr = $_POST['resistance']; $desc = $_POST['description']; $src = $_POST['source']; $conn = mysql_connect("localhost", "shike_spells", "jebu019"); mysql_select_db("shike_spells",$conn); $sql = "INSERT INTO dnd values ( '', '$name', '$school', '$subschool', '$descriptor', '$caster', '$components', '$time', '$range', '$target', '$save', '$sr', '$desc', '$src' )"; if (mysql_query($sql, $conn)) { echo "<h4 align=\"center\">Spell Added!</h4><br /><p align=\"center\"><a href=\"dndspells.html\" target=\"_self\">Add Another Spell</a>"; } else { echo "<h4 align=\"center\">Something went wrong<br />Couldn't add Spell.</h4><br /><p align=\"center\"><a href=\"dndspells.html\" target=\"_self\">Try Again?</a>"; } ?> |
my form is Here. Any help would be great.
