PHP - Dignity - 07-21-2011
Code: if (!$_REQUEST["Admi"]) echo '<a href="login.php">login</a> is needed to use this page.';
if ($_REQUEST['Admi']);
{
echo '<form action="upload_file.php" method="post"enctype="multipart/form-data">';
echo '<label for="file">Filename:</label>';
echo '<input type="file" name="file" id="file" />';
echo '<br />';
echo '<input type="submit" name="submit" value="Submit" />';
echo '</form>';
}
It does say "login is needed to use this page", but it also echos the form...
RE: PHP - Jacob__mybb_import1 - 07-21-2011
(07-21-2011, 08:46 PM)roperson Wrote: Code: if (!$_REQUEST["Admi"]) echo '<a href="login.php">login</a> is needed to use this page.';
if ($_REQUEST['Admi']);
{
echo '<form action="upload_file.php" method="post"enctype="multipart/form-data">';
echo '<label for="file">Filename:</label>';
echo '<input type="file" name="file" id="file" />';
echo '<br />';
echo '<input type="submit" name="submit" value="Submit" />';
echo '</form>';
}
It does say "login is needed to use this page", but it also echos the form...
Take out the semicolon in the second line.
RE: PHP - Dignity - 07-21-2011
Worked. 
Now, the login page won't work....
Code: $id="*";
if($_POST['pwd']==$id);
setcookie("admi", "Yes", time()+3600);
echo "Yes";
else
echo "No";
RE: PHP - Jacob__mybb_import1 - 07-21-2011
(07-21-2011, 09:03 PM)roperson Wrote: Worked. 
Now, the login page won't work....
Code: $id="*";
if($_POST['pwd']==$id)
{
setcookie("admi", "Yes", time()+3600);
echo "Yes";
}
else
echo "No";
|