php-general Digest 8 Dec 2002 16:38:31 -0000 Issue 1751
Topics (messages 127414 through 127436):
Re: Just Curious
127414 by: Leif K-Brooks
127415 by: Justin French
127419 by: Kyle Gibson
127420 by: rolf vreijdenberger
127422 by: Thomas Seifert
127424 by: Davy Obdam
127427 by: Henrik Malmberg
Question about Trim
127416 by: Dade Register
127418 by: Justin French
Free Util: apxDebug
127417 by: Weston Houghton
Dumb session cookie question?
127421 by: Douglas Douglas
127423 by: Justin French
127428 by: Robert Pruitt
Snoopy Class
127425 by: DL Neil
Domxml and problem
127426 by: Winthux
Re: save file from outside url
127429 by: Jason Wong
Re: Finding Mode
127430 by: Ford, Mike [LSS]
open_basedir
127431 by: Przemysław Żółczyński PRV
force download with header()
127432 by: Patrick McKinley
127433 by: Marco Tabini
mysql_connect problem under RedHat 8.0 ?
127434 by: Brian J. Celenza
LogIn check within function within class :: HELP!
127435 by: Sean Mayhew
127436 by: Tom Rogers
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
I use the mailing list.
conbud wrote:
I was just curious, but what program or website do you all use to view and
reply to the newsgroups with ?
Lee
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
--- End Message ---
--- Begin Message ---
I use the e-mailing list, not the newsgroup... but I think there is an
*experimental* web based interface to the newsgroup at http://news.php.net,
and most mail readers (outlook, outlook express and netscape I know for
sure) can all read news.
on 08/12/02 3:31 PM, conbud ([EMAIL PROTECTED]) wrote:
> I was just curious, but what program or website do you all use to view and
> reply to the newsgroups with ?
>
> Lee
>
>
Justin French
--------------------
http://Indent.com.au
Web Development &
Graphic Design
--------------------
--- End Message ---
--- Begin Message ---
I was just curious, but what program or website do you all use to view and
reply to the newsgroups with ?
Fun Fact # 14:
Netscape 7.0
;)
--
Kyle Gibson
admin(at)frozenonline.com
http://www.frozenonline.com/
--- End Message ---
--- Begin Message ---
outlook express 6
--- End Message ---
--- Begin Message ---
Mail/News-Client Sylpheed
On Sat, 7 Dec 2002 23:31:57 -0500 [EMAIL PROTECTED] (Conbud) wrote:
> I was just curious, but what program or website do you all use to view and
> reply to the newsgroups with ?
>
> Lee
>
>
--- End Message ---
--- Begin Message ---
Mozilla 1.2.1 ;-)
conbud wrote:
I was just curious, but what program or website do you all use to view and
reply to the newsgroups with ?
Lee
--- End Message ---
--- Begin Message ---
Also using Mozilla
Davy Obdam wrote:
Mozilla 1.2.1 ;-)
conbud wrote:
> I was just curious, but what program or website do you all use to view
> and
> reply to the newsgroups with ?
>
> Lee
>
>
>
>
>
--- End Message ---
--- Begin Message ---
Hey... I have a question about trim. I don't know if
trim() is the right funtion to use, but here is my
problem.
I am recieving a textarea input from a form and
writing it to a data file. I need to change any line
breaks or (enter) if you will into a <br> or something
else. When it's in my text file, it screws it up.
Please, someone give me an idea of how to oversome
this. I can't seem to make trim() work at all. It does
remove a \n if you type that in, but won't actually
remove an (enter). Thanx for your help in advance.
-Dade
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--- End Message ---
--- Begin Message ---
To convert \n's to <br />\n's on any string, use nl2br().
To trim excess white space (\n, \r, [space] \t, etc) from both the beginning
and end of a string, use trim().
Eg:
<?
$str = "this is a string with an\nenter in the middle, and two at the
end\n\n";
$str = trim($str);
$str = nl2br($str);
echo $str;
?>
This should echo:
---
this is a string with an<br />
enter in the middle
---
What do you actually want to do, and what's the problem?
Justin
on 08/12/02 5:28 PM, Dade Register ([EMAIL PROTECTED]) wrote:
> Hey... I have a question about trim. I don't know if
> trim() is the right funtion to use, but here is my
> problem.
>
> I am recieving a textarea input from a form and
> writing it to a data file. I need to change any line
> breaks or (enter) if you will into a <br> or something
> else. When it's in my text file, it screws it up.
> Please, someone give me an idea of how to oversome
> this. I can't seem to make trim() work at all. It does
> remove a \n if you type that in, but won't actually
> remove an (enter). Thanx for your help in advance.
>
> -Dade
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
Justin French
--------------------
http://Indent.com.au
Web Development &
Graphic Design
--------------------
--- End Message ---
--- Begin Message ---
Hey all,
I've been meaning to write a simple debug tracking class for use in my
own projects. So this week I finally did. I have no clue if anyone else
would ever use it, or have any interest in looking at it, but I've set
it up for people to download it if you have any interest. Regardless, I
would love if people wanted to take a look at it and just give me
general comments on the code.
http://www.anapraxis.com/os/apxDebug/
What does it do?
It's just a simple tool for logging debug messages from within any
other php development. Being a MacOS X user for developing and serving,
I find that many of the nice tools, such as Zend's aren't available for
real debugging. So I frequently am writing values out to screen for
debugging. This tool separates them mostly from whatever you are
working on and let's you classify them, and show/hide groups of them
when browsing. I've set up a simple online demo, but since it really is
for development it may be hard to understand without just trying it out
in your own code.
I've been developing tools for installations on clients intranet
servers lately too, to where I cannot see in, but they can see out. So
I have written the tool to both log the debug info to a text file, as
well as email the logfile to an address through the browser pop-up.
Right now it only does html emails, but I am working on getting it
setup to handle plain text and mixed mode as well.
It uses css, dhtml, and javascript for the display so likely requires
gecko or MSIE 5 or higher. Also, if you are just interested in seeing
php and javascript work together, it might be a good introduction for
you, nothing complicated, I just use php to feed in some of the js
variables.
Anyhow, drop me a line with any questions if you have them, or feature
requests, I'd love to know if anyone else besides me would actually use
this thing. :) Oh, and if it just completely screws up for you, let me
know too. I'd call this a 0.9 beta version, so I'm sure it will find a
way to surprise me.
Cheers,
Wes
--- End Message ---
--- Begin Message ---
Hi all.
I'm sorry about the dumb question, but I've just
expend two hours trying to find the damn cookie and I
couldn't :(
I've read that when you use sessions and configure the
php.ini with session.use_cookies = 1, your sessions
will always send cookies to the client (if the client
accept the cookies)...
Is that right?
I ask because I'm reading my first tutorial about
sessions and it worked fine... but I can't find where
IE6 (Windows XP, Apache 1.3.27) stores those cookies I
used... I want to see the cookie's contents...
So I was wondering if PHP really sends the cookies,
but I also printed the $_SESSION and $_COOKIE arrays
and it displayed the correct information... in
$_COOKIE displayed PHPSESSID == XXXXXXXXXXXX, so I
think there is some cookie somewhere, my question is
where is it?
I'm so confused right now...
Thanks for any help. Sorry again.
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--- End Message ---
--- Begin Message ---
if you are allowing cookies on your browser, and the sessions are working
(as they appear to be), then there WILL be a cookie somewhere on your
browsing computer.
However, I think you're a little confused about what you'll find... you'll
just find a cookie named PHPSESSID, with a value of XXXXXXXXXX.
A common misconception about sessions is that the session vars get stored on
the user's computer... WRONG. ONLY the session id is stored on the user's
computer (either in a cookie, or via the URL). Session vars and values are
ASSOCIATED with that session id ON THE SERVER.
WHERE exactly the cookie is stored on your CLIENT (viewing) hard drive will
depend on the OS, Browser, and a heap of settings.
WHERE exactly the session vars and values are stored on your SERVER will
depend on a few PHP settings.
What are you trying to achieve? To test if a cookie exists on the user's
computer, you use the $_COOKIE array. To assign values to a session, you
use the $_SESSION array (which associates a php session id (stored/carried
by the user) with a bunch of session vars/values stored on the server).
Justin
on 08/12/02 10:17 PM, Douglas Douglas ([EMAIL PROTECTED]) wrote:
> Hi all.
> I'm sorry about the dumb question, but I've just
> expend two hours trying to find the damn cookie and I
> couldn't :(
> I've read that when you use sessions and configure the
> php.ini with session.use_cookies = 1, your sessions
> will always send cookies to the client (if the client
> accept the cookies)...
> Is that right?
> I ask because I'm reading my first tutorial about
> sessions and it worked fine... but I can't find where
> IE6 (Windows XP, Apache 1.3.27) stores those cookies I
> used... I want to see the cookie's contents...
> So I was wondering if PHP really sends the cookies,
> but I also printed the $_SESSION and $_COOKIE arrays
> and it displayed the correct information... in
> $_COOKIE displayed PHPSESSID == XXXXXXXXXXXX, so I
> think there is some cookie somewhere, my question is
> where is it?
> I'm so confused right now...
> Thanks for any help. Sorry again.
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
Justin French
--------------------
http://Indent.com.au
Web Development &
Graphic Design
--------------------
--- End Message ---
--- Begin Message ---
IE traditionally puts cookies in a folder named Cookies.
Do a search for 'cookies' -- see what you come up with.
on 08/12/02 10:17 PM, Douglas Douglas ([EMAIL PROTECTED]) wrote:
Hi all.
I'm sorry about the dumb question, but I've just
expend two hours trying to find the damn cookie and I
couldn't :(
I've read that when you use sessions and configure the
php.ini with session.use_cookies = 1, your sessions
will always send cookies to the client (if the client
accept the cookies)...
Is that right?
I ask because I'm reading my first tutorial about
sessions and it worked fine... but I can't find where
IE6 (Windows XP, Apache 1.3.27) stores those cookies I
used... I want to see the cookie's contents...
So I was wondering if PHP really sends the cookies,
but I also printed the $_SESSION and $_COOKIE arrays
and it displayed the correct information... in
$_COOKIE displayed PHPSESSID == XXXXXXXXXXXX, so I
think there is some cookie somewhere, my question is
where is it?
I'm so confused right now...
Thanks for any help. Sorry again.
--- End Message ---
--- Begin Message ---
(pardon the pun)
Please recommend a Snoopy tutorial,
=dn
PS Google has not been my friend!
--- End Message ---
--- Begin Message ---
I have the newest foxserv on my comp. When i'm trying to open a xml document
with function $doc = domxml_open_file("test.xml");
It appears an error like this:
Warning: warning: in C:\FoxServ\www\nTrophy_usr_auth\nowy.php on line 3
Warning: failed to load external entity "menu.xml" in
C:\FoxServ\www\nTrophy_usr_auth\nowy.php on line 3
Fatal error: Call to a member function on a non-object in
C:\FoxServ\www\nTrophy_usr_auth\nowy.php on line 4
I had downloaded libxml and installed it. domxml.dll is in
c:\windows\system32 (i have win xp sp1). I don't know why this error
appears. In my opinion everything is ok. Coudl someone help me, please ?
--- End Message ---
--- Begin Message ---
On Sunday 08 December 2002 00:47, Jeremiah Breindel wrote:
> Thanks for responing Jason!
>
> There is other code in there for updating some database entries and
> producing a confirmation page, but I had them working perfectly before I
> added the image code below. Only when acessing the outside script and
> saving to file did it start doing the odd things. I didn't write the image
> creation script, only hard coded in some values for font and bg colors in
> it. I have attached that script at the bottom of this, away from
> everything else. Maybe a header problem from that script? Any idea what
> 427 is from? Thanks for all your help!
> The $image_url is like this - "$rollover_image_url =
> "http://www.anysite.com//pngmake.php?msg=" . $rollover .
> "&rot=0&size=12&font=fonts/ARIAL.TTF";
Two things you need to do:
1) Plug the value of $rollover_image_url into a browser and satisfy yourself
that the resulting URL does indeed return a valid image, and hence said URL
is valid.
2) Plug in a known, static, valid URL (of an image -- actually it can be
anything it doesn't really matter) into your code below, and satisfy yourself
that the your code does work.
> > > local file on my server using the code below:
> > >
> > > $fc = fopen($image_filename, "wb");
> > > $file = fopen ($image_url, "rb");
> > >
> > > if (!$file) {
> > > echo "<p>Unable to open remote file.\n";
> > > exit;
> > > }else{
> > > while (!feof ($file)) {
> > > $line = fread ($file, 1028);
> > > fwrite($fc,$line);
> > > }
> > > }
> > > fclose($fc);
> > > fclose($file);
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Chicago law prohibits eating in a place that is on fire.
*/
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Rick Widmer
>
> At 07:12 PM 12/7/02 -0500, Stephen wrote:
> >Another math question... How would I find the mode (number that repeats
most
> >often) of an array? Then, if there isn't a number that repeats most
often,
> >tell the user that.
>
> For each entry in the array, count the number of times a value occurs:
>
> while( list( , $Value ) = each( $MyArray )) {
> $NumberHits[ $Value ] ++;
> }
Or use the built-in function:
$NumberHits = array_count_values($MyArray);
Cheers!
Mike
--- End Message ---
--- Begin Message ---
When I am try toput photo to the server I get this:
Warning: open_basedir restriction in effect. File is in wrong directory in
/mnt/host-users/zolty/tools/addprod.php on line 117
What is this?
Przemek
--- End Message ---
--- Begin Message ---
i was reading about php.net looking for a way to force a download of a txt file,
rather than the browser displaying the file.
i ran into header() that seems to be able to accomplish it... but seeing as i'm very
much a newbie at php, i can't seem to make this work
if the file i want to download is
nfo/60/ind.txt
how would i impliment this:
<?php
// We'll be outputting a PDF
header("Content-type: application/pdf");
// It will be called downloaded.pdf
header("Content-Disposition: attachment; filename=downloaded.pdf");
// The PDF source is in original.pdf
readfile('original.pdf');
?>
--- End Message ---
--- Begin Message ---
Are you using Internet Explorer? Then it's a "feature" of IE--it ignores
the disposition headers sent by your server because its registry tells
it that PDF files must be "viewed" inline. There's a way around it,
although it's a bit kludgy--I wrote a small article about it that you
can find here (it's in PDF format, as well):
http://www.phparch.com/issuedata/2002/december/sample.php
Essentially, you're telling IE to download a file with the extension
".pdf " (not the space) so that it can't match the MIME type anymore and
will follow your suggestion of downloading the file instead of
displaying it inline.
Hope this helps!
Cheers,
Marco
--
------------
php|architect - The Magazine for PHP Professionals
The monthly magazine dedicated to the world of PHP programming
Check us out on the web at http://www.phparch.com!
--- Begin Message ---
i was reading about php.net looking for a way to force a download of a txt file,
rather than the browser displaying the file.
i ran into header() that seems to be able to accomplish it... but seeing as i'm very
much a newbie at php, i can't seem to make this work
if the file i want to download is
nfo/60/ind.txt
how would i impliment this:
<?php
// We'll be outputting a PDF
header("Content-type: application/pdf");
// It will be called downloaded.pdf
header("Content-Disposition: attachment; filename=downloaded.pdf");
// The PDF source is in original.pdf
readfile('original.pdf');
?>
--- End Message ---
--- End Message ---
--- Begin Message ---
Hello!
When trying to connect to a mysql database under my linux system, I get the
following error:
Warning: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2) in /webroot/dbconnect.php on line 2
Here is a copy of the code I am using:
<?
$link = mysql_connect("localhos" , "username" , "password")
or die("Couldn't Connect.");
?>
I am currently running Apache with Mysql and PHP version 4 on Redhat 8. Any
suggestions?
Thank you.
--
---------------------------------------------------------------
Brian J. Celenza
[EMAIL PROTECTED]
ICQ: 100942424
AIM: BJCKnight
--- End Message ---
--- Begin Message ---
Im just about at wits end here Im trying to verify that a users ID and
Password exist in the MySQL Database and then if it does display certain
content and if it does not display login form content.
###At present here is the error I'm recieving:
Warning: Missing argument 3 for verifylogin() in
/home/www/websitename/admin/include/adminclass.inc on line 78
This stupid thing STILL Does NOT WORK!
####Here is my class FILE
<?
class ADMINPAGE
{
//class adminpage's attributes
var $title = "75";
var $content;
var $buttons = array("[ admin ]" => "admin_root.php",
"[ orders ]" => "orders_root.php",
"[ customers ]" => "customers_root.php",
"[ products ]" => "products_root.php",
"[ categories ]" => "categories_root.php",
"[ manufacturers ]" => "manufacturers_root.php",
"[ vehicles ]" => "vehicles_root.php");
var $count;
function SetTitle($newTitle)
{
$this->title = $newTitle;
}
function SetContent($newContent)
{
$this->content = $newContent;
}
function SetButtons($newbuttons)
{
$this->buttons = $newbuttons;
}
function Display($employeeid,$password,$title,$count)
{
session_start();
session_register("employeeid");
$this -> VerifyLogin($employeeid,$password);
switch($count)
{
case "1":
$this -> DisplayHeader($title,$employeeid);
echo "<center><br>";
$this -> DisplayMenu($this->buttons);
echo "</center><br>";
$this -> DisplayFooter();
break;
default:
echo "This stupid thing STILL Does NOT WORK!";
break;
}
}
function DisplayHeader($title,$employeeid)
{
echo "<html>\n<head>\n<title>$title</title>";
echo "<link href='/aistyles.css' rel='stylesheet' type='text/css'>";
echo "</head>\n<body leftmargin='0' topmargin='0' marginwidth='0'
marginheight='0' >\n";
echo "<table width='100%' border='0' cellspacing='0'
cellpadding='0'>";
echo "<tr>";
echo "<td bgcolor='#FF6600'> <div align='left'><img
src='/images/designelements/logo.gif' width='348' height='35'></div></td>";
echo "</tr>";
echo "<tr>";
echo "<td bgcolor='#000000'>";
echo "<table width='100%' border='0' cellspacing='0'
cellpadding='0'>";
echo "<tr>";
echo "<td><img src='/images/designelements/spacer.gif' width='5'
height='15'></span></td>";
echo "<td><span class='admin_header'>ADMINISTRATOR LOGGED
IN: ";
echo $employeeid;
echo "</span></div>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</td>";
echo "</tr>";
echo "</table>";
}
function VerifyLogin($employeeid,$password,$count)
{
include('dbconnection.php');
$employeequery = "Select count(*) from employees where employeeid =
'$employeeid' and password='$password'";
$employeeresult = mysql_query($employeequery);
if(!$employeeresult)
{
echo 'Please Try Again Later.';
exit();
}
$count = mysql_result($employeeresult,0,0);
if($count>0)
{
$count = "1";
}
else
{
$count = "0";
}
}
function DisplayMenu($buttons)
{
echo "<table width = \"500\" bgcolor=\"#000000\" cellpadding=\"1\"
cellspacing=\"0\"><tr><td>";
echo "<table width=\"100%\" bgcolor=\"#ff6600\" cellpadding=\"1\"
cellspacing=\"0\"><tr><td>";
echo"<div align=center><table width=\"100%\" bgcolor=\"#ffffff\"
cellpadding=\"5\" cellspacing=\"0\"><tr><td>";
$width = 100/count($buttons);
while(list($name,$url) = each ($buttons))
{
$this ->DisplayButton($width,$name,$url);
}
echo "</td></tr></table></div>";
echo "</td></tr></table>";
echo "</td></tr></table>";
}
function DisplayButton($width,$name,$url)
{
echo "<td width =\"$width%\"><a href = \"$url\"><span class =
small>$name</span></a></td>";
}
function DisplayFooter()
{
?>
<table width="100%" height="100%" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td valign="top" bgcolor="#000000"><img src="/images/spacer.gif"
width="1" height="300"></td>
</tr>
</table>
</body></html>
<?
}
}
?>
####Here is sample page usage of class file
<?
require ("include/adminclass.inc");
$test = new adminpage();
$title = "This is a Nice Page";
$content = "Some Temporary Content";
$test ->SetContent($content);
$test ->Display($employeeid,$password,$title,$count);
?>
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
--- End Message ---
--- Begin Message ---
Hi,
Monday, December 9, 2002, 2:24:47 AM, you wrote:
SM> Im just about at wits end here Im trying to verify that a users ID and
SM> Password exist in the MySQL Database and then if it does display certain
SM> content and if it does not display login form content.
SM> ###At present here is the error I'm recieving:
SM> Warning: Missing argument 3 for verifylogin() in
SM> /home/www/websitename/admin/include/adminclass.inc on line 78
SM> This stupid thing STILL Does NOT WORK!
SM> ####Here is my class FILE
SM> <?
SM> class ADMINPAGE
SM> {
SM> //class adminpage's attributes
SM> var $title = "75";
SM> var $content;
SM> var $buttons = array("[ admin ]" => "admin_root.php",
SM> "[ orders ]" => "orders_root.php",
SM> "[ customers ]" => "customers_root.php",
SM> "[ products ]" => "products_root.php",
SM> "[ categories ]" => "categories_root.php",
SM> "[ manufacturers ]" => "manufacturers_root.php",
SM> "[ vehicles ]" => "vehicles_root.php");
SM> var $count;
SM> function SetTitle($newTitle)
SM> {
SM> $this->title = $newTitle;
SM> }
SM> function SetContent($newContent)
SM> {
SM> $this->content = $newContent;
SM> }
SM> function SetButtons($newbuttons)
SM> {
SM> $this->buttons = $newbuttons;
SM> }
SM> function Display($employeeid,$password,$title,$count)
SM> {
SM> session_start();
SM> session_register("employeeid");
SM> $this -> VerifyLogin($employeeid,$password);
SM> switch($count)
SM> {
SM> case "1":
SM> $this -> DisplayHeader($title,$employeeid);
SM> echo "<center><br>";
SM> $this -> DisplayMenu($this->buttons);
SM> echo "</center><br>";
SM> $this -> DisplayFooter();
SM> break;
SM> default:
SM> echo "This stupid thing STILL Does NOT WORK!";
SM> break;
SM> }
SM> }
SM> function DisplayHeader($title,$employeeid)
SM> {
SM> echo "<html>\n<head>\n<title>$title</title>";
SM> echo "<link href='/aistyles.css' rel='stylesheet' type='text/css'>";
SM> echo "</head>\n<body leftmargin='0' topmargin='0' marginwidth='0'
marginheight='0' >>\n";
SM> echo "<table width='100%' border='0' cellspacing='0'
cellpadding='0'>>";
SM> echo "<tr>";
SM> echo "<td bgcolor='#FF6600'> <div align='left'><img
SM> src='/images/designelements/logo.gif' width='348' height='35'></div></td>";
SM> echo "</tr>";
SM> echo "<tr>";
SM> echo "<td bgcolor='#000000'>";
SM> echo "<table width='100%' border='0' cellspacing='0'
cellpadding='0'>>";
SM> echo "<tr>";
SM> echo "<td><img src='/images/designelements/spacer.gif' width='5'
height='15'>></span></td>";
SM> echo "<td><span class='admin_header'>ADMINISTRATOR LOGGED
SM> IN: ";
SM> echo $employeeid;
SM> echo "</span></div>";
SM> echo "</td>";
SM> echo "</tr>";
SM> echo "</table>";
SM> echo "</td>";
SM> echo "</tr>";
SM> echo "</table>";
SM> }
SM> function VerifyLogin($employeeid,$password,$count)
SM> {
SM> include('dbconnection.php');
SM> $employeequery = "Select count(*) from employees where employeeid =
SM> '$employeeid' and password='$password'";
SM> $employeeresult = mysql_query($employeequery);
SM> if(!$employeeresult)
SM> {
SM> echo 'Please Try Again Later.';
SM> exit();
SM> }
SM> $count = mysql_result($employeeresult,0,0);
SM> if($count>0)
SM> {
SM> $count = "1";
SM> }
SM> else
SM> {
SM> $count = "0";
SM> }
SM> }
SM> function DisplayMenu($buttons)
SM> {
SM> echo "<table width = \"500\" bgcolor=\"#000000\" cellpadding=\"1\"
cellspacing=\"0\">><tr><td>";
SM> echo "<table width=\"100%\" bgcolor=\"#ff6600\" cellpadding=\"1\"
cellspacing=\"0\">><tr><td>";
SM> echo"<div align=center><table width=\"100%\" bgcolor=\"#ffffff\"
SM> cellpadding=\"5\" cellspacing=\"0\"><tr><td>";
SM> $width = 100/count($buttons);
SM> while(list($name,$url) = each ($buttons))
SM> {
SM> $this ->DisplayButton($width,$name,$url);
SM> }
SM> echo "</td></tr></table></div>";
SM> echo "</td></tr></table>";
SM> echo "</td></tr></table>";
SM> }
SM> function DisplayButton($width,$name,$url)
SM> {
SM> echo "<td width =\"$width%\"><a href = \"$url\"><span class =
small>>$name</span></a></td>";
SM> }
SM> function DisplayFooter()
SM> {
SM> ?>
SM> <table width="100%" height="100%" border="0" cellpadding="0"
cellspacing="0">>
SM> <tr>
SM> <td valign="top" bgcolor="#000000"><img src="/images/spacer.gif"
SM> width="1" height="300"></td>
SM> </tr>
SM> </table>
SM> </body></html>
SM> <?
SM> }
SM> }
?>>
SM> ####Here is sample page usage of class file
SM> <?
SM> require ("include/adminclass.inc");
SM> $test = new adminpage();
SM> $title = "This is a Nice Page";
SM> $content = "Some Temporary Content";
$test ->>SetContent($content);
$test ->>Display($employeeid,$password,$title,$count);
?>>
SM> _________________________________________________________________
SM> MSN 8 with e-mail virus protection service: 2 months FREE*
SM> http://join.msn.com/?page=features/virus
Well it is telling you that
$this -> VerifyLogin($employeeid,$password);
Does not match your declaration of
function VerifyLogin($employeeid,$password,$count)
You are missing the count bit
--
regards,
Tom
--- End Message ---