Jump to content

Search the Community

Showing results for tags 'Form'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 116 results

  1. User Registration Form

    Hello Friends, I want to design a registration form for online test which appears on the online test page link.This form should appear in form of a pop up by shadowing background test page contents with grey colour. When user submits the data, this pop up form should validate the data and send the data to database and then the background test page content should be available for the user. If user cancels the form pop up then background page should show an error.(ie the test page link should be available to those who register themselves through form). Thank you.
  2. MAILTO

    Hello Everybody...i want to ask that how to make a form such that when the user click on the submit button, the data entered by him should be sent my email id....actually i am practicing on HTML and have a form with the fieldsFULL NAMEPHONEEMAILCOMMENTS now i want that when the user fill in this form and click the "send" button then the data should be mailed to my email address.....i have searched through the internet and found like an "action" but it ask to some language.....i dont know what to do...please help me out.....
  3. Form Style

    Dear W3School- Community, I have a problem with a form style. My form should fit in light blue box as you can see on the screenshot. The id tag is following: #register-form .fieldgroup { display: block; width: 340px;} If I change the display property to "inline-block" I achieve my concern but the form changed the position to the right and isn't centered anymore!Do I need other properties? I would appreciate a reply,PGCoder error.tiff
  4. My PHP Send form. First round.

    So basically, I have taken a form, re-arranged it and I have messed something up along the way. quote.php: <table id="form" border="0" cellpadding="0" cellspacing="5" width="100%"> <form method="post" action="http://www.mysite.com/sendquote.php"></form> <tbody><tr> <td colspan="2" align="right" bgcolor="#CCCCCC"><strong>Select Make</strong> <span>*</span></td> <td colspan="2" align="left" bgcolor="#CCCCCC"><select name="make" id="make"> <option value="">Select One</option> <option value="Acura">Acura</option>.... <option value="Yugo">Yugo</option> </select></td> </tr> <tr> <td align="left">Select Model <span>*</span></td> <td align="left"><input name="model" id="model" type="text"></td> <td align="left">Year <span>*</span></td> <td align="left"><select name="year" id="year"> <option value="">Selct One</option> <option value="2012"> 2012 </option>..... <option value="1961"> 1961 </option> </select></td> </tr> <tr> <td align="left">VIN <span>*</span></td> <td align="left"><input name="vin" id="vin" type="text"></td> <td align="left">Odometer: (Write "0" if N/A)</td> <td align="left"><input name="odometer" id="odometer" type="text"></td> </tr> <tr> <td align="left">Does it start and drive? <span>*</span></td> <td align="left"><select name="driveable" id="driveable"> <option selected="selected" value="Start and Drivable">Start and Drivable</option> <option value="Start - will not run">Start - will not run</option> <option value="Will not start">Will not start</option> </select></td> <td align="left">Do you have the title in hand ?<span>*</span></td> <td align="left"><select name="title" id="title"> <option selected="selected" value="Yes - Clear in Hand">Yes - Clear in Hand</option> <option value="Yes - Salvage Title">Yes - Salvage Title</option> <option value="No - I lost it">No - I lost it</option> <option value="No - It is not my car">No - It is not my car</option> </select></td> </tr> <tr> <td align="left">Ever been in an accident or flood <span>*</span></td> <td align="left"><select name="accidentflood" id="accidentflood"> <option selected="selected" value="NO">NO</option> <option value="Yes - Accident">Yes - Accident</option> <option value="Yes - Flood">Yes - Flood</option> </select></td> <td align="left">Price expected (Optional)</td> <td align="left"><select name="price" id="price"> <option value="">Choose Amount</option> <option value="Not Sure">Not Sure</option> <option value="$50">$50</option> <option value="More than $5000">More than $5000</option> </select></td> </tr> <tr> <td colspan="4" align="left" bgcolor="#CCCCCC"><strong>Describe condition of vehicle including missing parts, body and mechanical damages:</strong></td> </tr> <tr> <td colspan="4" align="center"><textarea name="comments" onkeypress="return maxLength(this,"501");" onblur="return maxLengthPaste(this,"501");" rows="3" cols="40"></textarea></td> </tr> <tr> <td colspan="4" align="left" bgcolor="#CCCCCC"><strong>Seller Info</strong></td> </tr> <tr> <td align="right"> Name <span>*</span></td> <td align="left"><input name="fname" id="fname" type="text"></td> <td align="right">Email <span>*</span></td> <td align="left"><input name="email" id="email" type="text"></td> </tr> <tr> <td align="right">Phone <span>*</span></td> <td align="left">(<input name="phone1" id="phone1" maxlength="3" style="width:40px;" type="text">) <input name="phno" id="phno" maxlength="8" style="width:90px;" type="text"></td> <td align="right">Zip Code <span>*</span></td> <td align="left"><input maxlength="5" name="zip" type="text"></td> </tr> <tr> <td colspan="4" align="center"><input name="submit" id="submit" value="Submit" style="width:100px;" type="submit"></td> </tr></tbody></table> sendquote.php <?php$mailto = 'myemail@gmail.com' ;$subject = "Quote Request" ;$formurl = "http://www.mysite.com/quote.php" ;$errorurl = "http://www.mysite.com/quote.php" ;$thankyouurl = "http://www.mysite.com/quote.php" ;$uself = 0;$use_sendmailfrom = 0;$use_webmaster_email_for_from = 0;$use_utf8 = 1;$headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ;$content_type = (!isset( $use_utf8 ) || ($use_utf8 == 0)) ? 'Content-Type: text/plain; charset="iso-8859-1"' : 'Content-Type: text/plain; charset="utf-8"' ;if (isset( $use_sendmailfrom ) && $use_sendmailfrom) {ini_set( 'sendmail_from', $mailto );}$firstname = addslashes($_POST['fname']) ;$zip = addslashes($_POST['zip']) ;$phone = addslashes($_POST['phone1']) ;$email = addslashes($_POST['email']) ;$comments = addslashes($_POST['comments']) ;$make = addslashes($_POST['make']) ;$model = addslashes($_POST['model']) ;$year = addslashes($_POST['year']) ;$vin = addslashes($_POST['vin']) ;$odometer = addslashes($_POST['odometer']) ;$driveable = addslashes($_POST['driveable']) ;$title = addslashes($_POST['title']) ;$accidentflood = addslashes($_POST['accidentflood']) ;$price = addslashes($_POST['price']) ;if (!isset($_POST['email'])) {header( "Location: $formurl" );exit ;}$valid_email = (preg_match('/^[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/im', $email)) ? true : false;$valid_firstname = (!empty($firstname)) ? true : false;$valid_zip = (!empty($zip)) ? true : false;$valid_phone = (!empty($phone1)) ? true : false;$valid_email = (!empty($email)) ? true : false;$valid_vin = (!empty($vin)) ? true : false;$valid_year = (!empty($year)) ? true : false;$valid_make = (!empty($make)) ? true : false;$valid_model = (!empty($model)) ? true : false;$valid_odometer = (!empty($odometer)) ? true : false;$fromemail = (!isset( $use_webmaster_email_for_from ) || ($use_webmaster_email_for_from == 0)) ? $email : $mailto ;if (get_magic_quotes_gpc()) { $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST); while (list($key, $val) = each($process)) { foreach ($val as $k => $v) { unset($process[$key][$k]); if (is_array($v)) { $process[$key][stripslashes($k)] = $v; $process[] = &$process[$key][stripslashes($k)]; } else { $process[$key][stripslashes($k)] = stripslashes($v); } } } unset($process);}$messageproper ="This message was sent from:\n" ."$http_referrer\n" ."------------------------------------------------------------\n" ."Name: $firstname\n" ."Zip: $zip\n" ."Email: $email\n" ."Phone: $phone\n" ."Year: $year\n" ."Make: $make\n" ."Model: $model\n" ."Odometer: $odometer\n" ."Runs? $driveable\n" ."Title? $title\n" ."Accident or flood? $accidentflood\n" ."Expected pirce? $price\n" ."------------------------- MESSAGE -------------------------\n\n" .$comments ."\n\n------------------------------------------------------------\n" ;$headers = "From: \"$firstname\" <$fromemail>" . $headersep . "Reply-To: \"$firstname\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.15.0" . $headersep . 'MIME-Version: 1.0' . $headersep . $content_type ;if ($valid_email && $valid_fname && $valid_zip && $valid_email && $valid_comments && $valid_year && $valid_make && $valid_model && $valid_odometer) {mail( $mailto, $subject, $messageproper, $headers );}else {header( "Location: $errorurl" );exit ;}header( "Location: $thankyouurl" );exit ;?> Any ideas of where I went wrong?
  5. XML Form Field Calculation

    Hello everyone, I've an application which uses xml form for data entry. I was wondering if is possible to make calculation (mainly additions and subtraction)? <?xml version="1.0"?><items><item type="settings" position="label-top"/> <item type="label" label="Edit report details here." /> <item type="label" label="Date"/><item type="calendar" dateformat="%d/%m/%Y" validate="notEmpty" required="true" name="date" bind="date" label="Date" offsetLeft="15"/><item type="input" name="admin" bind="admin" label="Admin" offsetLeft="15"/> <item type="label" label="Sales"/> <item type="input" name="others" bind="others" label="Others" offsetLeft="15"/><item type="input" name="internet" bind="internet" label="Internet" offsetLeft="15"/><item type="input" name="topup" bind="topup" label="Top Up" offsetLeft="15"/><item type="input" name="phcard" bind="phcard" label="Phone Cards" offsetLeft="15"/><item type="input" name="phcalls" bind="phcalls" label="Phone Calls" offsetLeft="15"/> <item type="input" name="bustickets" bind="bustickets" label="Bus Tickets" offsetLeft="15"/> <item type="input" readonly="true" name="totalin" bind="totalin" label="Total In" offsetLeft="15"/> <item type="label" label="Expenses & Goods"/> <item type="input" name="expenses" bind="expenses" label="Expenses" offsetLeft="15"/><item type="input" name="goods" bind="goods" label="Goods" offsetLeft="15"/><item type="input" name="goodsdetails" bind="goodsdetails" label="Goods Details" offsetLeft="15"/><item type="input" readonly="true" name="balance" bind="balance" label="Balance" offsetLeft="15"/><item type="input" name="till" bind="till" label="Till" offsetLeft="15"/><item type="input" name="cash" bind="cash" label="Cash" offsetLeft="15"/><item type="input" name="debits" bind="debits" label="Debits" offsetLeft="15"/> <item type="input" readonly="tru" name="extra_short" bind="extra_short" label="Extra/Short" offsetLeft="15"/> <item type="button" xcommand="save" value="Submit" offsetTop="15"/> <item type="label" label="" offsetTop="15"/></items> What do you guys think?
  6. emailing form data

    I am creating a form that is captured and placed in an email. I have managed to do this fine with the exception of one item. when getting the value of a text area it will not maintain the user entered format. Thsi will be important when recieving the information in the email. what I need is this, when a user enters the below info in a textarea;---example---Reference line 1Reference line 2Reference line 3Reference line 4----------------- I need it to popluate in the email the same way. When I pull this infor like a normal input it comes out like this; Reference line 1Reference line 2Reference line 3Reference line 4 can anyone help? I am not able to use PHP in my environment I am working with, as I understand it now. I also do not know much about asp.net
  7. Adding a form field

    OK, I have hit a snag and I want to try and make this work if I can. I am trying to add a new text field next to a current list field based on a single selected item. can anyone help me on this? I added the segments that I want this to change. *script* function DbRole(myform){if (document.myform.Accesslevel1.value=="Database Role = "){document.myform.Accesslevel1("DbRole1").setValue(""); AddFields();}} *form* <input name="Accessgroups1" type="text" size="50"> <select name="Accesslevel1"> <option value=""></option> <option value="Read">Read</option> <option value="Write">Write</option> <option value="Read/Write">Read/Write</option> <option value="Update">Update (accounting)</option> <option value="Delete">Delete (Accounting)</option> <option value="Update/Delete (Accounting)">Update/Delete (Accounting)</option> <option onChange="DbRole()" value="Database Role = ">-Database Role-</option> (**the idea is that when this last item is selected a text field will appear next to this list field**) </select> Any help would be appreciated, I am new to this but I have already managed to set up other js that works but this one escapes me at this moment.
  8. better contact form than this

    I have been using a contact form made from the website http://www.emailmeform.com/ and I think after making the rest of my site very very nice looking in my eye this is the only bit that detracts its value as the form sends you to a page advertising there product before back to my website. Is there a better form that can hide my email and have captcha on it to prevent spam?
  9. Hello people, i need help on my HTML5 Form with javascript. I have been looking over and over at my textbook as reference to do the scripting. [some with google] However, i dont seem to be able to generate a answer out from my codes. Does anyone know why and how i can fix it?Your help is deeply appreciated! Thank you! Here are my codes <script type="text/javascript"> function CalculateMEPS() { var amt = document.getElementsByName('mepsAMT').value; var bank = document.getElementsByName('bank').value; var selectedbank = document.getElementsByName('bank').options[bank.selectedIndex].value; if (selectedbank == "DBS" || selectedbank == "OCBC" || selectedbank == "UOB") { document.getElementsByName('mepsCost').value = (amt * 0.003); } else if (selectedbank == "HSBC" || selectedbank == "SChart") { document.getElementsByName('mepsCost').value = (amt * 0.005); } else { document.getElementsByName('mepsCost').value = (amt * 0.007); } } </script> <form name="mepsCharge" action="" method="post"><fieldset><legend>Charges for MEPS</legend><label for="Amount">Amount Transferred:</label><input type="text" name="mepsAMT" id="mepsAMT" size="16" maxlength="8" /> <label for="Bank">Name of Recieving Bank</label> <select size="1" name="bank" id="bank"> <option value="DBS">DBS/POSB Bank</option> <option value="OCBC">OCBC Bank</option> <option value="UOB">UOB Bank</option> <option value="HSBC">HSBC Bank</option> <option value="SChart">Standard Chartered Bank</option> <option value="CITI">CitiBank</option> </select> <input type="button" name="Calculate" value="Calculate" onclick="CalculateMEPS()" /> <label for="cost">Total Cost of Transfer</label><input type="text" name="mepsCost" size="16"/></fieldset></form>
  10. Alternative way of aligning?

    I have a form that looks like this. I currently have it set up using two div tags. The left side is one and the right side is another. If I have my cursor in the Email Address input and press TAB, it goes to Password input. I want to set it up where it looks exactly the same, but when I press TAB, it goes to Confirm Email Address input. Basically, I am wondering how I could align my page without using separate tags, so when I press TAB, it goes to the next one.
  11. Realtime form

    Hello there. I've been trying to find useful information with google but I'm not sure what I should look for hence I've failed... Is it possible to make a form which gives results right away, without a "submit" button? Say for instance:34*X=Y X is the value you put into the "form inputbox".Y is the result. If I type 10, then klick another box then I want Y to become 340 without having to push a submit/calculate button. Is this possible? At the moment I've a form and a script on the same page. However, I've to push submit to se the results. When I submit the form is reseted. If I can't make a "realtime script" then can I have the form NOT reseting when I submit? Thanks a bunch, and sorry if I've posted in the wrong category!/W
  12. phone validation

    I want to validate the the field of a form in which the user will input his phone. So, what I must take into consideration. After some thinking, I realized that I must first be certain that the user has entered digits and not letters and second the digits must not be more or less than some number. WHat do you think? Are the above requirements sufficient or is there sth else also you want to add.
  13. Function to check for undefined?

    <form name="form" action="enter.php" method="post"> First Name: <input type="text" name="first" /><br /> Last Name: <input type="text" name="last" /><br /> <input type="checkbox" name="c1" value="1" onclick="showSubmit()" /> <input type="checkbox" name="c1" value="1" onclick="showSubmit()" /> <input type="checkbox" name="c3" value="1" onclick="showSubmit()" /> <!-- SUBMIT BUTTON HERE --> </form> If I only check the 1st and the 3rd checkbox and press the submit button, but in my enter.php, I made it check print out each of the inputs like so: <?php echo $_POST["first"];echo $_POST["last"];echo $_POST["c1"]; echo $_POST["c2"]; echo $_POST["c3"];?> I will get a warning/error claiming that the c2 is undefined. Is there a built in function that checks if something is undefined ? That way I can use a if and else statement: if is it undefined, it will print something, and if it is checked (defined), make it print something else.
  14. AJAX form submit

    hi..everyone!!!!!!!!iam trying to submit a form which has approx 10 text fields with ajax. but iam unable to write the code. please help!!!!!!!!!!!!!! in this regard thanksSuman
  15. I'm working on a site and i want to use icons to select travel modes,i have an working function but it only works with a selection input.Is there a way to modify it to be used with buttons? Thanks in advance! Function: function calcRoute() { var selectedMode = document.getElementById("mode").value; var request = { origin: thuis, destination: kabk, // Note that Javascript allows us to access the constant // using square brackets and a string value as its // "property." travelMode: google.maps.TravelMode[selectedMode] }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); } }); HTML - Select input <select id="mode" onchange="calcRoute();"> <option value="DRIVING">Driving</option> <option value="WALKING">Walking</option></select> HTML - Button input (?) <form id="mode"> <input type="button" onchange="calcRoute();" value="DRIVING"> <input type="button" onchange="calcRoute();" value="WALKING"></form>
  16. I was able to complete a live search with a T-SQL database similar to the design found here on W3Schools, though now I am running into some difficulties passing multiple arguments/parameters to the JavaScript search page. Basically, we thought it would be a good idea to let people search by just a first name or last name if they wanted, as well as searching by their affiliation. Here is an excerpt from the form that appears to be giving me the problems: <form><input type="text" name="name" id="nameID" size="40" maxlength="64" onKeyUp="showNames('nameID', 'typeID', 'firstLastID')"onblur="if (this.value == '') this.value = this.defaultValue" onFocus="if (this.value == this.defaultValue) this.value = ''"value="Enter a name or a part of a name here"> <br><select name="type" id="typeID" onChange="showNames('nameID', 'typeID', 'firstLastID')"><option value="All">Members & Staff</option><option value="Member">Member</option><option value="Staff">Staff</option></select> <br><select name="firstLast" id="firstLastID" onChange="showNames('nameID', 'typeID', 'firstLastID')"><option value="Both">First & Last Name</option><option value="First">First Name</option><option value="Last">Last Name</option></select></form> Right now the form is passing the literal names of nameID, typeID, and firstLastID when I echo the variables in a separate PHP file. I've tried single quotes (which gives the literal names), double quotes (does not work), and no quotation marks (does not work) around the arguments just to see if that was the culprit, but no luck there. Before using the ID's I had been using "this.value", though unfortunately I couldn't use that any longer once we added the additional arguments to showNames(). Finally, I tried removing all of the arguments from showNames() and collecting the data using "document.getElementByID('...').value" (where '...' is the ID) in the JavaScript function, but that didn't work either. Can anyone help me figure this out? Thank you!
  17. I'm wondering is it possible to make javascript that doesn't let the user go to example action="test.php" page if javascript says so. Example im having this javascript <script type="text/javascript">var r=confirm("Click the OK button now!");if (r==true){ alert("You pressed OK!");<!-- THIS SHOULD ALLOW THE ACTION (SO IT WOULD ALLOW USER TO CONTINUE TO ACTION PHP PAGE) -->}else{ alert("You pressed Cancel!");<!-- THIS SHOULD CANCEL THE ACTION (SO IT WOULD NOT CONTINUE TO ACTION PHP PAGE) -->}</script> So if user presses OK it allows user get to the next page and if user press cancel it doesn't let Oo found cool page with info at this http://www.htmlforums.com/client-side-scripting/t-how-to-cancel-submit-action-33810.html
  18. Making a contact form

    Hey there. I'm trying to build a contact form from scratch (using the W3Schools tutorials pretty heavily), but I'm having some issues. First off, I'd like to write in a bit of code that grabs the username of the person submitting the form, and sends it along with the other submitted information. Also, if the person isn't signed in, they won't be able to use the form. I'm sure this will involve some PHP, which I will be more than happy to do, if someone could perhaps point me in the right direction? <div id="events"><form name="event-submit" action="MAILTO:someone@example.com" method="post" enctype="text/plain">Event Name:<br /> <input type="text" name="eventname" /><br />Start Date:<br /> <input type="text" name="startdate" /><br />End Date:<br /> <input type="text" name="enddate" /><br />Location:<br /> <input type="text" name="location" /><br />Description:<br /> <input type="text" name="description" size="50" /><br /><input type="submit" value="Submit" /></form></div> (And yes, I do have my actual email address for the MAILTO property, I just omitted it for this post.) My main problem right now is, the submit button isn't working. Buttons and I do not get along, it seems...Any suggestions as to what I'm doing wrong would be greatly appreciated. EDIT Okay, I apparently left off a rather important caret. The button is working just fine now, but is there any way to make the email not go through Outlook, and go directly to the email address?
  19. action on form ?

    hi, can anyone explain to me what it's mean??i have code in the template of mibew... <form name="leaveMessageForm" method="post" action="${webimroot}/leavemessage.php"> why the action form say ${webimroot}/leavemessage.php??what it's mean??
  20. form

    to post a form i have been using...<input name="formSubmit" type="submit" value="Send" />as normel and it works good but can i submit a form from a link...<a href="#">submit</a> is this posible? if so how?
  21. Hi folks, as the lovely HTML5 coming and proving that it's an unbelievable language , I found the new technique "Geolocation" very helpful to my project. as a part of my project, I have a simple form gathering info from the user such as name , email andthe latitude and longitude of the user's position. In w3schools's example , the latitude and longitude are returned as normal text above each other :Latitude: 00.0000Longitude: 00.0000 ( not really zeros ) my question is: after clicking on a button (say get location) , the latitude and longitude coords will be automatically inserted (filled) into 2 input boxes ( visible or hidden ) to be sent to the database after submitting the Form . is it something to do with innerHTML ? how to do that ? <form action="handle_form.php" method="post"> <p>Name: <input type="text" name="name" size="20" /></p> <p>Email Address: <input type="text" name="email" size="20" /></p> <p id="demo">Click the button to get your coordinates:</p><button onclick="getLocation()">Try It</button><script>var x=document.getElementById("demo");function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else{x.innerHTML="Geolocation is not supported by this browser.";} }function showPosition(position) { x.innerHTML="Latitude: " + position.coords.latitude + "<br />Longitude: " + position.coords.longitude; }</script></form> the geolocation part code from here:http://www.w3schools...ml5_geolocation
  22. Hallo, I'm trying to add a unicode HEAVY CHECK MARK ✔ and HEAVY BALLOT X ✘ to the input:focus:valid and input:focus:invalid respectively.I don't want to use a background-image as in many samples I found online.So I tried: input:focus:invalid:after, textarea:focus:invalid:after {content:"\2716";}input:focus:valid:after, textarea:focus:valid:after {content:"\2714";} I also tried content:"X" and content:"OK" in case the problem was unicode.But this doesn't produce any result. Any idea?My documents are HTML5 and CSS.Thank you
  23. Query: how to create log in text box?

    Greetings,Hey everyone, I've had a query about how to create a form text box with some value inside that gets automatically cleared as the user clicks on it to edit it, more like this example on www.bodybuilding.com they have a sign in form at the right hand-side next to the flash slide show.. Sorry if my question is not that professional but I can't seem to know how from their source code.. Thanks for your time and effort..
  24. Textarea Ruins Footer Navigation

    Hi. I have a website using a PHP require_once template that I created myself. I required the template file in my head, and it has functions to include the header, top navigation, and footer (which includes a smaller navigation menu as well). The whole website works like a charm, except for the footer navigation on the contact page. It works perfectly fine on all other pages, as well as when I comment out the textarea on the form. I have been studying and experimenting with HTML and CSS for some time now, and have never run into this problem. If I put a link immediately after the submit button, it works fine. But the navigation in the footer is rendered as text rather than links when my form has the textarea. Here is my HTML, pulled from View Source so as to show what each PHP function is doing, rather than having to post the PHP template file as well: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><!-- Title --><title>Brink Roofing Division</title> <!-- Meta Information --><meta http-equiv="content-type" content="text/html; charset=UTF-8" /><meta name="author" content="Mark" /> <!-- Stylesheets --><link rel="stylesheet" type="text/css" href="css/style.css" /><link rel="stylesheet" type="text/css" href="css/formStyle.css" /> <!-- !IE7 Fix --> <!--[if !IE7]> <style type="text/css"> #container { display: table; height: 100%; } </style> <![endif]--></head><body><div id="container"> <div id="header"> <div class="content"> <a href='index.php'><img src='images/brinklogo.jpg' alt='Brink General Contractors' /></a> <ul id='header_nav' class='menu'> <li><a href='index.php'>Home</a></li> <li><a href='about.php'>About</a></li> <li><a href='services.php'>Services</a></li> <li><span class='current_page'>Contact</span></li> </ul> </div> </div> <div id="main"> <div class="content"> <!-- Form --> <form method="post" action=""> <!-- Name --> <div class="line"> <div class="label"> <label for="name"> Name: </label> </div> <div class="input"> <input type="text" id="name" name="name" tabindex="1" /> </div> </div> <!-- E-Mail --> <div class="line"> <div class="label"> <label for="email"> E-Mail: </label> </div> <div class="input"> <input type="text" id="email" name="email" tabindex="2" /> </div> </div> <!-- Subject --> <div class="line"> <div class="label"> <label for="subject"> Subject: </label> </div> <div class="input"> <input type="text" id="subject" name="subject" tabindex="3" /> </div> </div> <!-- Message --> <div class="line"> <div class="label"> <label for="message"> Message: </label> </div> <div class="input"> <textarea id="message" name="message" tabindex="4"></textarea> </div> </div> <!-- Submit --> <div class="line"> <div id="submit"> <input type="submit" id="send" name="send" tabindex="5" value="Send" /> </div> </div> </form> </div> </div></div> <div id="footer"> <div class="content"> <span class='left'>© Brink General Contractors <br />Website by Mark Little</span> <span class='right'> <ul id='bottom_nav' class='menu'> <li><a href='index.php'>Home</a></li> <li>|</li> <li><a href='about.php'>About</a></li> <li>|</li> <li><a href='services.php'>Services</a></li> <li>|</li> <li><a href='contact.php'>Contact</a></li> </ul> </span> </div></div></body></html> And my main CSS file: @charset "UTF-8";*{ margin: 0; padding: 0;} html, body{ margin: 0; padding: 0; height: 100%; background-color: #ffffff; font-family: Tahoma, sans-serif;}/* Div */#container{ position: relative; display: block; margin: 0 auto; min-height: 100%; width: 100%;} #header{ position: relative; display: block; margin: 0 0 -136px 0; height: 136px; border-bottom: 2px solid #0c71b7; background-color: #ffffff; z-index: 2;} #main{ position: relative; display: block; padding: 150px 0 80px 0; z-index: 1;} #footer{ position: relative; display: block; margin: -60px auto 0; height: 60px; width: 100%; background-color: #0c71b7;} .content{ position: relative; display: block; margin: 0 auto; width: 970px; overflow: auto; padding: 0 5px; height: 100%;} #footer .content div { position: relative; display: inline-block; width: 250px; height: auto; margin: 10px 0 0 0; } #footer .left { float: left; } #footer .right { float: right; } /* Navigation */ul.menu{ position: relative; display: inline; margin: 0; padding: 0; float: right; list-style-type: none;} ul.menu li{ position: relative; display: inline; margin: 0 5px 0 0; padding: 0; float: left;} ul.menu li:last-child{ margin: 0;} ul.menu li a{ position: relative; display: block; margin: 0; padding: 0; width: 100%; text-decoration: none; color: black;} /* Header Nav */ul#header_nav { position: absolute; bottom: 0; right: 5px; } ul#header_nav li, ul#header_nav li a, ul#header_nav li span { width: 100px; background-color: #0c71b7; border-top-right-radius: 5px; border-top-left-radius: 5px; } ul#header_nav li span { display: block; background-color: #000000; } img{ border: none;} /* Text */ul#header_nav li, ul#header_nav li a, ul#header_nav span{ text-align: center; text-decoration: none; color: #ffffff; font-weight: bold;} #footer, #footer a{ font-size: 12px; color: #ffffff;} #footer a:hover{ text-decoration: underline;} And my form CSS file: @charset "UTF-8";form{ position: relative; display: inline; float: left; width: 490px; height: auto;}/* Div */.line{ position: relative; display: block; width: 490px; height: auto; overflow: auto; margin: 0; padding: 15px 0 0 0;} .line:first-child{ padding: 0;} .line .label{ position: relative; display: inline; margin: 0; padding: 0; width: 60px; height: auto; float: left; clear: left; text-align: right;} .line .input{ position: relative; display: inline; margin: 0; padding: 0 0 0 10px; width: 420px; height: auto; float: left; clear: right;}/* Input */input[type="text"]{ position: relative; display: block; width: 200px; height: 20px; border: solid 2px #0c71b7; border-radius: 5px; -moz-border-radius: 5px;} textarea{ position: relative; display: block; min-width: 400px; max-width: 400px; width: 400px; min-height: 250px; max-height: 250px; height: 250px; border: solid 2px #0c71b7; border-radius: 5px; -moz-border-radius: 5px;} /* Text */label{ font-size: 14px;} input[type="text"], textarea{ font-size: 12px; font-family: Tahoma, Geneva, "sans-serif"; padding: 3px 5px 3px 5px;} input[type="text"]:focus, textarea:focus{ border: solid 2px #999999;} input[type="submit"]{ position: relative; display: block; width: 90px; height: 30px; float: right; margin: 0 5px 0 0; font-weight: bold; background-color: #0c71b7; color: #ffffff; border: 1px solid #0c71b7; border-radius: 5px; -moz-border-radius: 5px;} input[type="submit"]:hover{ background-color: #000000;} input[type="submit"]:active{ background-color: #999999;} Any help would be greatly appreciated! I have tried putting a line break after the textarea. That was the only kind of answer I found on Google. I have also tried to put the form in a fieldset, thinking that may work. Nothing seems to work except for eliminating the textarea, which isn't exactly logical. Thanks,Mark
  25. PHP Form

    Hello Guys,I am creating one simple php form all works great but I want solution for one thing.I want cc optional like I have checkbox in the form & if user click it then only it should send CC mail other wise not.Here is the code which I am using. <?php ob_start();$fromemail="No-Reply <demo@demo.com>"; // change here if you want$toemail="demo@demo.com"; // change here if you want$sub="Online Feedback"; // change here if you want$success_page_name="index.php";////// do not change in followingif($_SERVER['REQUEST_METHOD']=="POST"){$fieldnm_1=str_replace ( array("\n"), array("<br>"),trim($_REQUEST['fieldnm_1']));$fieldnm_2=str_replace ( array("\n"), array("<br>"),trim($_REQUEST['fieldnm_2'])); $contentmsg=stripslashes("<br><b><font style=color:#CC3300>$sub</font></b><br><table width=708 border=0 cellpadding=2 cellspacing=1 bgcolor=#CCCCCC><tr> <td width=165 align=right valign=top bgcolor=#FFFFFF><B>Name :</b> </td> <td width=565 align=left valign=top bgcolor=#FFFFFF>$fieldnm_1</td></tr><tr> <td width=165 align=right valign=top bgcolor=#FFFFFF><B>Email :</b> </td> <td width=565 align=left valign=top bgcolor=#FFFFFF>$fieldnm_2</td></tr></table>");////$headers = "MIME-Version: 1.0";$headers .= "Content-type: text/html; charset=iso-8859-1"; $from=$fromemail; $headers .= "From: ".$from."";$headers.= "Cc: ".$fieldnm_2.""; @mail($toemail,$sub,$contentmsg,$headers); header("Location:$success_page_name");}?> Thanks in Advance!
×