|
| |||||||||
| Tags: hide, php, relationship |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How to hide a relationship with php ?
I try to hide the address of links on my site, so they do not appear in the status bar (to avoid fraud memberships for those who know) I found this code, but it does not ... I have put in a test.php page: Code: <a href="test.php?site=1"> link </a>
<?
switch(site)
{
case 1: header ( "Location: " ... ); break;
case 2: header ( "Location: " ... ); break;
default: header ( "Location: " ... );
}
?> |
|
#2
| ||||
| ||||
| Re: How to hide a relationship with php ?
Several errors: - Documentation PHP header () indicates that header () must be called before any content is sent. - Switch (site) is not syntactically correct, replace it by: switch ($ _GET [ 'site']) Also, if I understood the code that you have found and what you want to link your <a href="http://forums.techarena.in/software-development/..."> ...</ a> and the switch () {... } do not belong in the same file/script. Logically it creates a confusion between client/server. |
|
#3
| |||
| |||
| Re: How to hide a relationship with php ?
I am rather "novice" you can tell me a bit more? I made 2 pages: test.php: Code: <body> <a href="redirect.php?site=1"> link </ a> </body> redirect.php: Code: <body>
<?
switch ($ _GET [ 'site'])
{
case 1: header ( "Location: ..." ...); break;
case 2: header ( "Location: ..." ...); break;
default: header ( "Location: ..." ...);
}
?>
</body> Plz help ![]() |
|
#4
| ||||
| ||||
| Re: How to hide a relationship with php ?
First, it is <?php and not <? to make PHP. Otherwise, it is header + Location that are headers. Headers, that by definition itself before anything else, either: PHP Code: Neither more nor less. |
|
#5
| |||
| |||
| Re: How to hide a relationship with php ?
Thank you Lemog, your idea worked. I found something, simple with form: Code: <form action="http://..." method="post" name="form1" target="_blank" id="form1"> <input type="image" src="http://forums.techarena.in/images/buttons/button1.jpg"/> </form> I get it not ... Have an idea? |
|
#6
| ||||
| ||||
| Re: How to hide a relationship with php ?
Basically, in HTTP, you first send headers then the data. So check whether you do not have spaces, line breaks or otherwise, that are sent with the <?php. |
|
#7
| |||
| |||
| Re: How to hide a relationship with php ?
YES! it works! thank you very much! |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to hide a relationship with php ?" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| is there any way to Hide relationship status in Facebook | mbangali | Technology & Internet | 3 | 21-08-2011 10:28 AM |
| Relationship between CPU & FSB | Untrusted | Motherboard Processor & RAM | 5 | 23-01-2011 08:24 AM |
| What is the relationship between class in UML | Radames | Software Development | 5 | 03-03-2010 04:59 AM |
| Auto-Hide toolbar won't hide? | Geoff from LA | Vista Help | 8 | 18-10-2009 07:52 AM |
| Trust relationship | William Lo | Window 2000 Help | 1 | 25-06-2008 07:24 PM |