Hi, I have recently just started learning about MYSQL/PHP and I need some guidance. I have created a form, so that once a user submits the form the data is stored on a MYSQL database. My form submits an event. When the user submits a new event through my form, I want a separate web page to be created for each new form entry. How do I go about doing this? Hopefully this makes sense. Thanks, Cain
I don't see the use of creating a separate web page for each event , instead you should create a php page that will read an event from the database. For example , event.php?id=1 will show the info for the event that has the id = 1. Example code : <?php $db = mysql_connect("host","username","password"); mysql_select_db("database_name",$db); $result = mysql_query("SELECT * FROM events_table WHERE id = '".$_GET['id']."' LIMIT 1"); if(mysql_num_rows($result) == 1) { $row = mysql_fetch_array($result); //echo the info you need for that event : echo $row['name'] etc. } ?> PHP: Don't forget to sanitize the data read from outside the file ($_GET,$_POST) before querying mysql ( look here PHP MySQL Class , concentrate on the cleanQuery($input) function.