Page 1 of 1

Simple Attendee list!!! PLEASE HELP!!!

Posted: Fri Nov 14, 2008 11:51 am
by headshot?
Okay, here's the problem. I'm a freshman in college trying to make a site for my LAN events for my team. But I need to make an attendee list. I'm being plane jane right now because I only want it to work before I go buy my domain name. And before you reply to this, YES it is currently hosted on a php and mysql server.

okay, I have a link to a register page which has this code:

<body>

<form name=”attendeename" method=”post” id=”attendeename”>
<p> Name: <input type=”text” name=”name” />
</form>


<form action="attendies.php" method="post">
I am attending with: <br />
<input type="radio" name="System"
value="PC" /> PC
<br />
<input type="radio" name="System"
value="Console" /> Console
<br />
<input type="radio" name="System"
value="Both" /> Both PC & Console
<br />
<input type="submit" value="Submit" />
</form>

FOLLOWING on my attendees.php is:

<?php
$name = $_POST['name'];
$system = $_POST['System'];

echo "$name" "$system";

?>

PLEASE HELP IF YOU CAN!?!?!?! :banghead:

Re: Simple Attendee list!!! PLEASE HELP!!!

Posted: Fri Nov 14, 2008 12:12 pm
by chopsmith
I'm not exactly sure what you are trying to do, but I do see a few problems.

First, you should not have two forms here. Combine them into one form, formatting as you see fit:

Code: Select all

 
<form action="attendees.php" method="post">
<p> Name: <input type="text" name="name" />
I am attending with: <br />
<input type="radio" name="System"
value="PC" /> PC
<br />
<input type="radio" name="System"
value="Console" /> Console
<br />
<input type="radio" name="System"
value="Both" /> Both PC & Console
<br />
<input type="submit" value="Submit" />
</form>
 
Second, the action of the form is "attendies.php", whereas the php file is "attendees.php" (according to your post). Spelling error.

Third, your echo statement is wrong. Change it from:

Code: Select all

 
echo "$name" "$system";
 
to:

Code: Select all

 
echo $name . $system;
 
Now, this won't get you a list of attendees. It will only spit out the information provided in the form. To get a list of attendees, you need to store the input from all attendees (preferably in a database), then query it and spit them out.

Hope this helps.

Re: Simple Attendee list!!! PLEASE HELP!!!

Posted: Fri Nov 14, 2008 1:31 pm
by headshot?
Thanks for your help so far.... but I'm not sure how to make a database to pull the information up yet... thanks :banghead:

Re: Simple Attendee list!!! PLEASE HELP!!!

Posted: Sat Nov 15, 2008 11:40 am
by califdon
headshot? wrote:Thanks for your help so far.... but I'm not sure how to make a database to pull the information up yet... thanks :banghead:
You will resolve your problem MUCH faster by reading a couple of short online tutorials. Start with http://w3schools.com. Read them in this order: HTML, PHP, MySQL.