Page 1 of 4 1234 LastLast
Results 1 to 10 of 33
  1. #1
    Join Date
    May 2006
    Location
    Huntingdon (Cambridgeshire UK)
    Posts
    3,395
    Tokens
    0

    Latest Awards:

    Default Just a little URL help.

    Right, so in php is there a code snippet to attach something you have written in a box to appear at the end of an url.

    EG.

    www.morningsunshine.net/form.html

    I want it so you type your habbo name into the box, press submit and it puts it on the end of the url of habbo.php

    so it would be morningsunshine.net/habbo.php?name=WHATWASTYPEDON FORM.HTML

    It's for the Habbo imager. Having a little trouble.

    bomb-head (forum moderator) - Moved to coding. Please post in correct forum.
    Last edited by Bomb-Head; 01-11-2006 at 10:44 PM.

  2. #2
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Tea View Post
    Right, so in php is there a code snippet to attach something you have written in a box to appear at the end of an url.

    EG.

    www.morningsunshine.net/form.html

    I want it so you type your habbo name into the box, press submit and it puts it on the end of the url of habbo.php

    so it would be morningsunshine.net/habbo.php?name=WHATWASTYPEDON FORM.HTML

    It's for the Habbo imager. Having a little trouble.

    Im writting this with the knowledge that u understand forms?

    Ok to attatch it...

    EDIT: WITH FORMS
    PHP Code:
    <?
    if (!$_POST]){
    echo (
    "<form name=habbo action=habbo.php method=POST>
    <B>Habbo Name</B>: <input type=text name=habbo>
    <BR><input type=submit value=Submit>"
    );
    }
    else
    {
    $name $_POST[name]
    echo (
    "<IMG SRC=morningsunshine.net/habbo.php?name=$name");
    // Made By Jackboy. I had to include this coz i iz l33t.
    }
    ?>
    Last edited by Jackboy; 01-11-2006 at 05:25 PM.

  3. #3
    Join Date
    Nov 2004
    Location
    HabboWeb FM Offices
    Posts
    3,019
    Tokens
    0

    Latest Awards:

    Default

    This is the improved version as the version above didnt seem right

    PHP Code:
    <?
    if (!$_POST]){
    echo (
    "<form name=\"habbo\" action=\"habbo.php\" method=\"POST\">
    <B>Habbo Name</B>: <input type=\"text\" name=\"habbo\"><br>
    <input type=\"submit\" value=\"submit\"></form>"
    );
    }
    else
    {
    $name $_POST[name];
    echo (
    "<IMG SRC=\"morningsunshine.net/habbo.php?name=$name\">");
    }
    ?>

  4. #4
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    what a load of rubbish.

    That is NO WAY improved..

    Mine works perfectly. I just havn't used the "/

    Woopdey woo. It still works..

    U meant changed and SPECIAL (In the head) version lol
    Last edited by Jackboy; 01-11-2006 at 05:26 PM.

  5. #5
    Join Date
    May 2006
    Location
    Huntingdon (Cambridgeshire UK)
    Posts
    3,395
    Tokens
    0

    Latest Awards:

    Default

    Well anyway, thanks both and +rep for your help!

    Blob, when ur un-cantioned ill rep u!
    Last edited by Kymux; 01-11-2006 at 05:27 PM.

  6. #6
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Cheers. u figured it out?

  7. #7
    Join Date
    Nov 2004
    Location
    HabboWeb FM Offices
    Posts
    3,019
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Jackboy View Post
    Cheers. u figured it out?
    Yours didnt have a submit button. Anyway, I love making my PHP right. I just like get annoyed if it aint. Dont ask

  8. #8
    Join Date
    May 2006
    Location
    Huntingdon (Cambridgeshire UK)
    Posts
    3,395
    Tokens
    0

    Latest Awards:

    Default

    Help me. Someone put the code posted above into that somewhere. I just need it so I type the name and it edits the url to www.morningsunshine.net/habbo.php?name=NAMEHERE

    pls

    form.html

    HTML Code:
    <html>
    <head>
    <title>What does your Habbo look like?</title>
    </head>
    <body>
    
    <form action="habbo.php?name=[name]" method="post">
    Enter Habbo Name: <input type="text" name="name" /><br />
    <br /><input type="submit" name="submit" value="Submit" />
    <br /><br />
    </body>
    </html>
    habbo.php

    PHP Code:
    <? 
    header
    ("Content-Type: image/gif"); 
    $thumbWidth "60"
    $thumbHeight "120"
    $name $_GET[name]; 
    $url "http://www.habbohotel.co.uk/habbo-imaging/collagepr?name_2_txt=0&name_2_y=-117&name_2_x=-491&h_2_dir=2&h_2_name=0&h_2_frame=0&h_2_gesture=0&h_2_action=0&h_2_y=0&h_2_x=0&name_1_txt=No%20Such%20User!&name_1_y=-597&name_1_x=-471&stampY=-1048&stampX=-1019&h_1_dir=3&h_1_name=$name&h_1_frame=0&h_1_gesture=sml&h_1_action=wav&h_1_y=1&h_1_x=0&overlay=0&overlayY=-95&overlayX=-39&logoY=-300&logoX=-300&bkg=0&bkgY=-95&bkgX=-38&bkgColor=ffffff&picH=320&picW=61&quality5&img-format=png&xml-template=imageCreator_1_name"
    $srcImg imagecreatefrompng($url); 
    $origWidth imagesx($srcImg);  
    $origHeight imagesy($srcImg);   
    $thumbImg imagecreate($thumbWidth$thumbHeight); 
    imagecopyresized($thumbImg$srcImg0000$thumbWidth$thumbHeightimagesx($thumbImg), imagesy($thumbImg)); 
    $ImgWhite imagecolorallocate($thumbImg255255255); 
    imagefill($thumbImg00$ImgWhite); 
    imagecolortransparent($thumbImg$ImgWhite); 
    imagegif($thumbImg); 
    imagedestroy($thumbImg); 
    ?>

  9. #9
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Looool ok.

    I did have a submit button :rolleyes: :rolleyes:

    Looook. The "last edited on the w/e" was errr it was a admin messing about...

    Yeah thats right lol

  10. #10
    Join Date
    May 2006
    Location
    Huntingdon (Cambridgeshire UK)
    Posts
    3,395
    Tokens
    0

    Latest Awards:

    Default

    Yeah but thats what I had before I made this thread lol. It doesnt work so i type the name and it comes up with the image. I'm guessing I only edit the form!

Page 1 of 4 1234 LastLast

Posting Permissions

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