Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. Just getting up and reading your post Requinix and seeing that you are saying the same thought that I lay awake this morning thinking about. Will do today!
  2. Yes the message is as you say. And I don't have the phone so I can't tell what the browser/version is. Yes - I have seen all the postings referring to Chrome and their age, but this Android is still getting the issue. I will have the user check for updates but I would think that his phone s/b getting automatic updates, no?
  3. ok - php script sends an html form back to the sender that has some results displayed in it plus a submit button that triggers another php script which opens up a web page. Works great on a laptop and my iphone but when someone with a Samsung 6/android get the email and clicks the button he gets: net err cache miss for a message along with the contents of the action attribute of the form tag in the email. The query string looks like it should but what is this error message? I googled those words and got a slew of places where people encountered it but none of them apply to me. I'm not doing android programming, nor anything out of the ordinary. Just sending a form to whomever wants to read it and click on it. Anyone seen this?
  4. Do you have php error checking turned on for any messages, or have you checked the log? Is this a timing issue? I see you play with the time limit - do you know if the problem occurs during a longer execution time?
  5. I don't know what you are trying to make this look like, but the pure logic below will give you something like: Draw number: nnnnnn Balls: 1, 2, 3, 4, 5, 6 $q = "SELECT * FROM lotto where date = (select max(date) from lotto) ORDER BY draw_nr"); $select = mysqli_query($connection, $q); $output = ''; while($row = $select->fetch_array()) { $output .= "Draw number {$row['draw_nr']}<br>"; $nums = explode(',',$row['result']); sort($nums); // put nums in order $numstr = implode(', ',$nums); $output .= "Balls: $numstr<br>"; } You have the img tags and all the color stuff which makes no sense to me but I've boiled all your code down to these few lines. You can write a SEPERATE block of html code at the bottom of your script and place the $output variable in it where it belongs if you want to make it pretty. PS - this will do however many drawings exist with the latest date on them, which might be a good thing to add to your output also.
  6. Hmmmmm It appears that the db is not normalized and that the numbers ARE all in one row, probably with a date/time field. You are grabbing each row into an array (silly) and then exploding the result value into an array by comma. That tells me that your db looks like: 06/09/16 41,22,33,44,55....... and you are making it an array that you then loop thru and output some img tags to be viewed. You should also try and separate the html code form the php code to make it easier to understand and maintain. You nave all those div tags but you never put anything in them!
  7. Can you tell me the field names that are being retrieved or at least how many are being returned in each row? Is the drawing date/time included in each row? What else? General practice is to avoid using * in selects.
  8. Your description of the process doesn't make sense at all. I would think that the results row would contain all of the balls and would already be in an array and wouldn't need any manipulation. How about showing us the query statement?
  9. You must remember that args always instantiate their own chunk of memory. Just because the names are the same as you drill down a recursive process, the vars themselves point to different parts of memory and will not / do not impact each other.
  10. So - after 48 hours transpire, who is going to see this new page you send with the form data and where is it going to show up?
  11. You have some 'complex forms' that are 'written' to a database. So you have a script that takes input values only as per the usual $_GET or $_POST array value and writes them into one column of a table record? You say that your columns are huge but why is that? They simply contain a value, don't they? Where is this HTML that you mention coming from since it didn't come to your script via the GET or POST arrays? Your description implies that you are receiving input that literally represents the html form that the client has just filled in and that you are saving it as is. I don't know how this is done, so perhaps you can add some more specifics to your situation here so that the premise makes more sense. Or perhaps I'm just too old and slow to see it.
  12. Actually I prefer the heredocs method for any html over a couple of lines. Makes it easy to output html code and readily accepts php vars with no tags needed! My preferred format (for readability) is the following: $code=<<<heredocs ... .. ... heredocs; echo $code; No confusion there - everyone knows exactly what is going on.
  13. Not to dispute the good advice that Jacques provided, your setting is incorrect. The value s/b "-1" not "1".
  14. Actually I did just what you said. Changed the method to POST and voila! all is working fine. I did change my script to retrieve my supposed GET args as REQUEST ones. Funny how the two environments differ. One treats the form as a GET always and passes along the uri string. The other respects the form tag's method= but ditches the uri args in favor of the form element.
  15. Here's the scenario. I have a php script that is triggered by an email piped to it on my server. The script does its thing and then sends a message and a form with a submit button back to my email address. The form specifies a GET request and the form has an action that includes a couple of arguments attached to it. Example: <form method='GET' action='http://myscriptname.php?arg1=xxx&arg2=yyy'> <input type='submit' name='btn' value='View Grid'> </form> Now here's the problem. When this form is received by my email at my laptop, the button, when clicked does exactly what it looks like it should do as above. It triggers a script with the two GET args included in the url. The script sees the values and executes accordingly. Perfect! But - when the email is picked up on my iphone, while it looks exactly the same, when I click it the script does NOT pick up the args in the action's url. What it picks up is the submit button as if the form was doing a POST. Of course the script sends an error message to me and does not do what it is supposed to do. So - why does the iphone treat this html email form as a POST but my other devices (laptop) see it properly as a GET request?
  16. I must not understanding this REST thingy. A request for data simply has to have some identity or else you are just taking data blindly. I've covered the first case already. In the second, if the data is not identifiable, then why would it matter how you handle it once you receive it?
  17. If you don't 'need' to filter OUT the Sat.Sun. data, simply don't. As for the rest of the problem, what doesn't work? The xml file read? Something after what you have shown us? Add some echo statements to ensure that what you want to be happening is really happening.
  18. Any request must be made using some recognizable piece of data from that record ( I call them records). Thererfore when the data is returned each record s/b identifiable by that piece of data (key?) and thus it can be used accordingly. Does that make sense?
  19. did the default timezone change on you? As for your Sat/Sun question - I'll let you ponder that solution to avoid embarrassing you in a public forum.
  20. I wasn't aware of any previous thread, hence my needless repetition.
  21. This is some odd code. Here are my questions: This line: if(isset($_SESSION['user'])!="") What are you trying to determine here? That the 'user' element exists? Or that it is not null/empty? It probably works but as a simple programmer I look at it leerily. IMHO, decide on what you want and code for that. In this case I see a test that yields a Boolean result which you are then testing against (what I call) a null value. Whether it is True or False, the test is either invalid or (due to some PHP rules) not exactly clear. After that first line you then grab 3 inputs and massage them and then put them into a query. Yet - you didn't check to see if they were blank!! Third - you do this query looking for a password. Hmmmm. You didn't hash the input password so it appears that you are storing passwords in clear text in your db. Tsk, tsk, tsk. Not at all a good practice. Even if you were storing it in an encrypted form and using an encrypted input value to query with, you should never return the password value to your script. What for? You aren't going to use it anywhere, are you? (If the answer is yes - it s/b NO.) Next - you run your query (without checking if it ran successfully ) and pull a row from the results. THEN you check to see if there were any rows returned (the count). Doesn't that give you a thoughts about anything? Check the count BEFORE you (try and) fetch a row! Now we get to where you encrypt your user input (which you are not even sure exists!) and test the query result value. As I said before you should not be bringing down a password value into your script. Construct your query to look for that correct record and if you get that 1 record result that you expect you will know that the userid/password combination is correct. Now for the html. You output a script tag to display an error message. Not my choice of actions but to each his own. But - you are clever enough to include a noscript tag in your output, but I see nothing there that makes it necessary. Even more - you already sent out a JS script before knowing if the browser accepts JS. How is that going to work? Even more curious you use the noscript tags to wrap your CSS includes. So - if your browser supports JS, it can't utilize the CSS code, but if it doesn't you will use a well-designed layout based upon those CSS files? Hmmmm. And for my final question. You have a set of inputs that you want to show. First you begin an unordered list element. Then you begin a form which is necessary of course. Then you wrap that form inside an html table element which is a common, though outdated, method for designing an input page. What exactly is this list element doing for you? Things to think about. The multiple uses of an id name will confuse the browser. I don't know why you are assigning them to table row elements, but if you are going to do it use unique values. The use of a button element inside of a form is not the usual way. Why not an input element specifying a 'submit' type? The button element has its uses, but the type='submit' input element is specifically there for this purpose.
  22. Bootstrap requires an absolute excess of html tags?
  23. I have never seen so many div tags used before. What a mess!
  24. Where is the data coming from? A form? Show us some of the html that created it.
×
×
  • 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.