Jump to content

cyberRobot

Moderators
  • Content Count

    3,014
  • Joined

  • Last visited

  • Days Won

    26

cyberRobot last won the day on March 4

cyberRobot had the most liked content!

Community Reputation

121 Excellent

About cyberRobot

  • Rank
    Much to Learn

Contact Methods

  • Website URL
    http://www.cyberscorpion.com/

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

85,786 profile views
  1. The while loop in the above code is missing a closing curly brace.
  2. Are you getting any errors? Is PHP set to output all errors? Perhaps the call to header() isn't being executed. Have you tried outputting something right before the call to header()?
  3. More information about redirecting with PHP can be found here: https://www.php.net/manual/en/function.header.php
  4. The following line looks like JSON. {"code":0, "reason":"OK", "resp":"AT+CCFC=1,3,\" 92061460\"\r\nERROR\r\n"} You could try using PHP's json_decode() function to extract the code, reason, and resp variables. More information, including examples, can be found in the manual. https://www.php.net/manual/en/function.json-decode.php Then you could use explode() to break the "resp" component based off the double quote ("). Then chop off the third value, assuming the lines always look similar to the above. Does the following line come from the API? {"code": 0, "reason": "OK", "resp": "AT + CCFC = 1,3, \" 92061460 \ "\ r \ nOK \ r \ n"} Unless I'm missing something, that's not valid code. Basically, the "resp" portion is equal to "AT + CCFC = 1,3, \" 92061460 \ "\ r \ nOK \ r \ n", which is surrounded by double quotes. In order to use double quotes in the middle of the string, they need to be escaped with a backslash. The first escaped quote is fine. The second one is not since there is a space between the backslash and the quote. The \r and \n entities are also invalid because of the extra spaces.
  5. Also, please use code tags when posting code to the forum. It makes the post much easier to read. One way to add code tags is to click the <> icon in the toolbar above the area where you are writing the post. It's right next to the smiley face.
  6. Is validDate() defined in your script? Note that PHP has a built-in date checker. More information can be found here: https://www.php.net/manual/en/function.checkdate.php If you scroll down to the "User Contributed Notes" section, there is a user-defined function validateDate() that you could experiment with.
  7. Welcome back to PHP and welcome to the forum!
  8. What type of website are you building? Is it a blog or some kind of resource library? In other words, would the contents of all these pages be better suited for a database? Perhaps there's a way to build a single page in PHP which pulls the necessary information from the database based on a passed ID.
  9. Since it looks like you are using jQuery already, you could use one of their selectors. For example, you could look for <div> tags that contain an "id" attribute where the value ends with "-order-no". More information about writing the selector, including an example, can be found here: https://api.jquery.com/attribute-ends-with-selector/
  10. Are you using MySQL? If so, have you tried the built-in date functions to get the needed information? More information about the functions can be found here: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html
  11. Hmm... When I do that in both Firefox and Chrome, there's only an option to download the website files. You see an option to create a website shortcut? In case anyone is looking for a quicker way to create a shortcut, you can also grab the lock icon (or where the lock would be for non-secure website) near the URL in the browser's address bar and drag it to your desktop.
  12. Is this what you are looking for? https://www.lifewire.com/create-shortcuts-in-google-chrome-for-windows-4103617
  13. Are asking about the Google Chrome browser? In other words, if you click one icon, the browser displays specific options. If you click the other icon, the browser displays different options? If so, you could set up different Chrome profiles and create a shortcut for each. https://www.howtogeek.com/256629/how-to-create-a-windows-shortcut-to-open-a-specific-profile-in-chrome/ Or are we talking about loading a web page differently based on those Chrome shortcuts? I'm a little confused since the question was posted in the HTML forum.
  14. Just to clarify, do you want the name for team 1 to be 25 characters? And the name for team 2 to be 25 characters? So you would have 50 characters at most for both team names? If so, you could try requinix's suggestion above. You already exploded the names. From there, you can use substr() to limit each name.
  15. Placeholders, by themselves, will make the form less accessible for people with certain disabilities. More information can be found here: https://webaim.org/techniques/forms/advanced Be aware that the <label> tag isn't doing anything here: <form action="/quickfind" id="quickfind" method="post" name="quickfind"> <label>Enter your name</label><br> <input type="text" id="find-search" placeholder="First name"><br> <input type="text" id="find-search" placeholder="Last Name"> </form> It needs to be connected to an <input> tag using the "for" attribute...or the label and corresponding <input> tag need to be enclosed with open/close <label> tags. Also, I'm fairly certain a <label> tag cannot be connected with two separate input fields. Each of the <input> tags above need their own label. More information can be found here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label FYI - There is an easy way to tell if a label is connected with an input field. Clicking the label in your browser should place focus on the corresponding input field.
×
×
  • 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.