Forum Moderators: coopster

Message Too Old, No Replies

guestbook scripting error

need help on if and echo statement to hide link from view

         

sdaugher

4:06 am on Dec 15, 2003 (gmt 0)

10+ Year Member



In the following php code I have created a page called pp10_01.php. When opened a simple screen becomes visible in the browser asking them to "sign my guestbook". It also has a line of text "view latest additions".

The sign my guestbook link activates an if statement that brings the form into view.

Once in view I am trying to create a new if and echo statement that hides the sign my guestbook link. You can view the active code by clicking here.

Here is the code that I have written thus far.

<?php

if(isset($HTTP_GET_VARS['option'])){
?>
<table border=0 cellpadding=4 cellspacing=0 width='100%'>
<tr>
<td align='left'>
<table border=1 cellpadding=4 cellspacing=0 bordercolor='#5C185B'>
<form method='post' action='pp10_01.php'></tr>
<tr>
<td align='center' colspan='2' bgcolor='#E890E7'>
<font color='#550F5B' face='arial' ><b>Sign My Guest Book Here</b></font>
</td>
</tr>
<tr>
<td align='right'>
<font face='arial'>Name</font>
</td>
<td>
<input name='Name' type='text' maxlength='100' size='30'>
</td>
</tr>
<tr>
<td align='right'>
<font face='arial'>Title</font>
</td>
<td>
<input name='Title' type='text' maxlength='10' size='30'>
</td>
</tr>
<tr>
<td align='right' maxlength='4'>
<font face='arial'>Message</font>
</td>
<td><textarea name='message' cols='40'rows='15'></textarea>
</td>
</tr>
<tr>
<td colspan='2' align='center'>
<input type='submit' value='Submit'>
</td>
</tr>
</form>
</table>
<?php

}

if(!isset($HTTP_GET_VARS['option'])){
?>
//not sure what to put here to hide the sign my guestbook link.
<?php

}

?>
<html>
<head><title>Welcome to My Guest Book</title>
<body bgcolor="#DFB5E3">
<font face='arial'>
<a href = 'pp10_01.php?option=showform'>
<font color='#550F5B' size='4'><b>Sign My Guest
Book</b></a></font><br><br>

<font color='#550F5B' size='4'><b>View Latest Additions</b></font><br><br>

[edited by: jatar_k at 5:56 pm (utc) on Dec. 15, 2003]
[edit reason] no urls thanks [/edit]

coopster

2:12 pm on Dec 15, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, sdaugher!

Looks like you may have already figured this out?

sdaugher

5:10 pm on Dec 15, 2003 (gmt 0)

10+ Year Member



Yes I did thanks for looking any way.

S