|
-
Jul 27th, 2007, 07:42 PM
#1
Thread Starter
Addicted Member
Php Url
Ok, so what i want to do is turn my php page into a url.
E.G: Lets say we have a site called www.php.com and it has an index.php page that has 2 text box's and a submit button. I want to fill in those 2 text boxes and cick submit with the url. Normaly you would fill them in by hand. And click submit. Lets say i did that and clicked submit i would just get.
http://www.php.com/page.php?Submit=Go
Well this is MY IDEA of what i want it to look like.
http://www.php.com/page.php?Text1="Filled";Text2="Filled";Submit=Go
(So that SHOULD make Text1 and Text2 say Filled and execute the Submit command)
do you understand? But i dont know how to do it? Can anyone explaine to me? (Use my example "www.php.com" with the TextBoxes too)
Thank You
Last edited by Gunner54; Jul 27th, 2007 at 07:46 PM.
-
Jul 27th, 2007, 10:53 PM
#2
-
Jul 28th, 2007, 06:53 AM
#3
Thread Starter
Addicted Member
Re: PHP URL
how could i do that with this?
Code:
<FORM METHOD=POST>
<div align="center">LegacyGamers UnBan Script<br>
CharacterName:
<input type="text" name="char">
<input type="submit" name="Submit" value="UnBan Character">
<br>
<?php
if (Submit){
$char = $_POST['char'];
$query = mssql_query("SELECT AID FROM Character WHERE Name = '$char'");
if(mssql_num_rows($query)<1){
echo ":: Character Name Is Not Correct ::";
} else {
$data = mssql_fetch_assoc($query);
$aid = $data['AID'];
$query = mssql_query("UPDATE Account SET UGradeID='0' WHERE AID='$aid'");
echo ":: Account UnBanned ::";
}
}
?>
<br>
<hr>
</div>
</form>
thank you
Last edited by Gunner54; Jul 28th, 2007 at 01:55 PM.
-
Jul 28th, 2007, 02:24 PM
#4
-
Jul 28th, 2007, 02:26 PM
#5
Thread Starter
Addicted Member
Re: Php Url
yeh but, i have done that 100's of times. I only done my first php script yesterday someone gave me this template. So i wanted to make it so
url.php?char=YAY
and it would do the query using YAY as char. Please could someone correct my code?
-
Jul 29th, 2007, 04:05 AM
#6
Re: Php Url
 Originally Posted by visualAd
Replace POST with GET.
What do you not understand about that? Find the word POST and replace it with GET. If you cannot cope with doing that I suggest you give up programming
-
Jul 29th, 2007, 04:07 AM
#7
Re: Php Url
You also need to use $_GET['Submit'] not $Submit. I would also recommend you use isset($_GET['Submit']).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|