Current location: Hot Scripts Forums » Programming Languages » PHP » Need a little (easy) php help


Need a little (easy) php help

Reply
  #1 (permalink)  
Old 03-05-04, 04:30 PM
jasperma jasperma is offline
Newbie Coder
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Need a little (easy) php help

ok, i need a little bit of help.
if someone can help me out, it'll save me about an hour of work thinking of otherways to solve this problem.

ok, let's says someone goes to:

and that for an infinite amount of time, how do i do this in php?

so basically:

http://www.example.com/example.php?id=Xnumber
http://www.example.com/exampledir/ex...php?id=Xnumber

I'm hoping it's not that hard, thanks.
Reply With Quote
  #2 (permalink)  
Old 03-05-04, 09:56 PM
jerry's Avatar
jerry jerry is offline
Newbie Coder
 
Join Date: Mar 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Solution:

In the example.php file, have it like this:
<?
$id=$_GET["id"];
header("Location: "exampledir/example.php?id=$id");
?>

Just make sure that the above statements go right at the top of the script file, before any output is release to the browser. Remember, not even an empty space or a newline must come before them. Http procotols.



Quote:
Originally Posted by jasperma
ok, i need a little bit of help.
if someone can help me out, it'll save me about an hour of work thinking of otherways to solve this problem.

ok, let's says someone goes to:

and that for an infinite amount of time, how do i do this in php?

so basically:

http://www.example.com/example.php?id=Xnumber
http://www.example.com/exampledir/ex...php?id=Xnumber

I'm hoping it's not that hard, thanks.
__________________
<font face="Verdana"><a href="http://www.generalscripting.com">General Scripting</a> Web Development Services</font>
Reply With Quote
  #3 (permalink)  
Old 03-06-04, 03:18 PM
jasperma jasperma is offline
Newbie Coder
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
thanks!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
100 Web Templates & 10 PHP Scripts for sale! HostersUK.co.uk General Advertisements 0 01-10-04 12:31 AM
Webmail, Using PHP and Mysql and easy to install lol! TheGreatOne General HotScripts Site Discussion 23 01-08-04 03:49 AM
How to convert php generated pages to SE friendly HTML or PHP(SE friendly) -CLASS 101 crippled PHP 1 11-16-03 06:37 AM
Ad management and optimisation using php surebetdmg PHP 0 08-28-03 06:45 PM


All times are GMT -5. The time now is 09:12 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.