Jump to content

Search the Community

Showing results for 'detecting mobile device'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

  1. If you want to hire the best iOS mobile app development company in the United States to make your brand more prominent in the digital space, then Zazz is a service provider you can always count on. Even though it is not very complicated to hire top agencies or connect with the best application developers, our team has expertise in iPhone and iPad app development which makes us a reliable iOS app development team.
  2. We have two DIVs created in WP Bakery. Left and right. On a phone I want to change the width of the right DIV, so it is 85% or so, but centre it, so there is the equal space left and right. Since it is Float: Right, I can't do that. Even wtih a Margin Left/Right auto, it just nudges to the left. How do I override it so on a phone, it snaps to the middle, wtih 85% width? Thanks
  3. This is what I've done in the past, but it still allowed the NULL category to be a viable option (especially on a mobile device). I want something similar to an <optgroup> that is viewable prior to closing the drop-down.
  4. If you can create CSS rules that target mobile devices then you can create CSS rules that target desktops...
  5. I have a row of 2 columns. Left is an image, right is text. The image is cropped at the bottom, so when it gets to the width of a smaller device, I want to swap them over, so that they go 1/1 on each col, and the image is under the text. I tried Flex, but that forces it to be 50/50 width. I'm sure in CSS it is easy, but can't figure it out. Hope someone can help. I have tried this: @media only screen and (max-width: 950px) { #flex { display: flex!important; flex-flow: column!important; } #flex .grve-row { display: flex!important;} #left { order: 1!important; } #right { order: 2!important; } }
  6. Can you demo this somewhere like jsfiddle, if it's not already visible somewhere? You should be able to resize your browser to mobile proportions to trigger the effect, or if you're using... dated design practices, enable its "emulation mode" or whatever to simulate a mobile browser. The scrollbar will be not just because of content but because of bounding boxes: if you have content way off to the side, overflow-x can hide the content, but that won't matter if the element isn't bound by its width such that it actually has overflowing content.
  7. two problems - 1) you don't have php's error_reporting set to E_ALL (it should always be this value) and display_errors set to ON, preferably in the php.ini on your system, so that php will help you by reporting and displaying all the errors it detects, and 2) once you do that, you will get a php error about the 1st argument being a string instead of a datetime (Interface/immutable) object. to use date_format() you must first create a datetime object from the fetched value - $DD = new datetime($row["OrderDate"]); echo $FormattedDate = date_format($DD,'d-m-Y H:i');
  8. did you read the replies in your previous thread? they went into great detail what changes you will need to make to the database specific code and to your code in general. you should be updating and testing your code on a localhost development system, xampp or similar. constantly uploading files to a remote server to see the result of each change is huge waste of time. to get php to help you, by reporting and display all the errors it detects, you need to set php's error_reporting to E_ALL (it should always be this value) and set display_errors to ON. these settings should be in the php.ini on your development system. when you put these settings into your code, they won't do anything for a fatal parse/syntax errors because your code never runs in this case to cause the settings to take effect. when you move your tested code to the live server, you would have display_errors set to OFF, and log_errors set to ON, so that all php detected errors will get logged.
  9. We want to push some very large, like 11em font text off the screen. It's fine off to the left, no scroll. But when it goes off the right, ona. mobile, the entire browser will shift across, to reveal the rest of the text. How do you stop that? overflow-x: hidden; doesn't do it. Simon
  10. When I click start I get this error Status change detected: stopped 16:03:16 [mysql] Error: MySQL shutdown unexpectedly. 16:03:16 [mysql] This may be due to a blocked port, missing dependencies, 16:03:16 [mysql] improper privileges, a crash, or a shutdown by another method. 16:03:16 [mysql] Press the Logs button to view error logs and check 16:03:16 [mysql] the Windows Event Viewer for more clues 16:03:16 [mysql] If you need more help, copy and post this 16:03:16 [mysql] entire log window on the forums In general, no one can figure out this PHP, as I understand it, errors pop up on their own on elementary things, is this solvable, or is there another language where this does not happen?
  11. Having an issue with a form working on a Windows server but not on a Linux box. Session Variables initialized in one form do not appear to be available in another. Index1 submits input to as1.php. as1.php assigns input to session variables, then calls au1.php. au1.php detects any errors and sets an error message index and returns to index1.php. Index1.php displays error message and should contain the session variable values but they are empty. This works correctly on a Windows system, but not on the Linux box.
  12. Techanic Infotech is a versatile software development company renowned for its comprehensive service offerings. Specializing in web development, mobile app development, ewallet app development company, and custom software solutions, the company leverages modern technologies and agile methodologies to deliver top-notch products that align closely with client needs.With a strong emphasis on quality and client satisfaction, Techanic Infotech serves a wide array of industries including healthcare, finance, e-commerce, and education. Their solutions are tailored to address specific business challenges, showcasing their adaptability and expertise in crafting innovative software solutions.Backed by a team of seasoned developers, Techanic Infotech positions itself as a dependable partner for businesses seeking cutting-edge software development solutions. Their commitment to delivering value-driven outcomes underscores their reputation as a reliable and forward-thinking industry player.
  13. Mmmm I am happy to show a link. But I take it, with the Abs Pos, it makes life doubly difficult then? Right now we are doing it so the text goes off the left (no sliding going on), and on mobile, we either hide it, or just make it smaller so it doesn't quite reach the right side. Is it safe to assume with Abs Pos, you can't for example, make it BIG text, with -left Pos, and big enough to force the text OFF the page... but still preventing scrolling? Please confirm before I do share the link.
  14. I'm not well versed in using cURL, but based on what you provided previously your call to the URL you are using is returning the response: 301 error "Permanently Moved" But, you expect to be getting the JSON encoded output for the $allowed_domains array you are creating. I would assume you have tested the url in a browser and verified you are seeing the JSON content? If not, start there. If the content is correct when access via a browser then my best guess is that the web server maybe has some logic to detect programmatic access to pages and is blocking it. I'm pretty sure I've seen something like that before. But your issue has noting to do with the error you first reported. You need to figure out why your cURL request is not retrieving the JSON content you think it should be returning. Although, this is a good opportunity to add additional error handling to your code to cover a scenario where the cURL request doesn't fail, but does not return contents you expect.
  15. Use media queries to create rules based on screen size or browser device as requinix suggested. Though admittedly you may have some work ahead of you as WPBakery (as far as I recall - thankfully it's been a while since I've had to deal with its output) has a tendency to overdo it with the built in CSS.
  16. What is your code for this site? It's not behaving correctly, and I suspect you're using session variables for something that shouldn't be using session variables. What I see is that the first visit to your site redirects me to /?i=1 and the home page, then I click About and go to /index.php?page=about, then when I try to go to / (or /index.php) I continue getting the about page. That happens for the last page I visit, whichever page that is. That is what the SEO tools has detected.
  17. I did not consider that someone may see my post and not understand that the code posted is just an example of how to detect empty of this array. I hope that viewers understand to escape the output after validation (code not included). I should have used the following code in my post to avoid security problems: foreach ($_POST['subquestion'] as $value) { echo htmlentities($value, ENT_QUOTES, 'UTF-8') . '<br>'; } my code sample is not a valid solution to be applied online, rather in a testing environment.
  18. I really appreciate all the input here. Let me try to answer as much as I can. So, the server is a VPN which I rent from GoDaddy. I run the WHM and the cPanel, though "run" is probably not the right word. I have little experience with that aspect. So, I have root access. The tmp folder in the root directory does have it's permissions set up properly ... 0755. I changed them to 0777 to see if that would correct the issue and it hasn't. I also attempted to use session_save_path to another folder which I titled "sessions" in my cPanel directory. It ran exactly as it had before. It used the new folder but had the same intermittent issues as had the other folder. If I just sit there and try time and time again to login I get a success rate of about 1 in every 4 or 5 attempts. Each failure is met with the same message that it did not have permission to write to the sessions file. I have a friend helping me who has more experience than I but he is perplexed too. We DID see the session file being written each time whether there was failure or success, but the failure sessions variables contained zero bytes ... were completely empty, whereas the successful ones contained the data you would expect them to have. So in each case it appears the session variable was CREATED, but then the system was denied access to WRITE to it. I have found several other instances online with problems matching this exact description but none of their stated solutions have worked. I have students walk into my classroom in 18 hours. Also, upon further testing I don't believe there's a relationship (as I previously suspected) between the http call and the https one. And, yes, I'm sending sessions_start() before any other coding. The headers to these files are contained in the "include 'r_declaration.php';" statement, and the "include 'r_open_link.php';" is a call to open a link to the dB. And the if/else arguments render the same result because I use to send mobile devices to another page. I haven't deleted the code as I plan on re-implementing this at some point. I just don't get it.
  19. when the size of the post method form data exceeds the post_max_size setting, both the $_POST and $_FILES arrays will be empty, because the web server discards the form data before causing your php script to be executed. your code trying to test $_POST or $_FILES will fail because there is nothing to test. after you have detected if a post method form has been submitted, assuming there's at least one correctly coded post or file field (and uploads are enabled on the server), your code should test if both $_POST and $_FILES are empty, and setup a message for the user letting them know that the form data was too large and was not processed.
  20. what error? if you want to do something based on the authorized value, you would not include it in the WHERE term in the query. you would SELECT it, then test its value in the program logic. also - use 'require' for things your code must have. include/require are not functions. leave the () around the path/file out. don't attempt to detect if the submit button is set. there are cases where it wont be. instead, test if a post method form was submitted. you need to trim, mainly so that you can detect if all white-space characters were entered, then validate all inputs before using them. don't copy variables to other variables for nothing. don't put dynamic values directly into sql query statements. use a prepared query. if it seems like using the mysqli extension is overly complicated and inconsistent, it is. this would be a good time to switch to the much simpler and better designed PDO extension. you should be hashing the passwords. see php's password_hash() and password_verify(). you would not include the password in the WHERE term. you would SELECT the password, then after you have determined if a row of data was matched, use password_verify() in your program logic to test the password hash. the fetch instruction returns either an array, a null, or a false value, not a number. is this where you are getting an error? the only user value you should store in a session variable is the user id. you should query on each page request to get any other user data. the redirect you perform upon successful completion of the post method form processing code needs to be to the exact same URL of the current page to cause a get request. every redirect needs an exit/die statement to stop php code execution. if you want to display a one-time success message, store it in a session variable, then test, display, and clear that session variable at the appropriate location in the html document.
  21. your current symptom of not rechecking the radio fields is either because you changed the way you are saving the answers to the session variable (there would be php errors), and you didn't close all the instances of your browser to clear the session data and start over, or the session start is failing (there would be php errors.) do you have php's error_reporting set to E_ALL (it should always be set to this value) and display_errors set to ON, so that php will help you by reporting and displaying all the errors it detects? note: array_merge() renumbers numerical array indexes (your last code 'worked' for me but moved the checked entries to the next radio button due to the re-indexing.) you need to do what the 1st posted code was doing, and save them based on the page number, but you also need to reference the correct page of answers when you are rechecking the radio fields.
  22. Hi Elvium, The new code script works better than your original script in the original post (no broken paths and no 'walking in circles') but the code often produces the same results for several page loads (not very random). I reloaded the page 5 times and the grid didn't change. You could calculate borders and neighbors very easily and use a function to walk around the grid in search of problems and code solutions to any problems. I have detected borders and neighbors since my last post and even added diagonal neighbors in case the grid would be changed to allow diagonal movements. I've added a function to return opposite directions (north returns south). I've also added a Manhattan distance function and it works well. I wonder what you are building: a game, a path finding exercise or something else? ultimately classes would be better for this project. Imagine calling new grid(), new trap(), new monster() etc. Not necessary in development mode, of course, but a better idea in production. Anyway, if you are happy with your new code, then i suppose that this thread is closed. Otherwise, let us know if you need further assistance. I am going to keep working on my own grid code because i find my grid handling code useful in many ways. Plus, i am intrigued by the mathematics behind path finding. Very fascinating.
  23. i have this timer: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Countdown</title> <script type="text/javascript"> var hours; var mins var secs; function cd() { // below count down for 2 hours and 10 mins and 10 seconds // Or you could provide a string such as => [var time = "10:10:10";] // And construct a function to fetch values from correct parts hours = 2; mins = 10; secs = 10; progr_ess=130; //document.getElementById("progressBar").setAttribute('max','130'); redo(); } function dis(hours, mins, secs) { var disp; if (hours <= 9) { disp = " 0"; } else { disp = " "; } disp += hours + ":"; if (mins <= 9) { disp += " 0"; } else { disp += " "; } disp += mins + ":"; if (secs <= 9) { disp += "0" + secs; } else { disp += secs; } return (disp); } function redo() { secs--; if (secs == -1) { secs = 59; mins--; document.getElementById("progressBar").value = 130-progr_ess ; progr_ess -= 1; } if (mins == -1) { mins = 59; hours--; } document.getElementById("txt").value = dis(hours, mins, secs); if ((mins == 0) && (secs == 0) && (hours == 0)) { window.alert("Time is up. Press OK to continue."); // window.open("module.aspx", "_parent ") } else { cd = setTimeout("redo()", 1000); } } function init() { cd(); } window.onload = init; </script> <style> #txt { border: none; font-family: verdana; font-size: 16pt; font-weight: bold; border-right-color: #FFFFFF } </style> </head> <body> <form id="form1" > <div> <div> <input id="txt" type="text" value="00:00:00" name="disp" /> </div> <progress value="0" max="130" id="progressBar"></progress> </div> </form> </body> </html> how can i make sure it does not go back to start time duration on page refresh? how can i accustom it to recieve the count down duration using php variable?
  24. I can't understand why the styles disappeared <?php $path = $_SERVER['DOCUMENT_ROOT']; ?> <!DOCTYPE html> <html lang="en"> <?include "$path/private/head.php"; ?> <body> <div class="cont"> <?include "$path/private/header.php"; ?> <main class="startPage"> <div id="startLogin" class="startbtn">Log In</div> <div id="startSignup" class="startbtn">Sign Up</div> </main> <?include "$path/private/footer.php"; ?> </div> </body> </html> //это head отдельный файл <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <link rel="stylesheet" href="/css/styles.css"> <script src="/js/jquery-3.7.1.min.js"></script> <script src="/js/script.js"></script> </head> //style *{ margin: 0; padding: 0; box-sizing: border-box; } body{ background-color: gray; } .cont{ height: 100vh; width: 960px; margin: 0 auto; display: grid; grid-template-rows: 100px 1fr 100px; gap: 5px; } header,main,footer{ border-radius: 10px; } header{ background: linear-gradient(white,skyblue); color: rgb(147, 136, 136); font-size: 2.3rem; display: grid; align-content: center; justify-content: center; letter-spacing: 5px; } .startPage{ display: grid; align-content: center; justify-content: center; gap: 20px; background-color: white; } .startbtn{ width: 180px; height: 80px; background: white; border-radius: 10px; display: grid; align-items: center; justify-items: center; font-size: 2rem; color: skyblue; border: 2px solid skyblue; transition: all .5s; cursor: pointer; } .startbtn:hover{ color: pink; box-shadow: 0px 0px 20px gray; } footer{ background-color: white; }
  25. Well spotted. have changed it to echo date("d-M-Y H:i:s",$t_stamp); . It is still wrong. It stalls. Easyspace kow there is a problem. I am paying good money for a rubbish service. Also noticed when I use my mobile phone it is difrent again. http://desmond-otoole.co.uk/testdate.php
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.