PHP - Form Not Displaing On Iphone But Does On Desktop And Other Mobiles
Hi,
I have a booking form that displays fine on a desktop and other mobile devices, except on an iPhone 5. Does anyone know what could cause this? I know javascript is working on the iPhone, but not sure why the form isnt displaying.
Thanks
Similar TutorialsI have 3 basic questions. I did a few Google Searches for this data and could not find anything substantion. What options are available to somewho who wants to send notifications to a Desktop PC (main thing), Android phone, and maybe a few other phone types. The main thing I need to figure out is about desktop notifications. I heard that GMail was about to release this feature soon, so I know there must be options out there for it. Are there any options, besides a standard custom desktop application development? What are your feelings regarding Linux desktop distros, and their ability to break through to mainstream usage? I started using Ubuntu about 6 or 7 years ago, and have fooled around with some other distros, but at least for me Ubuntu always seemed the best. I've got my 65 year old mom using it, and my 11 year old son playing with Kubuntu (and learning python!). I don't really consider us normal though; normal being almost too dumb to do more than check email and get on the internet.
I've managed to fully switch over to Ubuntu on all of my computers, with the exception of running Windows in a VM for Photoshop and Illustrator. Since I don't use those programs every day, there are a lot of days where I don't see Windows. I never really had a problem with Windows, except for Windows 3.1 was kind of a drag. Getting on the internet on a 56K modem on Windows 95 wasn't any fun either, but that wasn't Windows' fault. I never had the crashes and bad experiences people like to claim makes Windows suck. My main reason for abandoning Windows is just to be more involved with Linux, and hopefully reach Linux guru status someday.
I really never liked Macs. I bought one 3 or 4 years ago, and it just felt like I was paying a lot of money for a glorified (and over-hyped) linux distro. I really never liked the feel of the Finder. At the time there was no awesome text editor, and I bought a couple just to test out what I could find. Unlike Windows and Linux, it seemed like nothing is free in the Mac world. I eventually gave the Mac away. We couldn't be friends.
I'd really like to see Linux become the dominant OS. It's exciting to see how far Ubuntu has come in the years that I've used it, and I evangelize for Linux/Ubuntu quite a bit. Even still, it can sometimes seem that I am a stranger in a strange world. Do you think we can count on Linux being a bigger part of mainstream computing? One of the problems I see is that there are so many distros that a person investigating Linux may be a little overwhelmed. What do you think is keeping the masses from using Linux desktops?
This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=334031.0 Hi all
I am using media queries in my css to create a responsive site, when I view the site on a mobile, the site responds as I intend it to.
However if I view it on a desktop and resize the screen, it doesn't respond as I would like, the idea is, if I resize the desktop version enough then I will view the mobile version.
in one css file I have
@media screen and(max-width: 1024px) { css styles }and then on another file, I have the following, the idea with this is when I get below the specified screen size the items don't show @media screen and (min-width: 1024px) { }if you need any more info let me know. Thanks Mark Hello folks, So, not sure where to start, but I'm wondering if it's at all possible to change a prepared statement / sql based on whether or not we're displaying for desktops, or for smartphone/tablets? I'm not sure what to start looking at since I'm pretty new in PHP and all... I've managed to figure out how to change CSS if I'm on phone @media only screen and (max-width: 767.98px){ // PUT CSS FOR PHONES... } Any directions on how I would change my SQL, would be awesome! I'd like to narrow down the columns returned if I'm on phone, otherwise breaks my pages looks too much... Much thanks in advance! Pat
Hi, I am new trying to make a simple test iPhone app that reads data from a MySql server via php get method. As a test I used a 'film' database but soon realised that if the get method contains two words '%20' is added to the middle. As a workaround, I tried: if (strpos($_GET['film'], '%20') !==false) $film = str_replace("%20", " ", $_GET['film']; else $_GET[film]=$film; and then appending $film to the end of my sql query. I have tried many variations of this but cannot get it to work! Any advice would be much appreciated. Niall Is it possible to retrieve a visitor's iPhone device id? If so, how? If it's not possible, do all iPhones accept cookies? Hello guys, hope you are doing good. I urgently need your help at a point where I am stuck. I have created this form and applied some css to it. If I am viewing that form using Google Chrome, it looks perfectly fine but when I am viewing it using IE9 or Mozilla or viewing it on my iPhone, the whole border, button etc. gets messed up. Anybody knows how I can fix this so that it looks completely fine no matter if one is viewing it using any browser? The form can be viewed over here http://sigmalogistix.com/index3.php and this is the code: Code: [Select] <html> <head> <title>Login - Sigma Logistics</title> <style type="text/css"> form { padding:5px 450px; } img { padding:20px 521px; } a:link { color:#43759b; text-decoration:underline; } a:visited { color:#43759b; text-decoration:underline; } a:hover { color:#43759b; text-decoration:underline; } a:active { color:#43759b; text-decoration:underline; } a.otherLink:link { color:#43759b; text-decoration:none; } a.otherLink:visited { color:#43759b; text-decoration:none; } a.otherLink:hover { color:#43759b; text-decoration:underline; } a.otherLink:active { color:#43759b; text-decoration:none; } label { width: 12.2em; float: left; text-align: right; margin-right: 0.5em; display: block } .submit input { margin-left: 10.5em; } input { color: #47596e; background: #fee3ad; border: 1px solid #47596e; margin-left: 3.6em } .submit input { color: #000; background: #ffa20f; border: 2px outset #d7b9c9 } fieldset { border: 2px solid #47596e; width: 21em -moz-box-shadow: 0px 5px 12px #cdd0cc; box-shadow: 0px 5px 12px #cdd0cc; } legend { color: black; background: #ffa20c; border: 2px solid #47596e; padding: 2px 6px } </style> </head> <img src="http://sigmalogistix.com/wp-content/uploads/2012/02/Untitled-22.png" /> <form action='login.php' method='POST'> <fieldset> <legend>Track & Trace</legend> <p><label for="username"><font face="Arial" size="2">Username</font></label> <br><input type="text" name="username" size="35" /></p> <p><label for="password"><font face="Arial" size="2">Password</font></label> <br><input type="password" name="password" size="35" /></p> <p class="submit"><input type="submit" value="Log in" /></p> <a href='http://www.sigmalogistix.com'>← <font size="2" face="Arial">Back to Sigma Logistics</font></a> </fieldset> </form> </html> This is how it looks when I view it using Google Chrome 19 (everything's perfect). This is how it looks when I view it using Firefox 12 (notice that the shadow behind the form is misaligned). This is how it looks when I view it using IE9 (everything's misaligned ) And this is on iPhone's Safari browser. Please help me guys, thanks. Hi everybody
I want to put this code (or something like that) in my index.php to redirect the iPhones etc.
But where do I have to put it in? In the head or body?? And how can I call this function?
Thanks a lot for helping a beginner!
function ismobile(){ $useragent = $_SERVER[‘HTTP_USER_AGENT’]; // Standard vendor-model/version user agents if(preg_match(‘/^((ACER¦Alcatel¦AUDIOVOX¦BlackBerry¦CDM¦Ericsson¦LG\b¦LGE¦Motorola¦MOT¦NEC¦Nokia¦Panasonic¦QCI¦SAGEM¦SAMSUNG¦SEC¦Sanyo¦Sendo¦SHARP¦SIE¦SonyEricsson¦Telit¦Telit_mobile_Terminals¦TSM)[- ]?([^\/\s\_]+))(\/(\S+))?/’, $useragent)){ return true; }else{ return false; } } This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=347457.0 Hello, I have a very big problem with stolen data and i don't know how to STOP that. The situation : I have a website where i spend lot of time to register events and info on events (something like www.CoolEvents.com) Users can log in and then comment events, and do others actions when logged. The PROBLEM : Someone created AN IPHONE APPLICATION that is an EXACT copy of my website, and is name CoolEvent App !!! Same infos, same comments, and you can log in via this app (parsing my site) and post comment on my website ! It's horrible for me, because 40% of my users now used this application (who earn money by displaying advertising). So i losed 40% of visitors !!! Without using legal channels, how can i STOP an IPHONE APP to parse my website or to acces to my website ? Do you know a TECHNICAL solution to prevent an APP to PARSE and then copy my website ? At least, is it possible to made it IMPOSSIBLE to log in to my website (and so be able to post comment on my site) by using this APP ? Thanks for your help !! Hey guys I'm using a php based form for my website to take contact information and an attachment from a user and it sends it to my company email address. All the email account information is correct because when I open the message up in Microsoft Outlook I get the information and the attachments. However, when I try to open up the message on my iPhone 4, I just get information with no attachments. I frequently check my email from my iPhone because sometimes I am not able to make it to my computer to use Outlook. I would really like for this to work and would appreciate any help you guys have. Not sure if it is needed but here is the code for the from I use: <?php //turn off error reporting --easily commented out for development, but keeps site visitors from seeing any random thrown errors error_reporting(0); // specify the recipients and subject $to = "test@mywebsite.com"; $subject = "Someone Has Requested A Quote"; //grab all our vars from the form extract($_POST); //build the body of the message from the form $body = " The Quote Requested Name: $fname $lname Company: $company Phone Number: $phone Ext: $phoneext Description: $description Best time to call: $call "; //Let's start our headers $headers = "From:noreply@mywebsite.com\r\n"; //$headers .= "Reply-To:PUT_YOUR_EMAIL_ADDRESS_OR_VARIABLE_HERE\r\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/related; type=\"multipart/alternative\"; boundary=\"----=MIME_BOUNDRY_main_message\"\n"; $headers .= "X-Sender:noreply@mywebsite.com\r\n"; $headers .= "X-Mailer: PHP5\n"; $headers .= "X-Priority: 3\n"; //1 = Urgent, 3 = Normal //$headers .= "Return-Path:PUT_YOUR_EMAIL_ADDRESS_OR_VARIABLE_HERE\r\n"; $headers .= "This is a multi-part message in MIME format.\n"; $headers .= "------=MIME_BOUNDRY_main_message \n"; $headers .= "Content-Type: multipart/alternative; boundary=\"----=MIME_BOUNDRY_message_parts\"\n"; $message = "------=MIME_BOUNDRY_message_parts\n"; $message .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n"; $message .= "Content-Transfer-Encoding: quoted-printable\n"; $message .= "\n"; /* Add our message, in this case it's plain text. You could also add HTML by changing the Content-Type to text/html */ $message .= "$body\n"; $message .= "\n"; $message .= "------=MIME_BOUNDRY_message_parts--\n"; $message .= "\n"; /*deal with mulitple attachments */ foreach($_FILES as $file => $value) { $_tmpname = $_FILES[$file]['tmp_name']; $_filename = $_FILES[$file]['name']; if (is_uploaded_file($_tmpname)) { //Do we have a file uploaded? $fp = fopen($_tmpname, "rb"); //Open it $data = fread($fp, filesize($_tmpname)); //Read it $data = chunk_split(base64_encode($data)); //Chunk it up and encode it as base64 so it can emailed $message .= "------=MIME_BOUNDRY_main_message\n"; $message .= "Content-Type: application/octet-stream;\n\tname=\"" . $_filename . "\"\n"; $message .= "Content-Transfer-Encoding: base64\n"; $message .= "Content-Disposition: attachment;\n\tfilename=\"" . $_filename . "\"\n\n"; $message .= $data; //The base64 encoded message $message .= "\n\n"; fclose($fp); } } $message .= "------=MIME_BOUNDRY_main_message--\n"; // set specific SMTP for this message - you may not need this, but I have to manually set the SMTP because it is not localhost ini_set('SMTP','mail.mywebsite.com'); // send message to recipients @mail( $to, $subject, $message, $headers ); // redirect to thank you page after sending email header("Location: http://www.mywebsite.com/quoteComplete.html"); ?> I tried both of these articles, I have a windows 8.1 tablet and both of the different "codes" worked but I tried my friend's iPhone and the camera viewport is just a black square or doesn't show at all... the problem seems to be that the pop up where you push "allow" or "deny" doesn't show up at all, this makes me think the trigger isn't "triggered".
These are the sites
I'm using HTML5 and Javascript, didn't do much modifcation yet, I just needed the basic web cam access, cropping, saving functions at the moment.
http://davidwalsh.name/browser-camera
http://mycodingtrick...ipt/webcam-api/
I want to build a online "app builder" project that users can create android / iphone applications online without any coding knowledge. These sites are very common in market. They offer onclick app builder. I have skill in development of web applications using php frameworks. My question is How we can generate android apk from our server after getting the necessary information from user? (Appname, icon, packagename etc) PHP can do this entire task?, if yes any framework for that? Can you give me some basic tips to generate apk from our server? Can we genrate both android and iphone app from one single code? What are the requirements needed for the server? Anybody having skills in these areas, please help me. I need basic tips to get started this project. Thanks Hi Guys,
I have a navigation menu that works great on a desktop however on a mobile or touch screen device the navigation menu doesn't seem to pause when i click on the drop down menu. Any help with a solution to this?
index.php with menu
<div class="header"> <div class="nav"> <ul class="drop-menu"> <li><a class="first current" href="#"><span class="first-border-left"> </span>home</a></li> <li><a href="#" title="About Us">about us</a> <ul> <li><a href="#" title="Latest News">Latest News</a></li> <li><a href="#" title="Why choose us">Why choose us</a></li> <li class="end"><a href="#" title="Mission Statement">Mission Statement</a></li> </ul> </li> <li><a class="last" href="#" title="Contact Us"><span class="first-border-right"> </span>Contact Us</a></li> </ul> </div> </div>css file .header .nav {min-height:58px; position:absolute; top:193px; z-index:6;} .drop-menu { margin:0 0 0 0px; padding:0 0 0 0px; list-style: none; width:940px; font-size:14px; line-height:58px; text-transform:uppercase; } .drop-menu li a { text-decoration:none; color:#fff; font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; width:146px; text-align:center; display:block; border-right:1px solid #616161; background:url(menu-tail.gif) 0 0 repeat-x #0c2362; } .drop-menu li a:hover { color:#fff; background:url(menu-hover.gif) 0 0 repeat-x #0c2362; } .drop-menu li.dropHover a { background:url(menu-hover.gif) 0 0 repeat-x #0c2362; } .drop-menu a.current { color:#3e3e3e; background:url(menu-active.png) 0 0 repeat-x #d8d6d6; border-top:none; } .drop-menu li.dropHover a.current { color:#3e3e3e; background:url(menu-active.png) 0 0 repeat-x #d8d6d6; } .drop-menu ul { position: absolute; top: -999em; background:url(submenu-tail.png) 0 0 repeat !important; } .drop-menu ul li { width: 100%; } .drop-menu li:hover { visibility: inherit; } .drop-menu li { position: relative; background:none; float:left; line-height:58px; height:58px; } .drop-menu li li { font-size:12px; height:40px; line-height:40px; background:url(menu-spacer.gif) center bottom no-repeat; } .drop-menu li .end { border:none; background:none; } .drop-menu li li a { font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; font-weight:bold; color:#fff; line-height:40px; height:40px; width:188px; overflow:hidden; display:block; border:none; background:none !important; } .drop-menu li li li { height:34px; line-height:34px; } .drop-menu li li a:hover, .drop-menu li li.dropHover a { color:#038ee7; } .drop-menu li li li a { height:34px; width:200px; font-size:12px; padding:0; margin:0; color:#fff !important; text-align:center; line-height:34px; border:none; background:url(menu-spacer.gif) center bottom no-repeat; } .drop-menu li li li a:hover { color:#038ee7 !important; } .drop-menu li li li li { height:34px; line-height:34px; } .drop-menu li li li li a { height:34px; width:200px; font-size:12px; padding:0; margin:0; color:#0c2362 !important; text-align:center; line-height:34px; border:none; background:url(menu-spacer.gif) center bottom no-repeat; } .drop-menu li li li li a:hover { color:#038ee7 !important; } .drop-menu a { display: block; position: relative; } .drop-menu li:hover ul, .drop-menu li.dropHover ul { left: -1px; top: 58px; z-index: 99; } ul.drop-menu li:hover li ul, ul.drop-menu li.dropHover li ul { top: -999em; } ul.drop-menu li li:hover ul, ul.drop-menu li li.dropHover ul { left: 188px; top: 0; } ul.drop-menu li li:hover li ul, ul.drop-menu li li.dropHover li ul { top: -999em; } .drop-menu .first { width:84px; border-right:1px solid #616161; position:relative; } .drop-menu .first span.first-border-left { width:6px; height:58px; float:left; background: url(nav_left.png) top left no-repeat; } .drop-menu .last span.first-border-right { width:6px; height:58px; float:right; background: url(nav_right.png) top right no-repeat; } .drop-menu .last { width:120px; border-right:none; position:relative; } How can I recover deleted iphone contacts?
So whether I am uploading an image through my iphone or sending that image to my computer and uploading it from the computer, it has the same effect. If I upload that image, it'll orient the image in landscape mode. Having said that, I found a function that can fix the orient issue. The problem is I don't know the proper way to integrate it into the image upload script. I have tried several different ways but they all give me errors. Can you show me where exactly I should use this function? // IMAGE ORIENTATION function getOrientedImage($imagePath) { $image = imagecreatefromstring(file_get_contents($imagePath)); $exif = exif_read_data($imagePath); if(!empty($exif['Orientation'])) { switch($exif['Orientation']) { case 8: $image = imagerotate($image,90,0); swapHW(); break; case 3: $image = imagerotate($image,180,0); break; case 6: $image = imagerotate($image,-90,0); swapHW(); break; } } return $image; } // IMAGE UPLOAD SCRIPT if(isset($_FILES['fileToUpload']) AND !empty($_FILES['fileToUpload']["name"])) { if(is_uploaded_file($_FILES['fileToUpload']["tmp_name"])) { $target_dir = '../members/images/'.$global_user_id.'/projects/'.$url_project_id.'/'; $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION); $source_file = $_FILES["fileToUpload"]["tmp_name"]; $random_name = generateRandomString(10); $new_image = $random_name . '.' . $imageFileType; $resized_image = compressImage($source_file, $new_image, 50); $new_file_path = $target_dir . $resized_image; if(!is_dir($target_dir)){ mkdir($target_dir, 0775, true); } $uploadOk = 1; // Check if image file is a actual image or fake image $check = getimagesize($source_file); if($check !== false) { // echo "File is an image - " . $check["mime"] . "."; $uploadOk = 1; } else { $errors[] = 'File is not an image!'; $uploadOk = 0; } // Check if file already exists if (file_exists($target_file)) { $errors[] = 'Sorry, file already exists!'; $uploadOk = 0; } // Check file size if ($_FILES["fileToUpload"]["size"] > 5000000) { $errors[] = 'Sorry, your file size is bigger than 5mb!'; $uploadOk = 0; } // Allow certain file formats if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" && $imageFileType != "gif" && $imageFileType != "JPG" && $imageFileType != "PNG" && $imageFileType != "JPEG" && $imageFileType != "GIF") { $errors[] = 'Sorry, only JPG, JPEG, PNG & GIF files are allowed!'; $uploadOk = 0; } // Check if $uploadOk is set to 0 by an error if($uploadOk == 0) { $errors[] = 'Sorry, your file was not uploaded!'; // if everything is ok, try to upload file } else { if(rename($new_image, $new_file_path)) { echo 'success'; } else { $errors[] = 'Sorry, there was an error uploading your file!'; } } } else { $errors[] = 'You must upload an image!'; } } Edited December 23, 2019 by imgrooot I have a notification system that notifies users of new comments, inside the email I have images, some of the logo, some of different people, everything shows up fine on my computer (yahoo email), however in the iPhones email application no images show up, there are just the blue squares with the question marks in them. I'm not sure what I'm missing. Code: [Select] $from = "Kithell <notifications@kithell.com>"; $headers = "From:" . $from ."\r\n"; $headers .= 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $subject = name($from_id, 'fl').$action; $message = '<html><body> <style>@charset "utf-8"; /* CSS Document */ .e-container { background-color: #FFF;position: relative;width: 90%;min-height:1px;margin-right: auto;margin-left: auto; } .e-container .e-m-header { padding: 2px; background-image: url(http://www.kithell.com/assets/tall-grey-header.png); background-repeat: repeat-x; border: 1px solid #CCC; background-position: bottom; display: block; text-align: center; } .e-container p { font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; color: #666; vertical-align: text-top; display: inline-block; } .e-container .e-usr-photo { display: inline-block; margin: 10px; float: left; background-color: #F4F4F4; } .e-container p a { font-weight: bold; color: #3F60A3; text-decoration: underline; padding: 0px; float: left; margin-top: 0px; margin-right: 5px; margin-bottom: 0px; margin-left: 0px; } .e-container .e-quotes { font-size: 20px; font-weight: bold; color: #999; font-family: Tahoma, Geneva, sans-serif; display: block; padding: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 75px; margin-top:10px; } .e-container .e-message { font-size: 13px; color: #333; padding: 0px; margin-top: 0px; margin-right: 10px; margin-bottom: 0px; margin-left: 10px; clear: none; display: inline; }</style> <div class="e-container"><div class="e-m-header"><img src="http://www.kithell.com/assets/kithell-logo.png" /></div><img class="e-usr-photo" src="http://www.kithell.com/'.photo($from_id, 55).'" /><br /><p><a target="_blank" href="http://www.kithell.com/#/profile&id='.$from_id.'">'.name($from_id, "fl").' </a> '.$action.'<div class="e-quotes">"<p class="e-message">'.nl2br(htmlentities(stripslashes($message))).'</p>"</div></p></div></body></html>'; mail($to,$subject,$message,$headers); Hello, I have coded a contact form in PHP and I want to know, if according to you, it is secure! I am new in PHP, so I want some feedback from you. Moreover, I have also two problems based on the contact form. It is a bit complicated to explain, thus, I will break each of my problem one by one. FIRST:The first thing I want to know, is if my contact form secure according to you: The HTML with the PHP codes: Code: [Select] <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { //Assigning variables to elements $first = htmlentities($_POST['first']); $last = htmlentities($_POST['last']); $sub = htmlentities($_POST['subject']); $email = htmlentities($_POST['email']); $web = htmlentities($_POST['website']); $heard = htmlentities($_POST['heard']); $comment = htmlentities($_POST['message']); $cap = htmlentities($_POST['captcha']); //Declaring the email address with body content $to = 'alithebestofall2010@gmail.com'; $body ="First name: '$first' \n\n Last name: '$last' \n\n Subject: '$sub' \n\n Email: '$email' \n\n Website: '$web' \n\n Heard from us: '$heard' \n\n Comments: '$comment'"; //Validate the forms if (empty($first) || empty($last) || empty($sub) || empty($email) || empty($comment) || empty($cap)) { echo '<p class="error">Required fields must be filled!</p>'; header ('refresh= 3; url= index.php'); return false; } elseif (filter_var($first, FILTER_VALIDATE_INT) || filter_var($last, FILTER_VALIDATE_INT)) { echo '<p class="error">You cannot enter a number as either the first or last name!</p>'; return false; } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) { echo '<p class="error">Incorrect email address!</p>'; return false; } elseif (!($cap === '12')){ echo '<p class="error">Invalid captcha, try again!</p>'; return false; } else { mail ($to, $sub, $body); echo '<p class="success">Thank you for contacting us!</p>'; } } ?> <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post"> <p>Your first name: <span class="required">*</span></p> <p><input type="text" name="first" size="40" placeholder="Ex: Paul"/></p> <p>Your last name: <span class="required">*</span></p> <p><input type="text" name="last" size="40" placeholder="Ex: Smith"/></p> <p>Subject: <span class="required">*</span></p> <p><input type="text" name="subject" size="40" placeholder="Ex: Contact"/></p> <p>Your email address: <span class="required">*</span></p> <p><input type="text" name="email" size="40" placeholder="Ex: example@xxx.com"/></p> <p>Website:</p> <p><input type="text" name="website" size="40" placeholder="Ex: http//:google.com"/></p> <p>Where you have heard us?: <span class="required">*</span></p> <p><select name="heard"> <option>Internet</option> <option>Newspapers</option> <option>Friends or relatives</option> <option>Others</option> </select></p> <p>Your message: <span class="required">*</span></p> <p><textarea cols="75" rows="20" name="message"></textarea></p> <p>Are you human? Sum this please: 5 + 7 = ?: <span class="required">*</span></p></p> <p><input type="text" name="captcha" size="10"/></p> <p><input type="submit" name="submit" value="Send" class="button"/> <input type="reset" value="Reset" class="button"/></p> </form> SECOND PROBLEM:If a user has made a mistake, he gets the error message so that he can correct! However, when a mistake in the form occurs, all the data the user has entered are disappeared! I want the data to keep appearing so that the user does not start over again to fill the form. THIRD: When the erro message is displayed to notify the user that he made a mistake when submitting the form, the message is displaying on the top of the page. I want it to appear below each respective field. How to do that? In JQuery it is simple, but in PHP, I am confusing! Hello, first time poster.. I've looked the web over for a long time and can't figure this one out. - Below is basic code that successfully checks MySQL for a match and displays result. I was debugging and forced the "height" and "width" to be 24 and 36 to make sure that wasn't the problem. That's good.. - I'd like to give the user ability to select width and height from a form.. and have it do an onchange this.form.submit so the form can be changing as fields are altered (thus the onchange interaction) - In a normal coding environment I've done this numerous times with no "Page cannot be displayed" problems. It would simply change one select-option value at a time til they get down the form and click submit... but in WordPress I'm having trouble making even ONE single onchange work! - I've implemented the plugins they offer which allows you to "copy+paste" your php code directly into their wysiwyg editor. That works with basic tests like my first bullet point above. - I've copied and pasted the wordpress url (including the little ?page_id=123) into the form "action" url... that didn't work... tried forcing it into an <option value=""> tag.. didn't work. I'm just not sure. I've obviously put xx's in place of private info.. Why does this form give me Page Cannot Be Displayed in WordPress every time? It won't do anything no matter how simple.. using onchange.. Code.. $con = mysql_connect("xxxx.xxxxxxx.com","xxxxxx","xxxxx"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("xxxxxx", $con); $myprodwidth=24; $myprodheight=36; $result = mysql_query("SELECT * FROM product_sizes WHERE prodwidth='$myprodwidth' and prodheight='$myprodheight'"); while($row = mysql_fetch_array($result)) { echo $row['prodprice']; } mysql_close($con); <form method="post" action=""> <select name="myheight" onchange="this.form.submit();"> <option selected="selected" value="">select height</option> <option value="xxxxxxxxx.com/wordpress/?page_id=199&height=36">36</option> <option value="xxxxxxxxx.com/wordpress/?page_id=199&height=36">48</option> </select> |