hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Need Help with simple script!!!
Reply

Forum Jump

Need Help with simple script!!!

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-23-2002, 07:39 AM
krappleby krappleby is offline
New Member
 
Join Date: Aug 2002
Posts: 2
Question

Need Help with simple script!!!


Hi all,

Can someone please help me... I KNOW NOTHING about PHP, and normally program with ASP. The problem i have, is simple, I need to create a redirect page. However the server it is for, Will not support asp, and only supports php... The details are as follows...

A person enters the address,

http://www.mydomain.com/members?ID=000565

The page reads that info and sends the user automatically to

http://www.mydomain.com/cgi-bin/view.cgi/000565/index.html

That is it...

IN ASP the script would be as follows
*****************************
<%
dim members
members = request.querystring("ID")
Responce.redirect("http://www.mydomain.com/cgi-bin/view.cgi/" & members & "/index.html")
%>
*****************************

simple... however i need it is php, can someone help me...

I look forward to your replies...

Keith

Reply With Quote


Sponsored Links
  #2  
Old 08-23-2002, 08:14 AM
michaeln michaeln is offline
Web Hosting Master
 
Join Date: Nov 2001
Posts: 857
PHP Code:
<?
  $header_location 
"Location: http://www.mydomain.com/cgi-bin/view.cgi/" $ID "/index.html";
  
header($header_location);
  exit;
?>

__________________
<?
header("Location: http://www.hostevolve.com/");
?>

Reply With Quote
  #3  
Old 08-23-2002, 08:21 AM
krappleby krappleby is offline
New Member
 
Join Date: Aug 2002
Posts: 2
Thank you very much, will try that this evening

Reply With Quote
Sponsored Links
  #4  
Old 08-24-2002, 12:59 PM
Tom|420 Tom|420 is offline
Junior Guru
 
Join Date: Jun 2002
Location: Sherbrooke, Québec
Posts: 182
Make sure there are not spaces/returns before <? or after ?> so that nothing is sent before header information. If you do, you will get a message such as "Header already sent"

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Service Providers Push Updates to Fight OpenSSL Heartbleed Bug Web Hosting News 2014-05-01 08:31:27
Web Hosting Sales and Promos Roundup - December 6, 2013 Web Hosting News 2014-05-23 15:42:37
Nasuni Launches Cloud Mirroring Feature to Storage Solution Web Hosting News 2013-08-08 14:15:27
OpenStack and the AWS API Debate Web Hosting News 2014-05-09 12:40:29
Pingdom Talks Top Web Hosting Cities and Countries Web Hosting News 2014-05-09 12:40:35


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?