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 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    oh yeah rofl.


    I assumed it was there

  2. #12
    Join Date
    Oct 2006
    Posts
    33
    Tokens
    0

    Default

    Quote Originally Posted by Heinous View Post
    Um, no.

    $_POST[auction] refers to <input type="submit" name="auction">

    Does the form go back to the form? (once submitted), or load a blank page? Or not perform the mysql query. Be specifc please.
    Also, thats is just naming the Submit Button, the variable AUCTION in the code, refers to a variable in the form, youl ahve tto make a hiddne field like isaid to set it once the form is submitted.

    and yeah i think the form is sposed to send it back or whats the point in the rest of the code.

    Primal

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

    Default

    This should be fun..

    Quote Originally Posted by primal View Post
    I was assuming that the form goes back on itself. -- so you need the action="nameofpage.php" part in the form header.

    This would make sense, as it checks whether variable AUCTION has a value, if it doews then it shows the page (second visit), if not then it shows the form (first visit).

    Primal
    Forms without an action defined assume the action is the page it's on, which in this case is correct. Un needed, but to conform to W3C standards it's needed. Either way, not the problem.
    Quote Originally Posted by J-Rap View Post
    Also i would've thoght that u'd need to name the form in the opening tag.
    Because u surely cant use $_POST[username] etc. when u define name in submit..
    Ur just naming the submit button?
    Forms don't need names. You're defining the ID of a input, in this case the submit button, that's how forms are handled, via the names which are in turn the variables.
    Quote Originally Posted by :Blob View Post
    I think he is right cos what I have heard from Joe he can do nearly anythin.. And believe me, he probs can
    If you're referring to me, who the hell is Joe?
    Quote Originally Posted by primal View Post
    Also, thats is just naming the Submit Button, the variable AUCTION in the code, refers to a variable in the form, youl ahve tto make a hiddne field like isaid to set it once the form is submitted.

    and yeah i think the form is sposed to send it back or whats the point in the rest of the code.

    Primal
    Dude that doesn't even make sense.

    When submitting a form, ALL input's are put as an array in $_POST, labelled by the input name. Why the hell would he need to set a variable himself, when if (!$_POST[auction]) checks if it has or not anyway?
    Quote Originally Posted by primal View Post
    Ok let me break it down.

    The name of the form is unimportant. Basically this part:

    action="page.php"

    tell the system where to send the variables. (You could have 5 forms on the page all with the same name, its doesnt matter)

    Looking at your script it seems that it first look at a variable AUCTION, which if not present loads the form, and if it is present skips the form and does the rest.

    This means you need to ahve a hidden field on your form of name AUCTION. So when the form is sent, then the next time the AUCTION variable has been set, and it skips the form this time, and does the rest.

    goodLuck, hope it s working now.

    Primal
    Submit is auction.

    I forgot what else I was gonna say now.
    XHTML, CSS, AJAX, JS, php, MySQL.

    --

    HxF moderators can't read timestamps.

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

    Latest Awards:

    Default

    Well played mate! Thanks for that lol.

    Never used forms that way before
    Last edited by Jackboy; 23-10-2006 at 07:33 AM.

  5. #15

    Default

    Shouldnt $_POST[auction] be $_POST['auction']?
    Last edited by Encrypted!; 23-10-2006 at 07:34 AM.
    [IMG]http://www.****************/uploads/d854c54656.gif[/IMG]
    My Languages - PHP, HTML, Visual Basic, MySQL
    Learning - SQL, Ajax, XML

    Infractions - 0
    Reputation Comments: 1



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

    Latest Awards:

    Default

    It doesn't matter

    With the ' '

    It just looks a bit neater

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

    Default

    Quote Originally Posted by Encrypted! View Post
    Shouldnt $_POST[auction] be $_POST['auction']?
    No, it can be either. Its usually better to use single quotes, but sometimes that will clash when echoing and other stuff I can't remember. So it's users choice really.
    XHTML, CSS, AJAX, JS, php, MySQL.

    --

    HxF moderators can't read timestamps.

  8. #18
    Join Date
    Oct 2006
    Posts
    33
    Tokens
    0

    Default

    Firstly, dont we all want to conform to W3C.

    And secondly, making the hidden "auction" field would defenatelly work. And it does make sense ==> make a hidden field call it auction and give it a value. When the form is submitted there will be a value in $_POST['auction'] and it will complete the second part of the code then.

    Theres more than one way to skin a cat, neither way is right or wrong.

    Primal

Page 2 of 2 FirstFirst 12

Posting Permissions

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