How to redirect page using PHP with values?

Here is the code for simple PHP page redirect. The search engine friendly way of redirecting is the 301 redirect.

1
2
3
4
<!--?php
	Header("HTTP/1.1 301 Moved Permanently"); 
	header( 'Location: http://www.yoursite.com/page.html' ) ;
?-->

Note that if you do not include the first Header line above, the redirect still works. But, instead of a 301 redirect, now it becomes a 302 (temporary) redirect.

Now if you want to redirect to perticluer user page then you need to include user id in the url. Here is the code:

1
2
3
<!--?php
	header("Location: userpage.php?id=".$userId);
?-->
Peter Vegas

68 thoughts on “How to redirect page using PHP with values?

  1. I savour, cause I found exactly what I used to be having a look for.
    You’ve ended my 4 day long hunt! God Bless
    you man. Have a great day. Bye

  2. Zaunauspolen erhältlich befindet auf Krakau gemacht von beste Hersteller.
    vorschlagen ebenfalls wesentlicher Teil des Zauns oben professioneller Qualität.
    Die ganze Zeit erweitern set unsere Produkte , da Wunsch Angebot interessant .
    Wir fest Spezialisten , das ist besitzen riesigen Wissen, Bildung und Lang Erfahrung in der Industrie SPACE Konstruktion. Sie kaufen können Nicht nur
    verkaufen besten Artikel und Installation sie Service Konto in angegeben seinen Platz.

    Doppelstabmattenzaun – doppelstabmattenzaun.
    arbeiten in der SPACE nun viel Jahre daher auch erworben erkennen viele Kunden .
    Überprüfen Socken Bedar Wir hoffen bis allerlei Kommentare des Unternehmen,
    I wollen immer direkt zu Bedürfnisse Kunden .

  3. Great goods from you, man. I’ve take into accout your
    stfuff previous to and you’re just extremely great.
    I really like what you’ve acquired here, really like what
    you’re saying and the way in which in which you assert it.
    You make it entertaining and you still care for to keep it sensible.
    I cant wait to learn much more ffrom you. This
    is really a terrific web site.

  4. Hey there fantastic blog! Does running a
    blog similar to this take a large amount of work? I’ve no understanding of computer programing however I was hoping to start my
    own blog in the near future. Anyways, if you have any recommendations or tips
    for new blog owners pleaqse share. I understand this is
    off topic however I simply had to ask. Thank you!

  5. Thanks for the marvelous posting! I actually enjoyed reading it, you may be
    a great author. I will make sure to bookmark your blog and will eventually come back from now on. I want to encourage one to
    continue your great job, have a nice day!

  6. Thank you for every other informative site. Where else may just I am
    getting that kind of information written in such
    a perfect means? I have a mission that I’m simply now operating on, and I have been on the glance out
    for such info.

  7. An outstanding share! I have just forwarded this onto a friend who has been conducting a little homework on this.
    And he in fact ordered me dinner due to the fact that I stumbled upon it
    for him… lol. So allow me to reword this…. Thank YOU
    for the meal!! But yeah, thanks for spending some time to
    talk about this issue here on your web page.

  8. Only then can you invite players to log in to your teammates gives you full control, and Africa.
    So many gamers often use VPN to download the game to play and they are available with the
    television set. But the dig zones in Twilight Highlands
    offer no more benefit to game servers me than the other dig sites are a bit too unforgiving?
    I rate FlyVPN as the industry’s game server is fun, but you can pick.
    The process of playing online games because it is referred to as a shard.

  9. Adversely, if they do manage to swallow pieces like that, Pomeranians and
    other dogs for that matter may face getting obstructed.
    com dog toys come at unbeatable prices with
    our various promotions. Be sure that you purchase a
    massive sufficient rope for your canine.

  10. An impressive share! I’ve just forwarded this onto a co-worker who had been doing a
    little homework on this. And he actually ordered me breakfast simply because I
    found it for him… lol. So let me reword this…. Thanks for the meal!!
    But yeah, thanks for spending some time to talk
    about this matter here on your blog.

  11. Hi to every body, it’s my first pay a visit of this
    website; this webpage consists of amazing and genuinely excellent stuff in favor of visitors.

  12. I was extremely pleased to find this web site.
    I need to to thank you for ones time due to this
    wonderful read!! I definitely really liked every bit of it and i also
    have you saved to fav to look at new things on your blog.

  13. Oh my goodness! Incredible article dude! Thank you so much, However I am having problems with your
    RSS. I don’t know the reason why I cannot subscribe to it.
    Is there anybody else getting the same RSS problems?
    Anyone who knows the answer will you kindly respond? Thanks!!

  14. Purhases must occur after February 16, 2009 and before
    Jauary 1, 2010. User can connect the car to thee PC, in-depth understanding of a problem.
    Form VAT 1C is for manufacturers of relevant supplies, as set forth by HMRC.

  15. Every weekend i used to go to see this web page, as i wish for enjoyment, as this this site conations really nice funny information too.

  16. Hello every one, here every oone is sharing such knowledge, thus it’s nice
    to read this weblog, and I used to ggo to see
    this blog daily.

  17. We have in-house personnel with expertise ranging from Project Management, concrete, carpentry, electrical, plumbing, and general construction. Lone Star also specializes in complete
    remodels.

  18. Heƴa i am for the first time here. I came across
    this board and I find It truly useful & it helped me out a lot.
    I hope to give something back and aid others like you hrlƿed me.

  19. I do not even know how I finished up right here, however
    I believed this put up was once great. I don’t realize who you’re but definitely you’re going to a well-known blogger in case you are not already.
    Cheers!

  20. The title should be a reflection of the entire article.
    A free version comes with the same functionality
    but with ad support. People who travel with only a few pieces
    of luggage can handle the bags by themselves and not resort to
    making use of porter services.

  21. Most of these features will improve you gaming experience,
    whyile some may gice you the capability to perform
    other tasks such as downloading game demos, movies, and
    music. It also allow you to convrrt audio files such as those in the MP3 format.
    For the peoploe of you who’ve no notion however on what it’s, it really
    is fundamentally a first-person shooter game which
    has incorporated the Playstation Move metyod into
    its gameplay.

  22. Great weblog here! Additionally your web site a lot up very fast!
    What web host are youu thhe use of? Can I am getting your associate link for
    yyour host? I wish my site loadd up as quickly as yours lol

  23. The eye care specialist is certainly well competent in taking care of vision and you need to make use of their skills
    and expertise if you want healthful vision. An important thing to know is
    family history of any eye diseases. After you have provided this
    person with your information the two of you will book a time for a free home eye test that is convenient
    for you.

  24. you are actually a excellent webmaster. The site loading velocity is incredible.
    It kind of feels that you’re doing any distinctive trick.
    Also, The contents are masterpiece. you’ve performed a
    great job in this subject!

  25. I’m more than happy to find this site. I wanted to thank
    you for ones time due to this wonderful read!! I definitely liked every bit of it and i
    also have you saved as a favorite to check out new information on your blog.

  26. It is indeed a matter of pride and pleasure when you find that your web page is positioned on the top of the search engine lists.
    That’s why optimizing websites has become one of the important issues for
    online businesses these days. Keep in mind that in internet affiliate marketing business, it’s essential to develop
    persistence, endurance and knowledge.

  27. Very good blog you have here but I was wanting to know
    if you knew of any forums that cover the same topics discussed here?
    I’d really love to be a part of group where I can get feedback from other
    knowledgeable individuals that share the same interest.
    If you have any recommendations, please let me know. Thanks!

  28. Nice work. Im shure you’ve got more good ideas.

    keep blogging.
    Niezła robota z twoim tekstem i blogiem. Widzę, że orientujesz się w temacie.
    Na bank masz wciąż sporo ciekawego do wyrażenia w tymże temacie.
    Tak trzymaj

  29. are uniquely design for your vehicle to gives an individual look both day and
    night time. This is a common issue but can be a serious problem when taken to obsession. At that time,
    she instinctively aware that she will be doomed
    to life and beauty of this line in hand to the old.

  30. The company also offers fun dog videos and stories about dogs, and an up-to-date blog (Nose to the Ground).

    Some dog kennels are made of metal screens and posts while others are made of bronze and aluminum
    or steel wires. To clean the walls in your home naturally, all you
    need is a few basic household items you probably have on hand.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest updates on your inbox

Be the first to receive the latest updates from Codesdoc by signing up to our email subscription.

    StudentProjects.in