here are the contents of my timeslipadd.php which is the part that actually adds the timeslip info to the database. The part that i'm trying to get to display the username is "DRIVER"
PHP Code:
<?php
require('./global.php');
include ("mainfile.php");
$index = 1;
global $menu_id,$menu,$Pmenu,$activeusers;
$Pmenu="P_thememenu_homepage";
include("header.php");
?>
<body bgcolor="c9cace" text="000000" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF"><center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#333D4D" width="100%">
<tr>
<td width="100%">
<div align="center">
<center>
</center>
</div>
<div align="center">
<center>
</center>
</div>
<div align="center">
<center>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber4" background="/vbulletin/images/bg.jpg">
<tr>
<td width="100%" align="center" bgcolor="ececec">
<?php
$dbh=mysql_connect ("localhost", "xxxxxxx", "xxxxxxx") or die ('I cannot connect to the database.');
mysql_select_db ("xxxxxxx_forums");
if($submit == "submit")
{
$sql = "INSERT INTO TIMESLIPS (DRIVER,MAKE,MODEL,YEAR,INDUCTION,ET,TRAP,LOCATION)
VALUES ('$DRIVER','$MAKE','$MODEL','$YEAR','$INDUCTION','$ET','$TRAP','$LOCATION')";
$result = mysql_query($sql);
if (!$sql) {
echo mysql_error();
}
echo"<META HTTP-EQUIV='refresh' content='0;URL=http://www.sportcompactracing.com/vbulletin/TIMESLIP.php'>";
}
Else
{
?>
<form method=post action='<?php echo $PHP_SELF?>'>
<p><font color="000000">Driver<br>
<input name="DRIVER" type="text" value="<a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$userid">$bbuserinfo[username]</a>"member.php?s=$session[sessionhash]&action=getinfo&userid=$userid">
<br>
make<br>
<select name="MAKE" size="1" id="MAKE">
<option>Acura</option>
<option>Audi</option>
<option>BMW</option>
<option>Chevrolet</option>
<option>Dodge</option>
<option>Ford</option>
<option>Honda</option>
<option>Lexus</option>
<option>Mazda</option>
<option>Mercedes</option>
<option>MINI</option>
<option>Mitsubishi</option>
<option>Nissan</option>
<option>Porsche</option>
<option>Saab</option>
<option>Subaru</option>
<option>Toyota</option>
<option>Volkswagen</option>
<option>Volvo</option>
</select>
<br>
model<br>
<input type=Text name='MODEL' >
<br>
year<br>
<select name="YEAR" size="1" id="YEAR">
<option>1980</option>
<option>1981</option>
<option>1982</option>
<option>1983</option>
<option>1984</option>
<option>1985</option>
<option>1986</option>
<option>1987</option>
<option>1988</option>
<option>1989</option>
<option>1990</option>
<option>1991</option>
<option>1992</option>
<option>1993</option>
<option>1994</option>
<option>1995</option>
<option>1996</option>
<option>1997</option>
<option>1998</option>
<option>1999</option>
<option>2000</option>
<option>2001</option>
<option>2002</option>
<option>2003</option>
<option>2004</option>
<option>2005</option>
<option>2006</option>
<option>2007</option>
<option>2008</option>
<option>2009</option>
<option>2010</option>
</select>
<br>
Power Adder<br>
<select name="INDUCTION" size="1" id="INDUCTION">
<option>N/A</option>
<option>Turbocharged</option>
<option>Supercharged</option>
<option>Nitrous Oxide</option>
<option>Other</option>
</select>
<br>
ET<br>
<select name="ET" size="1" id="ET">
<option>9.00</option>
<option>9.10</option>
<option>9.20</option>
<option>9.30</option>
<option>9.40</option>
<option>9.50</option>
<option>9.60</option>
<option>9.70</option>
<option>9.80</option>
<option>9.90</option>
<option>10.00</option>
<option>10.10</option>
<option>10.20</option>
<option>10.30</option>
<option>10.40</option>
<option>10.50</option>
<option>10.60</option>
<option>10.70</option>
<option>10.80</option>
<option>10.90</option>
<option>11.00</option>
<option>11.10</option>
<option>11.20</option>
<option>11.30</option>
<option>11.40</option>
<option>11.50</option>
<option>11.60</option>
<option>11.70</option>
<option>11.80</option>
<option>11.90</option>
<option>12.00</option>
<option>12.10</option>
<option>12.20</option>
<option>12.30</option>
<option>12.40</option>
<option>12.50</option>
<option>12.60</option>
<option>12.70</option>
<option>12.80</option>
<option>12.90</option>
<option>13.00</option>
<option>13.10</option>
<option>13.20</option>
<option>13.30</option>
<option>13.40</option>
<option>13.50</option>
<option>13.60</option>
<option>13.70</option>
<option>13.80</option>
<option>13.90</option>
<option>14.00</option>
<option>14.10</option>
<option>14.20</option>
<option>14.30</option>
<option>14.40</option>
<option>14.50</option>
<option>14.60</option>
<option>14.70</option>
<option>14.80</option>
<option>14.90</option>
<option>15.00</option>
<option>15.10</option>
<option>15.20</option>
<option>15.30</option>
<option>15.40</option>
<option>15.50</option>
<option>15.60</option>
<option>15.70</option>
<option>15.80</option>
<option>15.90</option>
<option>16.00</option>
<option>16.10</option>
<option>16.20</option>
<option>16.30</option>
<option>16.40</option>
<option>16.50</option>
<option>16.60</option>
<option>16.70</option>
<option>16.80</option>
<option>16.90</option>
<option>17.00</option>
<option>17.10</option>
<option>17.20</option>
<option>17.30</option>
<option>17.40</option>
<option>17.50</option>
<option>17.60</option>
<option>17.70</option>
<option>17.80</option>
<option>17.90</option>
<option>18.00</option>
</select>
<br>
Trap Speed<br>
<input type=Text name='TRAP'>
<br>
Location<br>
<input type=Text name='LOCATION'>
<br>
</font><br>
<input type=submit name=submit value=submit>
</p>
</form>
<?
}
?>
<?php
echo "<br>";
include("footer.php");
?>