Hello all

I am creating a site for user registration to a class. As classes are added and removed, I have a dynamic table that updates to list the available dates.

$result = mysql_query("SELECT date, time, type FROM class");

while($row = mysql_fetch_array($result)){
	printf("<tr>");
	
        printf("<td><a href = 'registration.html'>%s</a></td> 
		   <td>%s</td>
		   <td>%s</td>", 
		 $row["date"], $row["time"], $row["type"]);

	printf("</tr>");

What I want to do at this point, is have the hyperlink take the user to the registration page, while still being able to reference the date, time, and class type that the user specified - i.e. at the top of the page display Date:
Time:
Class type:
And insert the user information into the right table in the db.

Any help with this would be great,
thanks in advance :)

You could do it all on the same page. Just put an variable in the url to tell whether or not the show the registration form.

I'm not entirely sure that I follow.
Do you mean something like this?

$date = $row["date"];
$time = $row["time"];
$type = $row["type"];

while($row = mysql_fetch_array($result)){
	echo("<tr>");
	printf("<td><a href = 
'registration.html?d=$date&t=$time&tp=$type'>%s</a></td> 
		 <td>%s</td>
		 <td>%s</td>", 
		 $row["date"], $row["time"], $row["type"]);
	
	echo("</tr>");
}

And then I can use a $_GET in the registration page to pull the selected information?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.