Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Nov 2007
    Posts
    680
    Thanks
    319
    Thanked 1 Time in 1 Post

    Send string to PHP script then return

    How would I go about sending data from a form to a script which will process it to check some stuff, but then send the data to another script which will find characters and replace them with some code, then once that is complete I want it to send it back to the same script.

    But I would of thought that when the 2nd script sends it back it would just restart the 1st script? Unless I add a URL variable which says it has already done this part?

    Do ALL browsers support URL variables? That's a proper nooby question but I have never asked so I don't know. If they do then I can use them more.

  • #2
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    This is the exact reason why functions are there. You should make the code in each script a function, include the second script into the first, then run the functions in order. Running multiple scripts for one request is very poor programming
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)

  • Users who have thanked JAY6390 for this post:

    martynball (02-09-2010)

  • #3
    Regular Coder
    Join Date
    Nov 2007
    Posts
    680
    Thanks
    319
    Thanked 1 Time in 1 Post
    How do I pass the data from the 1st script to the next script/function?

  • #4
    Regular Coder
    Join Date
    Nov 2007
    Posts
    680
    Thanks
    319
    Thanked 1 Time in 1 Post
    Never mind, just read how to on the manual of PHP.

    function($string);


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •