Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 06-06-2005, 10:21 PM Need Little Help...
waller's Avatar
Skilled Talker

Posts: 59
Location: North Borneo.
Trades: 0
Is there any function that can take a user to another link. For example.......

PHP Code:
if($ax="1")
thefunction(thelink1) };
else
thefunction(thelink2) }; 
secondly, does "=>" in
PHP Code:
$key => $value 
means 'equal or bigger than'?

lastly, whats the different between '$$key' and '$key'?
waller is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-07-2005, 02:03 AM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
1/ Header

2/ No
PHP Code:
 $key >= $value 
is greater than or equal to

PHP Code:
$key => $value 
is an associative array assignment array

3/ Variable variable
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-07-2005, 02:14 PM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
Quote:
Originally Posted by waller
Is there any function that can take a user to another link. For example.......

PHP Code:
if($ax="1")
thefunction(thelink1) };
else
thefunction(thelink2) }; 
waller, this can be done if you have not yet sent any content to the client (includes blank lines, any HTML, print statements, etc). Use the header() function.

PHP Code:


$ax 
$_GET[somevar];

if( 
$ax )
{
    
header("Location:  http://www.somewhere.com" );
}
else
{
    
header"Location:  http://somewhere-else.com" );

This will work. What will not work is if you have any blank lines or content before the call to the header() function.
__________________
—Kyrnt

Last edited by Kyrnt; 06-16-2005 at 12:18 PM..
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 06-07-2005, 09:36 PM
waller's Avatar
Skilled Talker

Posts: 59
Location: North Borneo.
Trades: 0
Thanks....I have another one.
How can we display a page only for a period of time.
For example.....(index.php) go to (premain.php[wait 3 second]) go to (main.php).
After I login from "index.php" I just want to display the "premain.php" page for 3 seconds and then it automatically go to "main.php" after that. Any existing function that can do that?
waller is offline
Reply With Quote
View Public Profile
 
Old 06-08-2005, 03:33 AM Page Loading...
waller's Avatar
Skilled Talker

Posts: 59
Location: North Borneo.
Trades: 0
How can we display a page only for a period of time.

For example.....(index.php) go to (premain.php[wait 3 second]) go to (main.php).

After I login from "index.php" I just want to display the "premain.php" page for 3 seconds and then it automatically go to "main.php". Any existing function that can do that, or does anyone have any personally made function?
waller is offline
Reply With Quote
View Public Profile
 
Old 06-08-2005, 04:56 AM
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
The problem has nothing to do with php. Look at <meta http-equiv="Refresh"> in HTML. After you gave the page to the browser you cannot manipulate it.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 06-08-2005, 09:50 AM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
Here's a very simple example. This uses an absolute URL (full qualified), but you could use just premain.php as the URL value.

HTML Code:
<HTML>
<HEAD>
<TITLE>redirect</TITLE>
<META HTTP-EQUIV="refresh" CONTENT="10;URL=http://www.bobsworld.com">
</HEAD>
<BODY>
You are about to be redirected in 10 seconds to <a href="http://www.bobsworld.com">Bob's World</a></BODY>
</HTML>
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Reply     « Reply to Need Little Help...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.36414 seconds with 12 queries