Results 1 to 7 of 7

Thread: Php Url

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    208

    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.

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Php Url

    Use GET instead of POST

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    208

    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.

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Php Url

    Replace POST with GET.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    208

    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?

  6. #6
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Php Url

    Quote 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
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  7. #7
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Php Url

    You also need to use $_GET['Submit'] not $Submit. I would also recommend you use isset($_GET['Submit']).
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width