Jump to content

Change Tite On Submit


Dragosvr92

Recommended Posts

Hey

 

i am making a page and i want the first page to have a title and when submitting the GET Form to change the title completly so i made myself this little script but it gives me this error at the unset line

 

Parse error: parse error in C:\wamp\www\New Folder\index.php  on line 8

 

<?
if (unset($_GET['ID'])){
echo 'Title from the First page';
}
else {
if (isset($_GET['ID'])) echo 'Tracked'$_GET['ID'];
}
?>

 

Dos anyone have an idea how may i get it fixed?

Link to comment
https://forums.phpfreaks.com/topic/206332-change-tite-on-submit/
Share on other sites

Ha, my error pick up was right off the bat didn't look at the beginning of the code.

 

unset is to basically remove anything tied to the variable. For instance

unset($_SESSION['username'])

 

You want to do something like:

 

<?php
if(isset($_GET['ID'])){
echo "Tracked" . htmlentities($_GET['ID']);
}else {
echo "Title from the First page";
}
?>

the script is 2 posts upside... anyways here it is

 

<?$TEST = if(isset($_GET['ID'])){echo "Tracked :" . ' ' .htmlentities(ucfirst($_GET['ID']));} else {echo "Yahoo! Messenger Tracker";}?>

 

why is it giving me that Parse error: parse error in C:\wamp\www\ym\index.php on line 17

error?

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.