Hi folks
I’ve go a real headache of a problem that i cant understand, i have a username set in a session, which dislpays and works fine, so if they want to signup for a tournement all they have to do is enter there clan name and tourny they want, the only think that isnt working is that the session var isnt going into the database
Heres my signup page
[php]
<?php echo "Welcome $_SESSION[username]" ?>
QUBLan Registration
<?php $username = $_SESSION['username']; $db = mysql_connect("localhost", "root", "xxxxxxx"); mysql_select_db("xxxxxx",$db); ?>Clan: | |
Torunement: |
<?php
|
<input type="submit" name="Submit" value="Submit">
<input name="Reset" type="reset" id="Reset" value="Reset">
[/php]
And heres my Insertpage
[php]
?>
<?php echo "Welcome $_SESSION[username]"; $username = $HTTP_GET_VARS['$username']; $clan=addslashes($HTTP_POST_VARS['clan']); $tourney=addslashes($HTTP_POST_VARS['tourney']); if (!$clan) { echo 'You have not entered all the required details.' .'Please go back and try again.'; exit; } $sql = "Insert INTO tsignup (username, clan, tourney) values ('".$username."', '".$clan."', '".$tourney."')"; $result = mysql_query($sql); ?>
Test
[/php]
All other data is going into the database apart from the username, can someone please help me before i loose my mind
Thank’s In Advance
Dee