The online racing simulator
Team KA
(5 posts, started )
Team KA
Hi all, i know this isn't really an insim thing, but i thought it was the best place to ask


i am looking at create a form for people to put in their infomation so that they can register for upcoming events (like the one used to sign up to this forum, the one that ask username and password and so on)

any idea of how to do it

edit:
the web host offers me database options of
mysql
and
phpmyadmin
Basically, you need to make a HTML output, with a form, the form will include several fields (username,pass and so on).

It will then post the form to post.php - and that script will take those variables, and put it into the database.


Here is a very very simple sample I just made- shoudl work - but not tested it

[html]<html>
<head>
<title>test</title>
</head>
<body>
<form action="post.php" method="post">
lfs user: <input name="lfsuser"><br>
which event: <input name="event"><br>
<input type="submit" value="send">
</form>
</body>
</html>[/html]


<?php 
php
  
// this file needs to be called post.php - if changed, also in above code
 
  
$db=mysql_connect("dbhost""dbuser""dbpass");
  
mysql_select_db("dbname");
 
  
$query='INSERT INTO `event_log` (`lfsuser`, `event`)
          VALUES("'
.addslashes($_POST['lfsuer']).'",
                 "'
.addslashes($_POST['event']).'")';
  
mysql_query($query$db);
  echo 
'Your request has been stored';
?>

Cross site scripting issues there Krammeh.
well of course you would have to include an auth MD5 code, or similar (randomised) or such like.

its just an example.
alright, i think im over my head here, i do most of my webdev in dreamweaver and contribute and im not a very techniclly minded person.

but i shall give it a go and be back

Team KA
(5 posts, started )
FGED GREDG RDFGDR GSFDG