kendallkamikaze Posted March 15, 2009 Share Posted March 15, 2009 The code below is the form you use to register into an 'association', but the issue I am running into is the 'horseid' is not being inserted into mysql...I provided the code you start from, and where it goes...I've been working on it for the last 3 days and cant figure it out <?php $assoname=$_GET['assoname']; $assoid=$_GET['assoid']; $sql="SELECT * FROM horsedata LEFT JOIN registration ON registration.horseid = horsedata.id WHERE Owner='$id' AND ISNULL(registration.assoname) GROUP BY horsedata.id"; $result=mysql_query($sql)or die(mysql_error()); while($r=mysql_fetch_array($result)) { $horseid=$r["id"]; $name=$r["Name"]; $assoid=$_GET['id']; echo "<center> <form action='association_apply.php' method='post'> <input type='hidden' value='$horseid' name='horseid'> <input type='hidden' value='$assoid' name='assoid'> <input type='submit' value='$name'></form> </center> "; } ?> Where its supose to be inserting: <?php include 'header.php'; $sql="INSERT INTO assorequest (horseid, assoid, ownerid) VALUES ('$_POST[horseid]','$_POST[assoid]','$id')"; if (!mysql_query($sql)) { die('You have already submitted a request to this association from this horse'); include 'footer.php'; exit;} echo "<BR><BR><font size='5pt' face='comic sans ms'><B>Registration Request Submitted</b></font><BR><BR>"; ?> <?php include 'footer.php'; ?> Link to comment https://forums.phpfreaks.com/topic/149458-information-not-being-inserted-into-mysql/ Share on other sites More sharing options...
kendallkamikaze Posted March 15, 2009 Author Share Posted March 15, 2009 :/ Link to comment https://forums.phpfreaks.com/topic/149458-information-not-being-inserted-into-mysql/#findComment-784983 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.