Help - Search - Members - Calendar
Full Version: Php
Zymic Webmaster Forums > Zymic Free Web Hosting > Databases & MySQL
ace29
Hi

I am new to PHP and I am trying to create a link to another page.
swordz
Do you mean an automatic redirect, or just a link to be pressed?

If you want a redirect, use the header() function. If a link you actually want html, and need to echo the code.

swordz
ace29
QUOTE(swordz @ Feb 1 2009, 11:23 PM) *
Do you mean an automatic redirect, or just a link to be pressed?

If you want a redirect, use the header() function. If a link you actually want html, and need to echo the code.

swordz


I actually did this:

echo "<a href = "localhost/temp/Project/add_facility_type.php"></a>";

but it didn't work.
swordz
You need to escape the "'s in the code, or use literal strings.

Either:
echo "<a href=\"localhost/temp/Project/add_facility_type.php\"></a>";

or:
echo '<a href="localhost/temp/Project/add_facility_type.php"></a>';

swordz
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.