I have this code here and I'm wondering how I can send it to an email and make more boxes could anyone help. Code: <tr><td><input type="hidden" name="on0" value="Steam ID">Steam ID</td></tr><tr><td><input type="text" name="os0" maxlength="60"></td></tr><br /> Code (markup): I press enter when I put something in doesn't work. I would like to have more boxes and able to send it to an email or game server cfg is this possible?
You need an action for the form so it knows what to do with the information. In most cases information gets sent to some other page or the same. example : <form name="MyForm" action="THIS CAN BE A URL or the same page = <?php echo $_SERVER['PHP_SELF']; ?>" method="POST or GET"> Code (markup): You should also give id's as well as names: example: <input type="hidden" name="on0" id="on0" value="Steam ID"> Code (markup): To simplify the users experience, you should add a Submit button as novice users may not realizes they can just press enter. So put together: <form name="MyForm" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="GET"> <tr><td><input type="hidden" name="on0" id="on0" value="Steam ID">Steam ID</td></tr> <tr><td><input type="text" name="os0" id="os0" maxlength="60"></td></tr> <br /> <input type="submit" value="Submit" /> </form> Code (markup): See here for other explanations http://www.w3schools.com/tags/tag_input.asp
thanks for the reply, On this section I looked at the link you posted and it doesn't say how the page can accept the submitted, like if I want it to be sent as a private message on a vbulletin forum, or to a database of some sort.
The id of the element (the text input box) is the name of the array element in the POST or GET array, so $_POST['os0'] would be the data in the box in your example (if you change name="os0" to id="os0"). So in the PHP page you send this to (the action of the form), you'd use $os0 = isset($_POST['os0']) ? $_POST['os0'] : ''; Code (markup): The variable $os0 would have whatever the user typed into the box or be blank. Sending it to yourself in an email uses the PHP mail() function (use an example from the manual). For vBulletin, you'll have to read the vBulletin docs or code. To save it in a database, just use an INSERT statement. Exactly what code you use depends on the type of database connection, say mysql, mysqli, odbc, etc.