Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


dalecosp last won the day on December 21 2018

dalecosp had the most liked content!

Contact Methods

  • Website URL

Profile Information

Recent Profile Visitors

25,033 profile views

dalecosp's Achievements

Advanced Member

Advanced Member (4/5)




Community Answers

  1. +1 for a development environment. I use Oracle's Virtualbox and install a BSD-family OS with Apache+PHP ... you might be able to even find a Docker container or something like that for free out there someplace. As far as what will happen, the biggest recent changes to PHP, in terms of effect, at our company were removing the old mysql_* stuff (although most of it was long gone, we found out that some infrequently-used LAN software and reports still had some mysql_* stuff in them, and the removal of mcrypt().
  2. Drag 'n drop is done with an AJAX system; a JavaScript front-end script packages the image data into a FormData object, and the AJAX operation will POST that to a PHP handler script on the server, which then does the work to put it someplace just like we did in the Elder Days when we used a basic upload form in HTML. So, at the very least you need two scripts, one PHP and one in JS.
  3. It would also be possible to post-process all the URLs on the page with JavaScript, but who wants to take time to do THAT?
  4. Pretty URLs are fairly simple. Either use mod_rewrite (for Apache servers) or its equivalent on your system to do the complete work, or use it to redirect to a centralized script that reads the URL parameters and shows content based on that parameter. At work, we have listings like: www.ombe.com/listing/2151404/Uninet-Developer-for-use-in-Ricoh-Aficio-200,-250,-345g mod_rewrite has this rule: RewriteRule ^listing/([0-9]+)/?.*$ listing?$1 [NC,L] "Listing" does something like this: $product_num = intval($_SERVER['QUERY_STRING']); Of course there's a LOT more, config and security modules before this point, and error handling for invalid query strings, and so on.
  5. The quid pro quos of going to "MySQLI" include changing your connection string and the query syntax. The one big "gotcha" to me when converting old to new (MySQL to MySQLI) was the lack of a mysqli_result() function in the older days, but now you can do something like this: $data = $result->fetch_row()[0]; ... which seems fairly handy to me in place of mysql_result. I'm not sure when this syntax became valid, off the top of my head. PDO is generally touted as great for security and portability. I'm not totally convinced, but the use of prepared statements is preferable to its alternative. I had written quite a bit more here, but I think at this point a good read or two would be in order. I'm not sure there's any 'one size fits all' answer to this issue. This is a thoughtful and well-informed take on the subject. The Reddit comments on it are also kind of interesting. SitePoint discussion. Jim Westergren tested, and prefers, PDO with ATTR_EMULATE_PREPARES. Quora seems to prefer PDO, but there's some really bad info on this page also. I've been in your shoes, and our management wanted quick-n-dirty. I modified everything to MySQLI with a few search/replace operations in the IDE, adapting the connection code, and replacing calls to mysqli_result(). Took very little time at all. If they preferred PDO for security and portability, I would've done that. though.
  6. Well, the reason all the example are short ... you're not really likely to find someone who wants to code the equivalent of an entire app for the purposes of a job interview. What's wrong with them bringing code to you, providing Github links, etc.?
  7. What's the console saying? Perhaps you could add some more console.log() statements if these aren't firing and giving you any clues.
  8. As far as .htaccess goes, it should be fairly simple, as long as you're talking about a few specific files. <Files /foo> deny from </Files>If you have multiple pages you probably need "FilesMatch" and a regexp.
  9. It should be a bit simpler; they are allowing GET requests. Here's a sample you can adapt to your site's architecture: <?php $uid = "My_Userid"; // put your user id here $pass = "My_Password"; // put your password here $apikey = "My_API_Key"; // etc. $from = "My_From_Phone_number"; $to = "Receiving_Number"; $msg = "Test text Message."; $url = "https://www.experttexting.com/exptapi/exptsms.asmx/SendSMS?Userid=" . $uid . "&pwd=" . $pass . "&APIKEY=" . "&FROM=" . $from ."&To=" . $to . "&MSG=" . $msg; $send = file_get_contents($url); //simple HTTP GET request
  10. You're welcome! Good luck with your project :-)
  11. The fact it's not working on iPad suggests a browser problem, and, therefore by extension, a JavaScript problem? Can you get a console from the iPad browser and see if JS is throwing some errors? Alternatively, there are "user-agent switchers" for most major browsers that might allow you to imitate an iPad with a browser (Like Chrome or FFox) that has a good console/debugger already built in.
  12. You're echoing "$out" inside the foreach loop ... and you're also concatenating to it with ".=" ... I think you probably want to put the echo statement AFTER the foreach loop? (That is, after the first bracket and before the bracket that closes your function.)
  • 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.