Posts Tagged ‘html’
What php code is needed in order to have this HTML form submit?
Question by Connie: What php code is needed in order to have this HTML form submit?
Ideally we would like the form emailed and submitted to an excel file. My form code is below:
I was able to find some of the code needed but not all of it. www.standardrecording.com/sxsw2009/rsvp.php You can fill it out and submit but the thank you page displays blank. I find no errors within the code. Also I have not found any help articles that show how to email the form results.
$First_Name=$_POST["First_Name"];
$Last_Name=$_POST["Last_Name"];
$Date_of_Birth=$_POST["Date_of_Birth"];
$Number_of_Guests=$_POST["Number_of_Guests"];
$Email=$_POST["Email"];
$City=$_POST["City"];
$State=$_POST["State"];
$Zip=$_POST["Zip"];
$Craftster=$_POST["Craftster"];
$Standard=$_POST["Standard"];
$Other=$_POST["Other"];
print "First Name: $First_Name
“;
print “Last Name: $Last_Name
“;
print “Date of Birth: $Date_of_Birth
“;
print “Number of Guests: $Number_of_Guests
“;
print “Email: $Email
“;
print “City: $City
“;
print “State: $State
“;
print “Zip: $Zip
“;
}
?>
Ideas?
Best answer:
Answer by Jama A
You need to get information from the form using get or post method and than use the mail() to send it by email. There are alot of resources ont he net. Check the link bellow for form in php.
http://pctalknet.com/php/forms.php
Know better? Leave your own answer in the comments!
Related search terms:
i want a code like if the html checkbox is ticked, it should print some php if not , then should be empty?
Question by (ƸӜƷ): i want a code like if the html checkbox is ticked, it should print some php if not , then should be empty?
Best answer:
Answer by andr0x
I’m assuming you know a little php, if not you should read some tutorials before trying things like this.
you will want to create a form with the checkbox item, this is all html. Now give the checkbox a name like, “cbox1″.
then you can see if its been ticked with with isset().
so something like
if (isset($_POST['cbox1'])
echo “blah blah blah its checked”;
(this assumes you use POST, for get just use _GET)
Give your answer to this question below!
Related search terms:
blah,Kalayaan OR Focus on the global south OR ACME OR Eau vive
How can I have fields appear on an HTML form when a checkbox is selected?
Question by Kizzeith: How can I have fields appear on an HTML form when a checkbox is selected?
Basically, I have an email/upload form using html and linked to a php script (post.)
I want to have a checkbox or yes/no radio buttons that ask if the submitter is uploading a file. If yes is selected, i want the upload section to be active. If no is selected, I want it to be hidden or “grayed” out.
How can I do this?
Best answer:
Answer by Charles R
use radiobuttons with the same name and different values it would look something like
. You can then use JavaScript to determine to handel a click or change event check the value and change display to = “none” or “”
Give your answer to this question below!
How would I use a checkbox and submit button in html or php to make the text following bold and timestamped?
Question by jrgreenfield1: How would I use a checkbox and submit button in html or php to make the text following bold and timestamped?
I want someone to be able to mark off a task and have it timestamped and remain un-editable.
I want it to happen automatically and remain permenent so other users can see that that ‘task’ has been completed
Best answer:
Answer by John J
do you want this to happen automatically on the page, or have an update in the database?
If you want it to happen in the page itself, without going back, updating the db, and requesting a new page you need to use javascript like:
text to bold laterIf you want the back end to control it, just use php to set a timestamp in the db related to that task (depends on how you have the database set up) and if that field is filled on a request surround the copy with a tag.
To disable a text field in html just include ‘disabled = “disabled”‘ in the
tag.
You can make it do both, or just turn the act of clicking the checkbox into a submit by adding onclick = “this.form.submit()” to the checkbox input tag. It will then go back to the back end, updated the db, and request the page like I described.
What do you think? Answer below!
Related search terms:
Modifying HTML forms using php checkbox question?
Question by Caleb M: Modifying HTML forms using php checkbox question?
I’ve asked this before and people didn’t give the correct answer. I have a form that goes to a php validation file, and if something is wrong it sends you back to the form page, and fills in the same values you put in before submitting. On one part of this form there are multiple checkboxes that post as an ARRAY (there is more than one checkbox associated with the array variable, so a simple if(isset(variable == “blah”) echo “checked”; WILL NOT WORK FOR ME). My question is, how do I get the php to check the boxes the user checked before submitting the form.
Best answer:
Answer by KingMaximus
The only way I can think to do it would be to keep track of an individual index for each checkbox and tack it on to the end of the checkbox value eg:
etc., the 0 and 1 being the indices and the _ being the string seperator. You could then test each one of the values in your POST array to see if the index number, which you can get using substr(), is the same as the value of the checkbox you’re currently writing. If it is, you can simply use:
echo “checked=\”checked\”";
It’s a bit cumbersome but it’d do the job.
What do you think? Answer below!
Related search terms:
insert multiple records in mysql using php form,php form checkbox update,php form multiple checkboxes
