Location:
Posts: 19
submit form
I have a web page to select a file and upload it. After i select the file and click submit on the form it does not go to the correct page instead it stays on the same page and tries to add the page i want to go to on the end of it.
Like so
the "submit page"
localhost/page1.php
Next I click submit and instead of it doing this
localhost/page2.php
It does this
localhost/page1.php/page2.php
my code says <action="page2.php"> it just isn't going there
I have been looking through the code for a while now and I can't figure out what i am doing wrong.
Thanks for the help
<?
session_start();
$valid_user = $HTTP_SESSION_VARS["valid_user"];
if(session_is_registered("valid_user")){
echo "<html>";
echo '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">';
echo '<body bgcolor= "#000000">';
echo '<SPAN STYLE="color: yellow">'."Todays date: ".date("F j Y");
echo "<br>";
echo "Hello $valid_user, you have uploaded X songs.";
echo "<br><br><br><br><br><br><br>";
echo '<p align="center"><font size="30">Upload Song</font></p>';
echo '<div align="center">';
echo '<form enctype="multipart/form-data" action="upload.php" method=post>';
echo "<table>";
echo "<tbody>";
echo "<tr>";
echo '<input type = "hidden" name="MAX_FILE_SIZE" value="10000000">';
echo '<td width="0%" height="25" valign="top"><font size="3" color="#FFFF00">Upload file:</font</td>';
echo '<td width="0%"><font size="1"><input type="file" name="userfile"></font></td>';
echo '<td width="0%" height="25" valign="top"></td>';
echo "</tr>";
echo "<tr>";
echo '<td width="0%" align=""><font size="3"><input type="submit" value="Send File"></font></td>';
echo "</tr>";
echo "</tbody>";
echo "</tabel>";
echo "</form>";
echo "</div>";
echo "</html>";