Jump to content

PHP form not working


vnichol

Recommended Posts

I know this is very simple, but... Any way here is the code for my form, but it doesn't post to my database and there are no errors shown. Any ideas?

 

thanks

 

 

 

<?

include("include/session.php");?>

<? include('include/headder_login.php'); ?>

 

<h1>Event Information : <? echo $session->username; ?></h1>

<form> 

<form action="protimes.php" method="post" name="event information">

<input name="id" type="text" value="">

<input name="name" type="number" value="name" size="30">

<select name="event">

<option value="1">50 Front</option>

<option value="2">50 Back</option>

<option value="3">100 Front</option>

</select>

<input name="time" type="time" value"time" >

<input name="date" type="date" value="date">

<input name="submit" type="button" value="submit" align="right">

<input type="reset" name="reset" value="reset"aligh="right">

</form>

 

protimes.php file

 

 

$sql="INSERT INTO  `cbcrusta_test3`.`info` (

`id` ,

`name` ,

`event` ,

`time` ,

`date`

)

VALUES ('$_POST[id]','$_POST[name]','$_POST[event]','$_POST[time]','$_POST[date')";

 

 

 

if (!mysql_query($sql))

  {

  die('Error: ' . mysql_error());

  }

echo "1 record added";

 

Link to comment
Share on other sites

this is still not working, but I am guessing that as well as the phrase error, there must be errors created by the includes

 

 

<?

include("include/session.php"); // keeps track of login

include('include/headder_login.php'); ?>// gives page menu

 

because the form doesn't even seem to get to the protimes page which should do the processing of the post data. If you have any other ideas thank you very much, if not I will keep looking.... again thanks for the help.

 

vincent.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.