Jump to content

Pallchrn2

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by Pallchrn2

  1. works thank you erm maybe need a better regex on my js code... any ideas please?
  2. When i echo sql I get INSERT INTO Results (RunnerID, EventID, Date, FinishTime, Position, CategoryID, AgeGrade, PB) VALUES ('1','1','2012-02-31','23:59:00','1','1','34.22','1') but in database still showing 0000-00-00 for date
  3. The database is is using date format and the form is submitted y-m-d, i have echoed the date and it shows correct but not displayed on the MYSQL correctly.
  4. problem showing date posted from a form into MYSQL using the php code. Date shows as 0000-00-00 and not the value submitted from the form. Thank you for any help $sql="INSERT INTO Results (RunnerID, EventID, Date, FinishTime, Position, CategoryID, AgeGrade, PB) VALUES ('$_POST[RunnerID]','$_POST[EventID]','$_POST[Date]','$_POST[FinishTime]','$_POST[Position]','$_POST[CategoryID]','$_POST[AgeGrade]','$_POST[PB]')"; if (!mysql_query($sql,$connection)) { die('Error: ' . mysql_error()); } echo "<h1> Success! Saving data: </h1>"; mysql_close($connection); ?> <html> <head> <title>Submitted</title> </head> <body> <br /> <?php echo "RunnerID=" . $_POST["RunnerID"]; ?><br /> <?php echo "EventID=" . $_POST["EventID"]; ?><br /> <?php echo "Date=" . $_POST["Date"]; ?><br /> <?php echo "FinishTime=" . $_POST["FinishTime"]; ?><br /> <?php echo "Position=" . $_POST["Position"]; ?><br /> <?php echo "CategoryID=" . $_POST["CategoryID"]; ?><br /> <?php echo "AgeGrade=" . $_POST["AgeGrade"]; ?><br /> <?php echo "Personal best=" . $_POST["PB"]; ?><br /> </body> </html>
  5. Sorry forgot to say it has submit button that links to php on server, does it just need to redirect and the php do all the rest (eg query the order and display the page) thanks
  6. I need to use a HTML form to retrieve data in a certain order of ascending/descending using a drop down box and a true/false statement button for one of the values from a MySQL database. Im guessing I need a php script to query the database, but can I add the php code to the HTML or upload a php to the server that links the HTML thank you
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.