PDA

View Full Version : Help! help with php!


roydude1
03-01-2009, 12:10 PM
so i am trying to make a login system, and here is what i have so far: <table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form name="form1" method="post" action="checklogin.php">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Member Login </strong></td>
</tr>
<tr>
<td width="78">Username</td>
<td width="6">:</td>
<td width="294"><input name="myusername" type="text" id="myusername"></td>
</tr>
<tr>
<td>Password</td>
<td>:</td>
<td><input name="mypassword" type="text" id="mypassword"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><input type="submit" name="Submit" value="Login"></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
then, when you click submit, it redirects you to the website, only with the name of the script that enters the mysql database and checks to see if your username is there. in this case the file is called checklogin.php eg: www.website.com/checklogin.php . then if it was succesfull, it will bring you to another .php page. i have the script for that. if it is insucceful, same thing.

so the problem is that when i click submit, there is no such page as www.website.com/checklogin.php (not really my website name.) there is such a page as www.website.com/, but no checklogin.php after that. so how do i make it so that it will run the checklogin.php script? do i have to get a page like above? thanks for the help.

so basically, when you click submit, it redirects you to the website, only with the name of the script that enters the mysql database and checks to see if your username is there. in this case the file is called checklogin.php eg: www.website.com/checklogin.php but i do not know how to make it so that the website says that. i am using 000webhost.com

EDIT: oh yea, if you need some more info to help me, i am using phpmyadmin for database editing, and apache for my server.

roydude1
03-01-2009, 12:20 PM
everyone here is really so blunt they do not know what php is...

Merde
03-01-2009, 12:22 PM
Wouldn't you not want it to show the file that has all the data in it?

roydude1
03-01-2009, 12:23 PM
no personal or any cpuinfo is in there...

Pyros
03-01-2009, 05:19 PM
This is basic HTML that you're doing.
Since its html I can cover ya, in the form you got
<form name="form1" method="post" action="checklogin.php">

just change checklogin.php to where it should go! aka http://www.blah blah blah.com/checklogin.php

if you just leave it as checklogin.php it'll check in its own directory (where the file currently resides to see if there is a page there called that.

Pyros