SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: redirection

  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    bahrain
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up redirection

    hi

    i have uploaded a site on my host but i don't have php thier.now i want to have a registration form in this site and that is being email to me. so i worte a php script for this and put taht script on my another host ( having php ) and redirect the registration form to my this host after submitting. but now the problem is that when email has gone i have to aagain redirect to the host where php is not thatier so that it will show the message that email has been sent. so whti do is this in the end og email script

    "header("location:http://www.site.com/page.html")"

    but it is not working and saying thhat page cannot be found ( the sent email message one) but actually mauil has been delelivered.

    so all workig goood but messge page is not coming.


    also can i also show the error message like


    if($email)
    header("location:http://www.site.com/page.html?m=1")
    else
    header("location:http://www.site.com/page.html?m=2")

    so how can i will show on html page that if m == 1 mail sent else not sent

    can it be done in javascript
    its urgent plzzz.....
    regards
    phphelp

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,807
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Why not put the 'sent mail' message on your php page and use a meta refresh to redirect the user after 10 seconds?

    It would save the messing about.

    SpikeZ
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    bahrain
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but this is only a script nothing showing here and only the redirection is the way i think this is the only way but don't know why it is not showing the page?is it like we cannot redirect to another host page with header() function?
    its urgent plzzz.....
    regards
    phphelp

  4. #4
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,807
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    is the the exact code (apart from the URL's!)
    PHP Code:
    if($email)
    header("location:http://www.site.com/page.html?m=1")
    else
    header("location:http://www.site.com/page.html?m=2"
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  5. #5
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can do in javascript and PHP do you get any error or what is the output..
    Where there is a will there is a way
    ArunKumar

  6. #6
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    bahrain
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i m not getting any error im doing the same as spikez mentioned but wht happens this page where i am going redirecting is on other host so it shows "page not found".and how can i do it in javascript?
    its urgent plzzz.....
    regards
    phphelp


Bookmarks

Posting Permissions

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