Draw form

Asked

Viewed 48 times

0

I need a simple form with fields for (name and phone). Below a list with numbers from 1 to 100, for example.

The user fills in the form and after "Submit" I receive an email with the information and number chosen by the visitor. The same information must be printed on the screen for the user.

Well, so far I can do it, only I need something more. In case i want the number chosen by visitor 1 to be unavailable to visitor 2 and so on.

Could someone help me with this?

Grateful from now on!

  • This needs to be done on the server. Which server are you using? And which server-side programming language?

  • I’m using Apache and PHP

  • Actually I don’t even want the system to do the draw, I just want the numbers to be unavailable as they are selected. The draw I will do manually even.

  • And how is linking the client with the currently drawn number?

  • I’m sending td to a mysql database.

  • 1

    So why not use this bank to check that the number has not been drawn before?

  • I don’t know. .

  • I think it gets complicated, you know what you want, you know what you have, but you have no idea how to do.... there are several ways to accomplish this =(

  • Hahaha! Exactly why I asked for help here. Remembering that I need to check if the number has already been selected and not drawn. If I have already selected the 67 it should be unavailable for the next visitor and so until the last number is selected.

  • You see, the Sopt network doesn’t work exactly that way, I wanna do something, do it for me. The ideal is to try something, if any doubt arises, then yes ask a question with a closed scope, the way it was put, I voted to close as wide

  • I recommend you take a [tour] to get to know the Sopt community better and read about [mcve]

  • Got it. Thanks anyway!

  • If these numbers from 1 to 100 come from the database, create an available ENUM('yes','no') column of default value yes. Then when the visitor submits the form you take advantage and do an UPDATE in this column for the value not corresponding to the column of the respective number. For the next visitor load the numbers Where available column = yes

Show 8 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.