all the paths are relative. I made a sqltest.php to test the connection to the server and the database, I got Successful on both so I know it is connecting. Here is the code for my add.php (adds the request to the db)
<?
if($_POST['submit'])
{
mysql_connect("localhost","itwork","itwork"
![winking smiley winking smiley](./mods/smileys/images/smilie3.gif)
;
mysql_select_db("itwork"
![winking smiley winking smiley](./mods/smileys/images/smilie3.gif)
;
$name = $_POST['name'];
$date = $_POST['date'];
$location = $_POST['location'];
$problem = $_POST['problem'];
$result=MYSQL_QUERY("INSERT INTO request (id,name,date,location,problem)".
"VALUES ('NULL', '$name', '$date', '$location', '$problem')"
![winking smiley winking smiley](./mods/smileys/images/smilie3.gif)
;
echo "Request Made!<br>";
echo "<a href='../index.php'>Back to Intranet</a>";
}
else
{
?>
<form method="post" action="add.php">
<TABLE>
<TR>
<TD>Name:</TD>
<TD><INPUT TYPE='TEXT' NAME='name' VALUE='' size=20></TD>
</TR>
<TR>
<TD>Location:</TD>
<TD>
<SELECT NAME='location'>
<OPTION VALUE='reception'>Reception Area
<OPTION VALUE='tech'>Technician Area
<OPTION VALUE='reading'>Reading Room
<OPTION VALUE='office'>Office
</SELECT>
</TD>
</TR>
<TR>
<TD>Date:</TD>
<TD>
<INPUT TYPE='TEXT' NAME='date' VALUE='<? echo date("Y-m-d"
![winking smiley winking smiley](./mods/smileys/images/smilie3.gif)
; ?>' size=10>
</TD>
</TR>
<TR>
<TD valign="top">Problem:</TD>
<TD><TEXTAREA COLS='60' ROWS='8' NAME='problem'></TEXTAREA></TD>
</TR><br>
<TR>
<TD></TD><br>
<TD><INPUT TYPE="submit" name="submit" value="submit"></TD>
</TR>
</TABLE>
</form>
<?
}
?>