PHP - Form Times Out On Mobile
I have a form created that seems to work across most devices/connection.. but for some reason some phones, Androids specifically so far, seem to time out when the form is submitted using the mobile network. This has happened on multiple android phones. Doesn't seem to have an issue with iPhones. I also had a problem with a Surface tablet when connected to an android wireless signal.. tethering, the same phone that had the issue.
So what happens is once the form is submitted, it hangs for a while and then it'll say "No data received - Unable to load the webpage because the server sent no data. Reload this webpage Press the reload button to resubmit the data needed to load the page. Error code: ERR_EMPTY_RESPONSE" and then after i refresh, it submits and goes through without a problem. Sometimes it refreshsed by itself after flashing this error and goes through.
Another time, using the Surface Pro, wifi and IE, I got the error "Forbidden" you don't have permission to access /new-window-2.php on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
You can see an example of one of the forms here - connecttopros(dot)com/windows.php
And some of the code is attached below. I'm lost. I've tried using a different server completely, twice, and it didn't fix the issue, so it must be the way the php is put together? Thanks for your help!
Attached Files
Php Freaks.zip 12.25KB
1 downloads
Similar TutorialsHello all, I'm collecting date/time information via a form and would like to convert the info into something that I can stick in my MySql database (a timestamp???). I'm collecting the current month (variable name: month-- of the form "mm"), day (variable name: day -- of the form "dd"), year (variable name: year -- of the form "yyyy"), time of day (variable name: time -- of the form "h:00"), and before or after noon (variable name: ampm -- of the form "am" or "pm"). Any suggestions as to how to change this into a quantity that I can store as a value and then use to compare to other date/times would be appreciated. Thanks! I have a controller(generatebill.php) where I have collected all the value from the form(normaluserview.php). I can see my value is stored. But whenever I wanted to display those values in table format in another view(invoice.php in this case), it keeps repeating. For better understanding, I have uploaded the files as well.. Please help
Attached Files
generatebill.php 592bytes
2 downloads
invoice.php 31bytes
3 downloads
normaluserview.php 3.4KB
1 downloads Say I have an "Entries" table. I want to submit same multiple entries using a form submission. And If I have other queries submitted in the same form, I want those quarries to be submitted only once. Is that possible to do? Here's my code. if(isset($_POST['submit'])) { $entries = 10; $id = 55; $name = 'Smith'; $insert = $db->prepare("INSERT INTO entries(id, name) VALUES(:id, :name)"); $insert->bindParam(':id', $id); $insert->bindParam(':name', $name); $result_insert = $insert->execute(); if($result_insert == false) { echo 'Fail'; } else { echo 'Success'; } } ?> <form action="" method="post"> <input type="submit" name="submit" value="SUBMIT" /> </form> Edited January 13, 2019 by imgrooot Hi, I would like to add some advertisment banners the link to landing pages. in the regular webdevelopment I use cookies. how do I do it with mobile? does it support cookies? please enlight me. Thank you. I have a site with seperate content and design for pc and mobile devices... What is the best way to detect and serve the correct content... 1. htaccesss file to detect the devise and then serve... 2. config.php file to detect devise and then serve appropriate files?.. ... im guessing it is version 2 that way you can still allow mobile users to access the full website.... kind regards J.. Hello, How can I send SMS to mobile phone using PHP? Please point me to a tutorial for achieving this. Also, what software will be needed to do this? What doctype do i use for mobile webpages when that mobile webpage contains PHP ? I'm useing the w3c reccommended ones but the PHP doesn't work at all but if i remove the php then all is fine..is there a way to combine the two? Hi, I am bit confused as never done mobile website.
I was thinking we have to use jquery to create a website into mobile.
is it possible we can use only php/mysql and html?
Is it mean that mobile website is smaller version or is it mean we have to use some certain technologies like jquery, html5.
How google/other search engines will know this is mobile version and other is general website for computers.
I was thinking differently but today i donwload free version of mobile website and in coding they only used html css? what about php can we use it too without jquery for database.
sorry to ask realy basic question. I am trying to create a first mobile website.
any advice / hints will be much appreciated.
Hi I am trying to create a site that determines the device's screen size. Most mobile phone browsers does not have javascript, so to determine the width and height of the screen I cannot use Javascript. Does anyone know how i can test whether a mobile phone is used to visit the site and what that phone's screen resolution is, so that I can redirect it to the right folder. Thanks in advance Hey gues, My question is: how is the easy'est way to redirect i mobile visitor to: mobile.domain.com, when visiting: domain.com? Thanks:). If any of you have developed mobile apps before I could really use some advice, please. I have never made one, and would like to for my website. I just need to query my database and display the information. From what I have been able to put together so far, I know that I can use css and jquery fine. My main question is: can I use php to query the mysql database? Pretty much I am a novice, so if using these languages together will not work, please feel free to suggest combinations that would be better. Although, I am trying to avoid as much object oriented stuff as I can, because I just don't get it entirely, but I'll still take the suggestion. Thanks. Hi everyone This is not really about php code...sorry. But i want some advice if you dont mind. I am working on a system, but i would like it to be available for PC use, aswell as for mobile use. What would be the best? To create two websites, one for mobile other for PC, and upload them to .mobi and .com domains, or should i create only one... I need this to be as user-friendly as possible...because the clients who are going to use this, is those ppl that is not comfortable with a PC, not to mention the web. Thanks Hoping someone can help me i know very little about php anyways i am trying to get this to work on my eccommerce site which is all in php. Here is the instructions i have i did upload the files all i need help with is where to put the single line of code for the redirect. Installation 1. Create a subdomain on your server called 'm'. (Ex: m.example.com) * Depending on what kind of hosting you have, the procedure to do this may be either editing configuration files and restarting the server, accessing a control panel, or having a system administrator set it up. 2. Upload the files from the 'm' directory to the document root for your new subdomain. 3. Your mobile site is working! Just visit your m subdomain to see it. Setting up auto redirect If your website is in PHP, you can use phpMobilizer to set up automatic redirection to your mobile site for mobile devices. 1. First you will need to determine where to place the redirect code. Usually you would want to place it in a common include file, such as a config file, a database connection file or a header file. 2. Add the following line of code before any html or text output. * require_once('/home/path/to/subdomain/m/mobilize.php'); * Edit the path so it is pointing directly to the mobilize.php file, which will be in the subdomain's document root. 3. Visit your website with a mobile device and verify it redirects you! Hi I got a different and typical (for me) requirement from client. Client have a mobile. He will upload XML file from his mobile to my web address (http://111.111.111.111:8080/directoryname/ In my web address, i have to fetch that request (means take XML file) and insert those details into database by using php. Can anyone tell me how can i do this? Hey everyone! I'm an absolute beginner with PHP but in my struggle with a project, I keep seeing 'PHP' so here I am, asking for help from the experts. I have a client who wants a basic 'mobile version' of their website to be displayed automatically when people view it on a mobile device (iPhone, Android especially). I've tried a couple of JavaScript solutions but, for some reason, they wouldn't work on Android (despite the author of the code specifying that it 'should do'). This has led me to look into a server-side solution. If the user visits the site, e.g. www.mysite.com on a mobile device, I want it to redirect to the subdomain m.mysite.com (I could even use www.mysite.com/mobile). On this 'mobile version' there should be a link to view the full site (and vice versa). Does anyone know of any tried and tested methods to achieve this? I'm literally pulling my hair out now with this. Thank you so much in advance. Have a great day. Regards Darryl Hi, how can i detect if my website is being open in mobile type all devices instead of computer Please help I have some videos stored above web root. I then have a PHP file that acts as a proxy to hand the videos to the user. The reason for this is so not just anybody can download the videos. They have to be authenticated. If I am on the PC, it prompts for a download so I know the script is working. When I try it on my iPad, I get the big play button but with a cross through it. When I try it on my iPhone, the movie interface loads, but I am then prompted with "Cannot play movie: The server is not correctly configured" What could that be referring to? My script is below: <?php include("config.php"); //just includes session_start and db connection if ($_SESSION['user']['authed'] == true) { session_write_close(); $id = $_GET['id']; $query = mysql_query("SELECT filename FROM episodes WHERE id = '$id'"); $row = mysql_fetch_array($query); $filename = "../../media/".$row['filename']; header( 'Content-Description: File Transfer' ); header( 'Content-Type: application/octet-stream' ); header( 'Content-Disposition: attachment; filename='.basename( $filename ) ); header( 'Content-Transfer-Encoding: binary' ); header( 'Expires: 0' ); header( 'Cache-Control: must-revalidate, post-check=0, pre-check=0' ); header( 'Pragma: public' ); header( 'Content-Length: ' . filesize( $filename ) ); ob_clean(); flush(); readfile( $filename ); exit; } ?> Hello, Supposing I have site dealing in online money transfer, how do I extend the access to users with low grade mobile phones without GPRS. I would want a user to be able to transfer money online using a just about any handset however primitive. This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=355495.0 As the title says, on any mobile device, display: none; does not work. It will work when the CSS file is cached, however, when you refresh the URL (in any browser this will request a new version of the file) it appears that it will ignore display: none; calls. I tested this on several emulators.
I read somewhere that using both display: none; and visibility: hidden; worked, but I have not seen results for this.
Has anyone come across this before, or know a fix/work-around?
|