Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Mar 2007
    Posts
    184
    Tokens
    0

    Default setting a variable from several $_GET's in the url

    i have this

    $pin = " . $_GET['first']; . " . $_GET['second']; . " . $_GET['third']; . " . $_GET['final']; . "

    but it doesnt work, how do i set a variable from more than one $_GET part of the url or from several pieces of post data, so i can easily insert them into a db.
    Edited by Catzsy Forum Super Moderator: Your signature has been removed because
    It is against the rules to insult/bully other members by targetting them with personal remarks about them in your signature.

  2. #2
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    Remove ; after every get

  3. #3
    Join Date
    Mar 2007
    Posts
    184
    Tokens
    0

    Default

    still dont work
    Edited by Catzsy Forum Super Moderator: Your signature has been removed because
    It is against the rules to insult/bully other members by targetting them with personal remarks about them in your signature.

  4. #4
    Join Date
    Dec 2005
    Location
    Australia
    Posts
    693
    Tokens
    0

    Default

    Change it to..

    $pin = $_GET['first'] . $_GET['second'] . $_GET['third'] . $_GET['final'];
    XHTML, CSS, AJAX, JS, php, MySQL.

    --

    HxF moderators can't read timestamps.

  5. #5
    Join Date
    Mar 2007
    Posts
    184
    Tokens
    0

    Default

    dont work this is what im trying to do

    $query = mysql_query("INSERT INTO entrys (pin) VALUES('$_GET['first'] . $_GET['second'] . $_GET['third'] . $_GET['final'];')");
    Edited by Catzsy Forum Super Moderator: Your signature has been removed because
    It is against the rules to insult/bully other members by targetting them with personal remarks about them in your signature.

  6. #6
    Join Date
    Jul 2006
    Location
    Athens
    Posts
    842
    Tokens
    0

    Default

    PHP Code:
    $first "$_GET['first']";
    $second "$_GET['second']";
    $third "$_GET['third']";
    $final "$_GET['final]";
    $pin "$first $second $third $final";
    mysql_query("INSERT INTO `entrys` (`pin`) VALUES ('$pin')") or die ("mysql_error()"); 
    Try that
    Last edited by Drompo; 03-05-2007 at 04:10 PM.


  7. #7
    Join Date
    Mar 2007
    Posts
    184
    Tokens
    0

    Default

    still need help -.-
    Edited by Catzsy Forum Super Moderator: Your signature has been removed because
    It is against the rules to insult/bully other members by targetting them with personal remarks about them in your signature.

  8. #8
    Join Date
    Jul 2006
    Location
    Athens
    Posts
    842
    Tokens
    0

    Default

    Tryed Mine?


  9. #9
    Join Date
    Mar 2007
    Posts
    184
    Tokens
    0

    Default

    yep didnt work
    Edited by Catzsy Forum Super Moderator: Your signature has been removed because
    It is against the rules to insult/bully other members by targetting them with personal remarks about them in your signature.

  10. #10
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Ok so on the assumption by the end of it the GET string after the file name is

    ?first=1&second=2&third=3&final=4
    (the 1234 can be subsituted for any pin. Then in full
    PHP Code:
    $pin http_vars_get['first'].http_vars_get['second'].http_vars_get['third'].http_vars_get['final'] ;
    mysql_query("INSERT INTO `entrys` (`pin`) VALUES ('$pin')") or die ("mysql_error()"); 

Page 1 of 2 12 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
  •