First, how many guestbook entries are there before it puts them on to other pages (I need to fit it within a set page size)
Is there a way I can have the persons name and email address filled in automatically from a session that would have started previously? The user would have been logged in and it seems pointless and frustrating to have to enter that information when it is already stored ina database
Couple of simple questions
Re: Couple of simple questions
Well if you have the name/email/etc... stored in a session you could edit the GBook form and add the values from session to the form, try changing and playing around withAdRock wrote:Is there a way I can have the persons name and email address filled in automatically from a session that would have started previously? The user would have been logged in and it seems pointless and frustrating to have to enter that information when it is already stored ina database
Code: Select all
function printSign($name='',$from='',$email='',$url='',$comments='',$nosmileys='',$isprivate='',$error='') {
Code: Select all
function printSign($name=$_SESSION['name'], $from='', $email=$_SESSION['email'],$url='' , $comments='',$nosmileys='', $isprivate='', $error='') {
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Can you post that line (and few lines around it) here?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Code: Select all
function printSign($name=$_SESSION['name'], $from='', $email=$_SESSION['email'],$url='' , $comments='',$nosmileys='', $isprivate='', $error='') {
global $settings;
$url=$url ? $url : 'http://';
?>
<h3 align="center">Sign guestbook</h3>
<p>Required fields are <b>bold</b>.</p>
<form action="gbook.php" method="POST" name="form">
<input type="hidden" name="a" value="add">
<table class="entries" cellspacing="0" cellpadding="4" border="0">
<tr>
<td>
Ah, that won't work, forgot you can't assign variable sot variables in function call.
You will have to edit the form itself, for example change the
to
DON'T just use $_SESSION['name'] , use whatever variable your sessions use to store the name.
You do know what variables your session uses, don't you?
If YES: then you shouldn't have problems setting it up from here on
if NO: sorry, can't help you then, I'm not hear to study other's scripts and teach anyone PHP/HTML
You will have to edit the form itself, for example change the
Code: Select all
value="<?php echo $name; ?>"
Code: Select all
value="<?php echo $name ? $name : $_SESSION['name']; ?>
You do know what variables your session uses, don't you?
If YES: then you shouldn't have problems setting it up from here on

if NO: sorry, can't help you then, I'm not hear to study other's scripts and teach anyone PHP/HTML
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools