Jump to content

Change Tite On Submit


Dragosvr92
Go to solution Solved by kenrbnsn,

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
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";
}
?>

Link to comment
Share on other sites

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?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.