Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. The code above is very rudimentary and not very smart. It will display the contents of the input vars from a submission. Now what? Much simpler code would be: foreach($_REQUEST as $k=>$v) echo "$k contains $v<br>"; Since the REQUEST array contains whatever is in the GET or POST array, using it eliminates the guess work done above. I eliminated the recursive code that was handling an array input within the REQUEST since from your example I don't think that will be an issue.
  2. Sorry - but without knowing what the data on the server is, how the heck are you going to program a retrieval? Somebody has to give you some guidance there. You can't just take a submitted form into your php script, assemble the inputs and then do ?what?. Or are you given a script name that is already written which you need to send your input form to? If so, then that target script has to have a way of sending data back to you which again, you have to be ready to receive somehow. You're not telling us something I believe. Too much mystery
  3. This data from the server - is it something you are creating or is it something that is stored somewhere and you are just pulling it up? I don't think you want to display it in a blob either. Can you be more specific about what transpires from the time your script retrieves the input values from the form?
  4. Sounds like you need to develop your html page with the input form. The action of that form will call your php script which will grab the input fields from the form and do something with them. At the end that same script will send some html back with the results of your inputs. Yes - it does sound simple, so what are you leaving out?
  5. how are you getting your input? What does the ending url do for you? Can you show us anything you have written so far? How about your form that grabs your input values for field1= field2= & field3= ? Have you ever programmed?
  6. First thing that comes to mind is to create a cron task that runs at a defined time like every 1 minute and checks for some info in a table of a txt file that tells it what to post. Or the cron task runs once and is created and schedule at some future time. Using the first one would just mean that when an upgrade is done your script would just post some info about it in a table and when the cron task next runs it would look for any un-handled records, grab the info and do the 'post' and then mark the record as done.
  7. good time to forget this thread before I get in trouble.
  8. Why do you check both the GET and POST arrays for your input? If you truly don't know how it is coming in (or it can come in differently each time), why not just check the REQUEST array?
  9. Try adding this to your query: SELECT DATEDIFF(day,'2008-06-05','2008-08-05') AS DiffDate you just have to ensure that your dates are in the correct format (this appears to be yyyy-mm-dd)
  10. Didn't you already post this ridiculously long piece of confusing code somewhere else and get told not to?
  11. So what is on line 84?
  12. I'm sorry you feel that way. I'm also sorry that you don't see that I am actually trying to help you learn php by asking you to write some code. Apparently you need someone else to write your code and another person to interpret your code and another person to add code to it that the first person forgot to include for you. Good luck young man.
  13. If you have a good example of a phone validation, why aren't you using it? Oh - you want us to write it for you. What kind of validation do you want? 1 - test the value for a numeric only value; 2 - test for a valid length - depends on your expected inputs I suppose. I'd check for 7 or 10 myself. 3 - test for a 10 digit number that doesn't begin with 0 or 1; (BTW - I would only accept numbers without formatting in my input fields. Formatting can be added when I display it.) Ok - now that's the algorithm that I would use - you code it up. Of course if that's not the algorithm that works for your area, then ignore it.
  14. Actually if you are just presenting code you took from someplace else, how do you call that learning? NO - We are here to help you with YOUR code. We are not here to read somebody else's long posting that you have decided to use without even knowing what it does or how it works. If you haven't learned enough to take on the task you've chosen, then why should some volunteer (us) be asked to do it for you?
  15. Good luck with that site. I wasn't annoyed - simply conveying to you that good posting should only include enough code to help the readers see your problem and help you to solve it. Not so much that they have to read a book to make sense of it. And actually - this site is pretty much a beginner forum as well......
  16. Once again - you've posted too much code. Not interested in all that other stuff - looks like you'll have to dig it out.
  17. you're welcome.
  18. First of all - I would never mix my html and my php the way you (and many many others are doing). I would do this in my php section before I began my html output: $color_opt = "'" . $ar[0] . "'"; $color_nm = $ar[1]; which is the color value obtained already from my previous code snippet bracketed inside two single quotes. then in my html section where I am outputting everything : <span class="previewtext" style="color:$color_opt;">$color_nm Text</span So much easier to read and type <span class="previewtext" style="color:<?php .$ar[0];?>;">Black Text</span>
  19. 1 - I don't go to outside links. Ever. Just a phobia I have. 2 - You mentioned that you were new to php, but you are asking about a javascript function. Which language do you have the question about, since this is a php forum. Suggestion - put an alert or two in the js code that you showed us and make sure that you are actually getting to that code and what the code is doing. If the problem is not in the JS code you gave us, then perhaps you want to show us the pertinent php code?
  20. Assuming that code is some JS, what seems to be the problem, other than all you do is check if something is present.?
  21. Show us the part where you are checking the phone number and trying to validate it? That part. Or haven't you tried to look at this code yet?
  22. Would you really like to have to go through miles of someone's code to help them with a query problem? I don't. How about isolating your own problem and displaying the query before you run it and then verifying that it ran with a check and then asking us to look at just that much of your code?
  23. Could you just show us you attempt at the validation and NOT all that meaningless JS and outside code?
  24. Sorry - I read your first response incorrectly. YES - you are typing it incorrectly and you are attempting to extract the retrieved values incorrectly. To retrieve your values you use the explode function on the input value in the POST array which I showed you. Then wherever you want to display one of those two values you simply output one element of the array - the '0' element for the numeric value or the '1' element for the name value. So to display both values you could have this in your script: echo "You have selected a color value of " . $ar[0] . " which is the color " . $ar[1];
  25. No you are not.
×
×
  • 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.