Re: [PHP-DB] Newbie PHP/MySQL question

2002-12-20 Thread Seabird
LOL, Jason, you actually had me go back to the first post to re-read it for
a link or some code...

good skills there Jason,

Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
Jason Wong [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Saturday 21 December 2002 01:11, Matt Matijevich wrote:
  I am just getting started with php an mysql.
 
  When I try to insert a record php get stuck in some kind of loop and
  about 25 records are created.  Any help would be greatly appreciated.
 
  Windows 2000 server latest service pack.
  PHP 4.2.3
  MySql 3.23
  IIS 5.0

 My mind reading skills aren't very good, but I think there's something
wrong
 with line 13 of your program.

 --
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *


 /*
 The greatest disloyalty one can offer to great pioneers is to refuse to
 move an inch from where they stood.
 */




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] file upload array problem

2002-12-20 Thread Seabird
Hi everyone,

every time I try to upload a picture I get the same problem in return. First
of all, it's not being uploaded (but this is for later concern I'm afraid).
Trying to display the info of the (not)uploaded file should be done with:

$_FILES['picture']['name']

but every time I run this the return is a error like this:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in c:\apache\htdocs\seabird.jmtech.ca\otf.com\submit.php on
line 69

If I leave out the qoutes it runs fine but my output (echo) is Array['name']

Running a FILES list gives correct names and everything. Where did this go
wrong??

Here's my code aswell please help me, don't point me to another website
or manual (have read a dozen, and I'm still stuck).

if ($_POST[submit]) {

$link = mysql_pconnect(localhost,myuser,mypass);
$db = test;
mysql_select_db($db,$link);

$query = INSERT INTO inventory
(registration,type,total_time,price,description,picture_name)
VALUES
('$_POST[registration]','$_POST[type]','$_POST[total_time]','$_POST[price]',
'$_POST[description]','$_FILES[picture]');

exec(cp $_FILES[picture]
http://localhost/seabird.jmtech.ca/otf.com/images/$_FILES[picture][name];);

mysql_query( $query, $link);
print 'Thank youbrYou have submitted the following information:br';
echo Registration: $_POST[registration]br\n;
echo Type: $_POST[type]br\n;
echo Total Time: $_POST[total_time]br\n;
echo Price: $_POST[price]br\n;
echo Description: $_POST[description]br\n;
echo temp file: $_FILES[picture]br\n;
echo file name: $_FILES[picture][name]br\n;
echo file size: $_FILES[picture][size]br\n;
echo file type: $_FILES[picture][type]br\n;
echo br\n;
echo img src=images/$_FILES[picture][name]br\n;
}
else { ?
form enctype=multipart/form-data method=post
action=?php echo $PHP_SELF ?
  pRegistrationbr
input type=Text name=registration size=25 value=N
br
typebr
input type=Text name=type size=25
br
total timebr
input type=Text name=total_time size=25
br
pricebr
input type=Text name=price size=25
br
Descriptionbr
textarea name=description/textarea
br
picturebr
input type=file name=picture size=25
input type=submit name=submit value=Upload
  /p
/form
?php
}
echo pre;
print_r($_FILES);  // or use print_r($_POST) if you are using a POST instead
of a GET method for your form
echo /pre;
?

--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] picture into mysql (file address)

2002-12-19 Thread Seabird
since this is a local folder (testing on local server) I have complete
access everywhere. I judge from your sample that register_globals are ON and
mine are turned off (for several reasons.

Do I have a typo somewhere? where does my full path start etc.

the actual folder is in: c:\apache\htdocs\seabird.jmtech.ca\otf.com\images

pls help me.
Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
Terry Romine [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 One comment is to be sure the destination folder has write privileges
 for world.

 My typical usage is:

  2)  // datafile is field name for image/file upload browser
  $img_dir = ../photos; // must be 777 access
  if($datafile_name != ) {
  if ($datafile_name != none) {
  $newFileName = $datafile_name;
  if (!(copy($datafile, $img_dir/$newFileName))) {
  $errmsg = bcopying $newFileName failed/bbr;
  } else {
  $errmsg = bcopying $newFileName succeeded/bbr;
  }
  }
  }

 On Wednesday, December 18, 2002, at 02:20 PM, Seabird wrote:

  exec(cp $_POST[picture]
  //localhost/seabird.jmtech.ca/OTF.com/images/$_POST[picture_name]);




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] picture into mysql (file address)

2002-12-18 Thread Seabird
Hi everyone, I have been struggeling with this for some time know and don't
know where it goes wrong. I want to upload pictures into a folder AND store
their path into MySQL. I used a joe's auto tutorial but can't get it to
work. All the information is put in correctly but not the picture.

Please help me, here's my code: (ps globals are off)

if ($_POST[submit]) {

$link = mysql_pconnect(localhost,myusername,mypassword);
$db = test;
mysql_select_db($db,$link);

$query = INSERT INTO inventory
(registration,type,total_time,price,description,picture_name)
VALUES
('$_POST[registration]','$_POST[type]','$_POST[total_time]','$_POST[price]',
'$_POST[description]','$_POST[picture]');

exec(cp $_POST[picture]
//localhost/seabird.jmtech.ca/OTF.com/images/$_POST[picture_name]);

mysql_query( $query, $link);
print 'Thank youbrYou have submitted the following information:br';
echo Registration: $_POST[registration]br\n;
echo Type: $_POST[type]br\n;
echo Total Time: $_POST[total_time]br\n;
echo Price: $_POST[price]br\n;
echo Description: $_POST[description]br\n;
echo temp file: $_POST[picture]br\n;
echo file name: $_POST[picture_name]br\n;
echo file size: $_POST[picture_size]br\n;
echo file type: $_POST[picture_type]br\n;
echo br\n;
echo img src=images/$picture_namebr\n;
}
else { ?
form enctype=multipart/form-data method=post
action=?php echo $PHP_SELF ?
  pRegistrationbr
input type=Text name=registration size=25 value=N
br
typebr
input type=Text name=type size=25
br
total timebr
input type=Text name=total_time size=25
br
pricebr
input type=Text name=price size=25
br
Descriptionbr
textarea name=description/textarea
br
picturebr
input type=file name=picture size=25
input type=submit name=submit value=Upload
  /p
/form


--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] pictures into MySQL

2002-12-16 Thread Seabird
Hi everyone,

I know that inserting actual pictures into a MySQL DB is not the best
solution, but since I know the size is going to be limited I want to do it
anyways. How do I upload a picture into a DB? (what type of table etc.).

Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: upload data to MySql

2002-11-14 Thread Seabird
Thanx, I found out I forgot to pass it to my db.

Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
David Robley [EMAIL PROTECTED] wrote in message
news:MPG.183f2f6ec46a84169897c8;news.php.net...
 In article [EMAIL PROTECTED], [EMAIL PROTECTED]
 says...
  Hi everyone,
 
  I don't get my upload to work properly. It's a tutorial of the web, but
it
  doesn't function (unless I made a mistake). Please help me...
  I have a form passing on 5 fields (text for testing), name: year, make,
  model, price, picture and submit to PHP_SELF
 
  ?php
  if ($submit) {
 
  $db = mysql_connect(localhost,myname,mypassword);
 
  mysql_select_db($test,$db);
  //DB Test for testing...
 
  $sql = INSERT INTO test (year,make,model,price,picture) VALUES
  ('$year,$make,$model,$price,$picture');

 This line looks like your first problem. Each value being inserted which
 is a text type should be separately surrounded by single quotes. So:

  ('$year','$make','$model','$price','$picture');

 As a debugging aid, use

 echo mysql_error()

 after you pass the query to mysql with mysql_query() I don't see where you
 actually do that in this code snippet??

  //I created these columns in the table test
 
 
  echo year: $yearbr\n;
  echo make: $makebr\n;
  echo model: $modelbr\n;
  echo price: $pricebr\n;
  echo picture: $picturebr\n;
  }
 
  ?
 
  I know I need globals on for this.
  Thanx for the help,

 --
 David Robley
 Temporary Kiwi!

 Quod subigo farinam



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] upload data to MySql

2002-11-13 Thread Seabird
Hi everyone,

I don't get my upload to work properly. It's a tutorial of the web, but it
doesn't function (unless I made a mistake). Please help me...
I have a form passing on 5 fields (text for testing), name: year, make,
model, price, picture and submit to PHP_SELF

?php
if ($submit) {

$db = mysql_connect(localhost,myname,mypassword);

mysql_select_db($test,$db);
//DB Test for testing...

$sql = INSERT INTO test (year,make,model,price,picture) VALUES
('$year,$make,$model,$price,$picture');
//I created these columns in the table test


echo year: $yearbr\n;
echo make: $makebr\n;
echo model: $modelbr\n;
echo price: $pricebr\n;
echo picture: $picturebr\n;
}

?

I know I need globals on for this.
Thanx for the help,
Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] small database

2002-11-12 Thread Seabird
Hi everyone,

I'm creating a sample site for a company that does aircraft sales. I use a
MySQL DB to store all the info of the available aircraft. Now, I would like
to store pictures directly inside that same table, so that on the details
page, it would provide a picture out of (for example) Field5. Is this
possible and if so how? (I tried blob etc., but can't get it to work).

Thanx,
Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] forum test

2002-11-11 Thread Seabird
Thanx for the feedback. I was still working on the NN4 compatibility, and
had that message there until I got it solved. As you can see on my site,
most things are not near completion.

Thanx, for the script, I'll use it if my NN4 compatibility fales.

Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
Dwalker [EMAIL PROTECTED] wrote in message
news:01c289ec$74f20360$3650decf;b...
 Went to your page.  You might try to implement client side browser testing
 and redirect visitors to functional pages rather than display a message
 suggesting your page can't be viewed.  Most people would probably prefer
not
 to 'upgrade' just to see a single site they hadn't visited before.


 script language=JavaScript
 !--
 function

checkBrowser(NSvers,NSpass,NSnoPass,IEvers,IEpass,IEnoPass,OBpass,URL,altURL
 ) { file://v4.0
   var newURL='', verStr=navigator.appVersion, app=navigator.appName,
version
 = parseFloat(verStr);
   if (app.indexOf('Netscape') != -1) {
 if (version = NSvers) {if (NSpass0) newURL=(NSpass==1)?URL:altURL;}
 else {if (NSnoPass0) newURL=(NSnoPass==1)?URL:altURL;}
   } else if (app.indexOf('Microsoft') != -1) {
 if (version = IEvers || verStr.indexOf(IEvers) != -1)
  {if (IEpass0) newURL=(IEpass==1)?URL:altURL;}
 else {if (IEnoPass0) newURL=(IEnoPass==1)?URL:altURL;}
   } else if (OBpass0) newURL=(OBpass==1)?URL:altURL;
   if (newURL) { window.location=unescape(newURL);
 document.returnValue=false; }
 }
 file://--


 html
 body bgcolor=#FF text=#00

onLoad=checkBrowser(4.0,1,2,4.0,1,2,2,'www.someplaceelse.com','Goto%20to%20
 some%20other%20location');return document.returnValue
 /html




 -Original Message-
 From: Seabird [EMAIL PROTECTED]
 To: [EMAIL PROTECTED] [EMAIL PROTECTED]
 Date: Wednesday, November 06, 2002 1:22 PM
 Subject: [PHP-DB] forum test


 Hi everyone, I just uploaded my forum and would like to have it field
 tested
 by everyone. It'll prob still have some bugs in there.
 http://seabird.jmtech.ca
 go to website and then click on forum. please ignore the login in the
left
 top for now,
 
 Jacco
 
 
 --
 http://seabird.jmtech.ca
 
 Attitude is Everything!
 But Remember, Attitudes are Contagious!
 Is Yours worth Catching
 
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] forum test

2002-11-06 Thread Seabird
Hi everyone, I just uploaded my forum and would like to have it field tested
by everyone. It'll prob still have some bugs in there.
http://seabird.jmtech.ca
go to website and then click on forum. please ignore the login in the left
top for now,

Jacco


--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] forum test

2002-11-06 Thread Seabird
I'll look into it, thanx,

can you access the jump-menu?? Forum should be all the way in the bottom.

Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
Mignon Hunter [EMAIL PROTECTED] wrote in message
news:1036610707.1915.12.camel;joboo.tic.toshiba.com...
 I'm using Mozilla.  I dont see the word 'forum'

 I guess your onChange=loadIframeJumpMenu doesnt work ? Or the type of
 javascript your using isnt supported by Mozilla.

 BTW the nedstat failed to connect on first try.



 On Wed, 2002-11-06 at 12:25, Seabird wrote:
  Hi everyone, I just uploaded my forum and would like to have it field
tested
  by everyone. It'll prob still have some bugs in there.
  http://seabird.jmtech.ca
  go to website and then click on forum. please ignore the login in the
left
  top for now,
 
  Jacco
 
 
  --
  http://seabird.jmtech.ca
 
  Attitude is Everything!
  But Remember, Attitudes are Contagious!
  Is Yours worth Catching
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] security check

2002-11-03 Thread Seabird
Hi everyone,

on my site I created a login which is supposed to be secure. I'm not
familiar with how to surpass signups, but was wondering if people can see if
they can get my page to view without signing up. The page that is supposed
to be secured is the about me index. (the rest is still open).

http://seabird.jmtech.ca

Please report any other issues aswell.
Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Re: cookie trouble

2002-11-01 Thread Seabird
Now, I have set the cookie,

but when I run this code I always get the bye output.

Why??

 ?php
 if (isset($user))
 print 'hello';
 else
 print 'bye';
 ?


--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
Aaron Wolski [EMAIL PROTECTED] wrote in message
news:000201c2811e$a787ebe0$0701a8c0;aaron...
 You cannot reverse the encryption of an md5 hash. Nor should you want
 to.

 You don't want to know their password which is why you encrypt it.

 When you seyup an account you convert the password to an md5 has(I
 assume you have done so). When they log back in.. You convert the
 password to an md5 hash and compare that value against the stored md5
 password. If a match - log the user in. If not - kick an error page.

 Aaron

  -Original Message-
  From: Seabird [mailto:jacco;vliegt.nl]
  Sent: Thursday, October 31, 2002 9:49 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] Re: cookie trouble
 
 
  I got this fixed,
 
  but how do I reverse a md5 encryption? this way I can log
  people in again.
 
  Jacco
 
  --
  http://seabird.jmtech.ca
 
  Attitude is Everything!
  But Remember, Attitudes are Contagious!
  Is Yours worth Catching
  Seabird [EMAIL PROTECTED] wrote in message
  news:20021031165410.94762.qmail;pb1.pair.com...
   Hi everyone,
  
   I'm having some trouble configuring a cookie (first time
  doing this):
   I have a login-script and this sets a session cookie. What I really
   want
  is
   to pass a cookie so that returning-people don't have to log
  in every
   time, but I'm not sure how to do what part is passing on
  the cookie (I
   think $_HTTP_SESSION_VARS=['PHP_SELF'] )
  
   How can I change this to a cookie that stores username and password
   for a time set by me (infinite).
  
   Here is my loginscript:
  
   ?php
   if(isset($_POST['submit'])) { // if form has been submitted
/* check they filled in what they were supposed to and
  authenticate
   */  if(!$_POST['uname'] | !$_POST['passwd']) {
 print 'form action=index.php method=post
   div align=left
 input class=test name=uname type=text size=8
   maxlength=8
 input class=test type=password size=8
  maxlength=8
   name=passwd
 input name=submit type=submit value=Login
 br
 span class=welcomeplease fill in the required
   fields./span/div
 /form
   ';
}
// authenticate.
if(!get_magic_quotes_gpc()) {
 $_POST['uname'] = addslashes($_POST['uname']);
}
$check = $db_object-query(SELECT username, password FROM users
   WHERE username = '.$_POST['uname'].');
if(DB::isError($check)) {
 print 'form action=index.php method=post
   div align=left
 input class=test name=uname type=text size=8
   maxlength=8
 input class=test type=password size=8
  maxlength=8
   name=passwd
 input name=submit type=submit value=Login
 br
 span class=welcomeusername doesn\'t exist./span a
   class=header
  
  href=javascript:loadPage(\'mainlayer\',null,\'login/signup.php\')si
   gn
  up
   here/a/div
 /form
   ';
}
$info = $check-fetchRow();
// check passwords match
$_POST['passwd'] = stripslashes($_POST['passwd']);
  $info['password']
   = stripslashes($info['password']);  $_POST['passwd'] =
   md5($_POST['passwd']);  if($_POST['passwd'] != $info['password']) {
 print 'form action=index.php method=post
   div align=left
 input class=test name=uname type=text size=8
   maxlength=8
 input class=test type=password size=8 maxlength=8
   name=passwd
 input name=submit type=submit value=Login
 br
 span class=welcomewrong password, try
  again/span/div
 /form
   ';
}
  
// if we get here username and password are correct,
  register session
   variables and set  // last login time.
$date = date('m d, Y');
$update_login = $db_object-query(UPDATE users SET
  last_login = '$date'
   WHERE username = '.$_POST['uname'].');
$_POST['uname'] = stripslashes($_POST['uname']);
$_SESSION['username'] = $_POST['uname'];
$_SESSION['password'] = $_POST['passwd'];
$db_object-disconnect();
   ?
   span class=welcomeWelcome a class=header
  
  href=javascript:loadPage('mainlayer',null,'users/edit.php?use
  r=?=$_SESSION
   ['username']??PHP print PHPSESSID=.session_id(); ?')font
   color=white?=$_SESSION['username']?/font/abra
   class=header href=login/logout.phpLogout/a
   /span
   ?php
   }
   else { // if form hasn't been submitted
   ?
   form action=?=$HTTP_SESSION_VARS['PHP_SELF']? method=post
   div align=left
 input class=test name=uname type=text size=8
   maxlength=8
 input class=test type=password size=8
  maxlength=8
   name=passwd
 input name=submit type=submit value=Login br
 a class=header
  
  href=javascript:loadPage

Re: [PHP-DB] Re: cookie trouble

2002-11-01 Thread Seabird
Oops,

lights were on, but nobody home sorry, register_globals was set to off.
Works again.

Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
Seabird [EMAIL PROTECTED] wrote in message
news:20021101151508.26292.qmail;pb1.pair.com...
 still a bye output.
 Jacco
 --
 http://seabird.jmtech.ca

 Attitude is Everything!
 But Remember, Attitudes are Contagious!
 Is Yours worth Catching
 Marcel Walter [EMAIL PROTECTED] wrote in message

news:5A1D56DECE4EF242B1CE7A18FB1F87F50111A93F;ibfftce105.is.de.dresdnerkb.co
 m...
  Try something like
  $_COOKIE_VARS[user] ... or $COOKIE_VARS[user] ... dunno exactly ...
 
  -Original Message-
  From: Seabird [mailto:jacco;vliegt.nl]
  Sent: 01 November 2002 10:04
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP-DB] Re: cookie trouble
 
 
  Now, I have set the cookie,
 
  but when I run this code I always get the bye output.
 
  Why??
 
   ?php
   if (isset($user))
   print 'hello';
   else
   print 'bye';
   ?
 
 
  --
  http://seabird.jmtech.ca
 
  Attitude is Everything!
  But Remember, Attitudes are Contagious!
  Is Yours worth Catching
  Aaron Wolski [EMAIL PROTECTED] wrote in message
  news:000201c2811e$a787ebe0$0701a8c0;aaron...
   You cannot reverse the encryption of an md5 hash. Nor should you want
   to.
  
   You don't want to know their password which is why you encrypt it.
  
   When you seyup an account you convert the password to an md5 has(I
   assume you have done so). When they log back in.. You convert the
   password to an md5 hash and compare that value against the stored md5
   password. If a match - log the user in. If not - kick an error page.
  
   Aaron
  
-Original Message-
From: Seabird [mailto:jacco;vliegt.nl]
Sent: Thursday, October 31, 2002 9:49 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: cookie trouble
   
   
I got this fixed,
   
but how do I reverse a md5 encryption? this way I can log
people in again.
   
Jacco
   
--
http://seabird.jmtech.ca
   
Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
Seabird [EMAIL PROTECTED] wrote in message
news:20021031165410.94762.qmail;pb1.pair.com...
 Hi everyone,

 I'm having some trouble configuring a cookie (first time
doing this):
 I have a login-script and this sets a session cookie. What I
really
 want
is
 to pass a cookie so that returning-people don't have to log
in every
 time, but I'm not sure how to do what part is passing on
the cookie (I
 think $_HTTP_SESSION_VARS=['PHP_SELF'] )

 How can I change this to a cookie that stores username and
password
 for a time set by me (infinite).

 Here is my loginscript:

 ?php
 if(isset($_POST['submit'])) { // if form has been submitted
  /* check they filled in what they were supposed to and
authenticate
 */  if(!$_POST['uname'] | !$_POST['passwd']) {
   print 'form action=index.php method=post
 div align=left
   input class=test name=uname type=text size=8
 maxlength=8
   input class=test type=password size=8
maxlength=8
 name=passwd
   input name=submit type=submit value=Login
   br
   span class=welcomeplease fill in the required
 fields./span/div
   /form
 ';
  }
  // authenticate.
  if(!get_magic_quotes_gpc()) {
   $_POST['uname'] = addslashes($_POST['uname']);
  }
  $check = $db_object-query(SELECT username, password FROM users
 WHERE username = '.$_POST['uname'].');
  if(DB::isError($check)) {
   print 'form action=index.php method=post
 div align=left
   input class=test name=uname type=text size=8
 maxlength=8
   input class=test type=password size=8
maxlength=8
 name=passwd
   input name=submit type=submit value=Login
   br
   span class=welcomeusername doesn\'t exist./span a
 class=header

   
href=javascript:loadPage(\'mainlayer\',null,\'login/signup.php\')si
 gn
up
 here/a/div
   /form
 ';
  }
  $info = $check-fetchRow();
  // check passwords match
  $_POST['passwd'] = stripslashes($_POST['passwd']);
$info['password']
 = stripslashes($info['password']);  $_POST['passwd'] =
 md5($_POST['passwd']);  if($_POST['passwd'] != $info['password'])
{
   print 'form action=index.php method=post
 div align=left
   input class=test name=uname type=text size=8
 maxlength=8
   input class=test type=password size=8
maxlength=8
 name=passwd
   input name=submit type=submit value=Login
   br
   span class=welcomewrong password, try
again/span/div
   /form

[PHP-DB] killing cookie

2002-11-01 Thread Seabird
Hi everyone,

I don't understand why my cookie won't be removed.

I set my cookie:

setcookie('user',$_SESSION['username'],time()+36000);
setcookie('pass',$_SESSION['password'],time()+36000);

I kill my cookie:

setcookie('user','',time()-60);
setcookie('pass','',time()-60);

but it doesn't work. why not??
Jacco

--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] killing cookie

2002-11-01 Thread Seabird
Nope, doesn't work.

In PHP manual the say that the correct way is to set the cookie in a already
expired time. That's why I used time()-60 but it doesn't work...

Anybody else?
Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
Josh Johnson [EMAIL PROTECTED] wrote in message
news:004101c281d3$55b80100$8b00a8c0;manpa...
 I'm pretty sure you just have to set a cookie to an empty string to
 delete it, i.e., no expiration time

 -- Josh

 -Original Message-
 From: Seabird [mailto:jacco;vliegt.nl]
 Sent: Friday, November 01, 2002 7:16 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] killing cookie

 Hi everyone,

 I don't understand why my cookie won't be removed.

 I set my cookie:

 setcookie('user',$_SESSION['username'],time()+36000);
 setcookie('pass',$_SESSION['password'],time()+36000);

 I kill my cookie:

 setcookie('user','',time()-60);
 setcookie('pass','',time()-60);

 but it doesn't work. why not??
 Jacco

 --
 http://seabird.jmtech.ca

 Attitude is Everything!
 But Remember, Attitudes are Contagious!
 Is Yours worth Catching



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] cookie trouble

2002-10-31 Thread Seabird
Hi everyone,

I'm having some trouble configuring a cookie (first time doing this):
I have a login-script and this sets a session cookie. What I really want is
to pass a cookie so that returning-people don't have to log in every time,
but I'm not sure how to do what part is passing on the cookie (I think
$_HTTP_SESSION_VARS=['PHP_SELF'] )

How can I change this to a cookie that stores username and password for a
time set by me (infinite).

Here is my loginscript:

?php
if(isset($_POST['submit'])) { // if form has been submitted
 /* check they filled in what they were supposed to and authenticate */
 if(!$_POST['uname'] | !$_POST['passwd']) {
  print 'form action=index.php method=post
div align=left
  input class=test name=uname type=text size=8
maxlength=8
  input class=test type=password size=8 maxlength=8
name=passwd
  input name=submit type=submit value=Login
  br
  span class=welcomeplease fill in the required
fields./span/div
  /form
';
 }
 // authenticate.
 if(!get_magic_quotes_gpc()) {
  $_POST['uname'] = addslashes($_POST['uname']);
 }
 $check = $db_object-query(SELECT username, password FROM users WHERE
username = '.$_POST['uname'].');
 if(DB::isError($check)) {
  print 'form action=index.php method=post
div align=left
  input class=test name=uname type=text size=8
maxlength=8
  input class=test type=password size=8 maxlength=8
name=passwd
  input name=submit type=submit value=Login
  br
  span class=welcomeusername doesn\'t exist./span a
class=header
href=javascript:loadPage(\'mainlayer\',null,\'login/signup.php\')sign up
here/a/div
  /form
';
 }
 $info = $check-fetchRow();
 // check passwords match
 $_POST['passwd'] = stripslashes($_POST['passwd']);
 $info['password'] = stripslashes($info['password']);
 $_POST['passwd'] = md5($_POST['passwd']);
 if($_POST['passwd'] != $info['password']) {
  print 'form action=index.php method=post
div align=left
  input class=test name=uname type=text size=8
maxlength=8
  input class=test type=password size=8 maxlength=8
name=passwd
  input name=submit type=submit value=Login
  br
  span class=welcomewrong password, try again/span/div
  /form
';
 }

 // if we get here username and password are correct, register session
variables and set
 // last login time.
 $date = date('m d, Y');
 $update_login = $db_object-query(UPDATE users SET last_login = '$date'
WHERE username = '.$_POST['uname'].');
 $_POST['uname'] = stripslashes($_POST['uname']);
 $_SESSION['username'] = $_POST['uname'];
 $_SESSION['password'] = $_POST['passwd'];
 $db_object-disconnect();
?
span class=welcomeWelcome a class=header
href=javascript:loadPage('mainlayer',null,'users/edit.php?user=?=$_SESSION
['username']??PHP print PHPSESSID=.session_id(); ?')font
color=white?=$_SESSION['username']?/font/abra class=header
href=login/logout.phpLogout/a
/span
?php
}
else { // if form hasn't been submitted
?
form action=?=$HTTP_SESSION_VARS['PHP_SELF']? method=post
div align=left
  input class=test name=uname type=text size=8
maxlength=8
  input class=test type=password size=8 maxlength=8
name=passwd
  input name=submit type=submit value=Login
br
  a class=header
href=javascript:loadPage('mainlayer',null,'login/signup.php')sign up
here/a /div
  /form
?php
}
?

Thanx,
Jacco

--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: cookie trouble

2002-10-31 Thread Seabird
I got this fixed,

but how do I reverse a md5 encryption? this way I can log people in
again.

Jacco

--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
Seabird [EMAIL PROTECTED] wrote in message
news:20021031165410.94762.qmail;pb1.pair.com...
 Hi everyone,

 I'm having some trouble configuring a cookie (first time doing this):
 I have a login-script and this sets a session cookie. What I really want
is
 to pass a cookie so that returning-people don't have to log in every time,
 but I'm not sure how to do what part is passing on the cookie (I think
 $_HTTP_SESSION_VARS=['PHP_SELF'] )

 How can I change this to a cookie that stores username and password for a
 time set by me (infinite).

 Here is my loginscript:

 ?php
 if(isset($_POST['submit'])) { // if form has been submitted
  /* check they filled in what they were supposed to and authenticate */
  if(!$_POST['uname'] | !$_POST['passwd']) {
   print 'form action=index.php method=post
 div align=left
   input class=test name=uname type=text size=8
 maxlength=8
   input class=test type=password size=8 maxlength=8
 name=passwd
   input name=submit type=submit value=Login
   br
   span class=welcomeplease fill in the required
 fields./span/div
   /form
 ';
  }
  // authenticate.
  if(!get_magic_quotes_gpc()) {
   $_POST['uname'] = addslashes($_POST['uname']);
  }
  $check = $db_object-query(SELECT username, password FROM users WHERE
 username = '.$_POST['uname'].');
  if(DB::isError($check)) {
   print 'form action=index.php method=post
 div align=left
   input class=test name=uname type=text size=8
 maxlength=8
   input class=test type=password size=8 maxlength=8
 name=passwd
   input name=submit type=submit value=Login
   br
   span class=welcomeusername doesn\'t exist./span a
 class=header
 href=javascript:loadPage(\'mainlayer\',null,\'login/signup.php\')sign
up
 here/a/div
   /form
 ';
  }
  $info = $check-fetchRow();
  // check passwords match
  $_POST['passwd'] = stripslashes($_POST['passwd']);
  $info['password'] = stripslashes($info['password']);
  $_POST['passwd'] = md5($_POST['passwd']);
  if($_POST['passwd'] != $info['password']) {
   print 'form action=index.php method=post
 div align=left
   input class=test name=uname type=text size=8
 maxlength=8
   input class=test type=password size=8 maxlength=8
 name=passwd
   input name=submit type=submit value=Login
   br
   span class=welcomewrong password, try again/span/div
   /form
 ';
  }

  // if we get here username and password are correct, register session
 variables and set
  // last login time.
  $date = date('m d, Y');
  $update_login = $db_object-query(UPDATE users SET last_login = '$date'
 WHERE username = '.$_POST['uname'].');
  $_POST['uname'] = stripslashes($_POST['uname']);
  $_SESSION['username'] = $_POST['uname'];
  $_SESSION['password'] = $_POST['passwd'];
  $db_object-disconnect();
 ?
 span class=welcomeWelcome a class=header

href=javascript:loadPage('mainlayer',null,'users/edit.php?user=?=$_SESSION
 ['username']??PHP print PHPSESSID=.session_id(); ?')font
 color=white?=$_SESSION['username']?/font/abra class=header
 href=login/logout.phpLogout/a
 /span
 ?php
 }
 else { // if form hasn't been submitted
 ?
 form action=?=$HTTP_SESSION_VARS['PHP_SELF']? method=post
 div align=left
   input class=test name=uname type=text size=8
 maxlength=8
   input class=test type=password size=8 maxlength=8
 name=passwd
   input name=submit type=submit value=Login
 br
   a class=header
 href=javascript:loadPage('mainlayer',null,'login/signup.php')sign up
 here/a /div
   /form
 ?php
 }
 ?

 Thanx,
 Jacco

 --
 http://seabird.jmtech.ca

 Attitude is Everything!
 But Remember, Attitudes are Contagious!
 Is Yours worth Catching





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] posted my problem online

2002-10-30 Thread Seabird
Hi everyone,

I keep bumping into my problem with my session variables. Maybe a online
example helps.

I created a account:

http://seabird.jmtech.ca

username=forum
password=forum

I placed a array under my navigation on the left and one inside my welcome
page (that onloads.) As you can see, it has session variables inside the
index.php, but not inside my welcome (or any other page for that matter.)

If more info is needed just let me know.

Peter, I tried what you said, but it still didn't work for me. I don't know
why this one just won't. (I had it working for a second yesterday) but it
stopped (thus the first post).
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] new to cookies

2002-10-29 Thread Seabird
Hi everyone,

I created a login on my page that handles with a session. I also would like
to add a cookie so that people don't have to sign in every time they visit
my page, but I have no clue how to create it. Is there anyone out there
willing to help?

my login script:

?php
if(isset($_POST['submit'])) { // if form has been submitted
 /* check they filled in what they were supposed to and authenticate */
 if(!$_POST['uname'] | !$_POST['passwd']) {
  print 'form action=index.php method=post
div align=left
  input class=test name=uname type=text size=8
maxlength=8
  input class=test type=password size=8 maxlength=8
name=passwd
  input name=submit type=submit value=Login
  br
  span class=welcomeplease fill in the required
fields./span/div
  /form
';
 }
 // authenticate.
 if(!get_magic_quotes_gpc()) {
  $_POST['uname'] = addslashes($_POST['uname']);
 }
 $check = $db_object-query(SELECT username, password FROM users WHERE
username = '.$_POST['uname'].');
 if(DB::isError($check)) {
  print 'form action=index.php method=post
div align=left
  input class=test name=uname type=text size=8
maxlength=8
  input class=test type=password size=8 maxlength=8
name=passwd
  input name=submit type=submit value=Login
  br
  span class=welcomeusername doesn\'t exist./span a
class=header
href=javascript:loadPage(\'mainlayer\',null,\'login/signup.php\')sign up
here/a/div
  /form
';
 }
 $info = $check-fetchRow();
 // check passwords match
 $_POST['passwd'] = stripslashes($_POST['passwd']);
 $info['password'] = stripslashes($info['password']);
 $_POST['passwd'] = md5($_POST['passwd']);
 if($_POST['passwd'] != $info['password']) {
  print 'form action=index.php method=post
div align=left
  input class=test name=uname type=text size=8
maxlength=8
  input class=test type=password size=8 maxlength=8
name=passwd
  input name=submit type=submit value=Login
  br
  span class=welcomewrong password, try again/span/div
  /form
';
 }

 // if we get here username and password are correct, register session
variables and set
 // last login time.
 $date = date('m d, Y');
 $update_login = $db_object-query(UPDATE users SET last_login = '$date'
WHERE username = '.$_POST['uname'].');
 $_POST['uname'] = stripslashes($_POST['uname']);
 $_SESSION['username'] = $_POST['uname'];
 $_SESSION['password'] = $_POST['passwd'];
 $db_object-disconnect();
?
span class=welcomeWelcomebrYou are logged in as:
?=$_SESSION['username']?
/span
?php
}
else { // if form hasn't been submitted
?
form action=index.php method=post
div align=left
  input class=test name=uname type=text size=8
maxlength=8
  input class=test type=password size=8 maxlength=8
name=passwd
  input name=submit type=submit value=Login
  br
  a class=header
href=javascript:loadPage('mainlayer',null,'login/signup.php')sign up
here/a /div
  /form
?php
}
?

I use a MySQL DB to store user-info.
Jacco

ps (if this is the wrong forum to ask this, then let me know and I'll post
it elsewhere.

--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] losing my session variables

2002-10-29 Thread Seabird
Hi everyone,

I use a login-script, but for some reason I keep losing my $_SESSION
variables. Can Anyone tell me why?

Here's my login script:

?php
if(isset($_POST['submit'])) { // if form has been submitted
 /* check they filled in what they were supposed to and authenticate */
 if(!$_POST['uname'] | !$_POST['passwd']) {
  print 'form action=index.php method=post
div align=left
  input class=test name=uname type=text size=8
maxlength=8
  input class=test type=password size=8 maxlength=8
name=passwd
  input name=submit type=submit value=Login
  br
  span class=welcomeplease fill in the required
fields./span/div
  /form
';
 }
 // authenticate.
 if(!get_magic_quotes_gpc()) {
  $_POST['uname'] = addslashes($_POST['uname']);
 }
 $check = $db_object-query(SELECT username, password FROM users WHERE
username = '.$_POST['uname'].');
 if(DB::isError($check)) {
  print 'form action=index.php method=post
div align=left
  input class=test name=uname type=text size=8
maxlength=8
  input class=test type=password size=8 maxlength=8
name=passwd
  input name=submit type=submit value=Login
  br
  span class=welcomeusername doesn\'t exist./span a
class=header
href=javascript:loadPage(\'mainlayer\',null,\'login/signup.php\')sign up
here/a/div
  /form
';
 }
 $info = $check-fetchRow();
 // check passwords match
 $_POST['passwd'] = stripslashes($_POST['passwd']);
 $info['password'] = stripslashes($info['password']);
 $_POST['passwd'] = md5($_POST['passwd']);
 if($_POST['passwd'] != $info['password']) {
  print 'form action=index.php method=post
div align=left
  input class=test name=uname type=text size=8
maxlength=8
  input class=test type=password size=8 maxlength=8
name=passwd
  input name=submit type=submit value=Login
  br
  span class=welcomewrong password, try again/span/div
  /form
';
 }

 // if we get here username and password are correct, register session
variables and set
 // last login time.
 $date = date('m d, Y');
 $update_login = $db_object-query(UPDATE users SET last_login = '$date'
WHERE username = '.$_POST['uname'].');
 $_POST['uname'] = stripslashes($_POST['uname']);
 $_SESSION['username'] = $_POST['uname'];
 $_SESSION['password'] = $_POST['passwd'];
 $db_object-disconnect();
?
span class=welcomeWelcome a class=header
href=javascript:loadPage('mainlayer',null,'users/edit.php?user=?=$_SESSION
['username']?')font
color=white?=$_SESSION['username']?/font/abra class=header
href=login/logout.phpLogout/a
/span
?php
}
else { // if form hasn't been submitted
?
form action=?=$HTTP_SERVER_VARS['PHP_SELF']? method=post
div align=left
  input class=test name=uname type=text size=8
maxlength=8
  input class=test type=password size=8 maxlength=8
name=passwd
  input name=submit type=submit value=Login
  br
  a class=header
href=javascript:loadPage('mainlayer',null,'login/signup.php')sign up
here/a /div
  /form
?php
}
?

--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: losing my session variables

2002-10-29 Thread Seabird
where do I place a session start in a script? before the form? after?
inside?
Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
Baroiller Pierre-Emmanuel [EMAIL PROTECTED] wrote in message
news:20021030002059.9083.qmail;pb1.pair.com...
 You only need to add session_start() in your script before storing your
data
 into the $_SESSION array.
 Without session_start(), no session is started by php...

 Regards,
 P.E. Baroiller

 Seabird [EMAIL PROTECTED] a écrit dans le message de news:
 [EMAIL PROTECTED]
  Hi everyone,
 
  I use a login-script, but for some reason I keep losing my $_SESSION
  variables. Can Anyone tell me why?
 
  Here's my login script:
 
  ?php
  if(isset($_POST['submit'])) { // if form has been submitted
   /* check they filled in what they were supposed to and authenticate */
   if(!$_POST['uname'] | !$_POST['passwd']) {
print 'form action=index.php method=post
  div align=left
input class=test name=uname type=text size=8
  maxlength=8
input class=test type=password size=8 maxlength=8
  name=passwd
input name=submit type=submit value=Login
br
span class=welcomeplease fill in the required
  fields./span/div
/form
  ';
   }
   // authenticate.
   if(!get_magic_quotes_gpc()) {
$_POST['uname'] = addslashes($_POST['uname']);
   }
   $check = $db_object-query(SELECT username, password FROM users WHERE
  username = '.$_POST['uname'].');
   if(DB::isError($check)) {
print 'form action=index.php method=post
  div align=left
input class=test name=uname type=text size=8
  maxlength=8
input class=test type=password size=8 maxlength=8
  name=passwd
input name=submit type=submit value=Login
br
span class=welcomeusername doesn\'t exist./span a
  class=header
  href=javascript:loadPage(\'mainlayer\',null,\'login/signup.php\')sign
 up
  here/a/div
/form
  ';
   }
   $info = $check-fetchRow();
   // check passwords match
   $_POST['passwd'] = stripslashes($_POST['passwd']);
   $info['password'] = stripslashes($info['password']);
   $_POST['passwd'] = md5($_POST['passwd']);
   if($_POST['passwd'] != $info['password']) {
print 'form action=index.php method=post
  div align=left
input class=test name=uname type=text size=8
  maxlength=8
input class=test type=password size=8 maxlength=8
  name=passwd
input name=submit type=submit value=Login
br
span class=welcomewrong password, try again/span/div
/form
  ';
   }
 
   // if we get here username and password are correct, register session
  variables and set
   // last login time.
   $date = date('m d, Y');
   $update_login = $db_object-query(UPDATE users SET last_login =
'$date'
  WHERE username = '.$_POST['uname'].');
   $_POST['uname'] = stripslashes($_POST['uname']);
   $_SESSION['username'] = $_POST['uname'];
   $_SESSION['password'] = $_POST['passwd'];
   $db_object-disconnect();
  ?
  span class=welcomeWelcome a class=header
 

href=javascript:loadPage('mainlayer',null,'users/edit.php?user=?=$_SESSION
  ['username']?')font
  color=white?=$_SESSION['username']?/font/abra class=header
  href=login/logout.phpLogout/a
  /span
  ?php
  }
  else { // if form hasn't been submitted
  ?
  form action=?=$HTTP_SERVER_VARS['PHP_SELF']? method=post
  div align=left
input class=test name=uname type=text size=8
  maxlength=8
input class=test type=password size=8 maxlength=8
  name=passwd
input name=submit type=submit value=Login
br
a class=header
  href=javascript:loadPage('mainlayer',null,'login/signup.php')sign up
  here/a /div
/form
  ?php
  }
  ?
 
  --
  http://seabird.jmtech.ca
 
  Attitude is Everything!
  But Remember, Attitudes are Contagious!
  Is Yours worth Catching
 
 





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: losing my session variables

2002-10-29 Thread Seabird
turns out, I already have a session_start(). I have some seperate files and
use them as includes. The thing is... my login form is located on my
index.php and if I do a login, only this file will recognize my session
variables.

I load pages external into a layer, but none of them get the session
variables. I'll upload some files so you can see. I'll post this.

Thanx already,
Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
Baroiller Pierre-Emmanuel [EMAIL PROTECTED] wrote in message
news:20021030002059.9083.qmail;pb1.pair.com...
 You only need to add session_start() in your script before storing your
data
 into the $_SESSION array.
 Without session_start(), no session is started by php...

 Regards,
 P.E. Baroiller

 Seabird [EMAIL PROTECTED] a écrit dans le message de news:
 [EMAIL PROTECTED]
  Hi everyone,
 
  I use a login-script, but for some reason I keep losing my $_SESSION
  variables. Can Anyone tell me why?
 
  Here's my login script:
 
  ?php
  if(isset($_POST['submit'])) { // if form has been submitted
   /* check they filled in what they were supposed to and authenticate */
   if(!$_POST['uname'] | !$_POST['passwd']) {
print 'form action=index.php method=post
  div align=left
input class=test name=uname type=text size=8
  maxlength=8
input class=test type=password size=8 maxlength=8
  name=passwd
input name=submit type=submit value=Login
br
span class=welcomeplease fill in the required
  fields./span/div
/form
  ';
   }
   // authenticate.
   if(!get_magic_quotes_gpc()) {
$_POST['uname'] = addslashes($_POST['uname']);
   }
   $check = $db_object-query(SELECT username, password FROM users WHERE
  username = '.$_POST['uname'].');
   if(DB::isError($check)) {
print 'form action=index.php method=post
  div align=left
input class=test name=uname type=text size=8
  maxlength=8
input class=test type=password size=8 maxlength=8
  name=passwd
input name=submit type=submit value=Login
br
span class=welcomeusername doesn\'t exist./span a
  class=header
  href=javascript:loadPage(\'mainlayer\',null,\'login/signup.php\')sign
 up
  here/a/div
/form
  ';
   }
   $info = $check-fetchRow();
   // check passwords match
   $_POST['passwd'] = stripslashes($_POST['passwd']);
   $info['password'] = stripslashes($info['password']);
   $_POST['passwd'] = md5($_POST['passwd']);
   if($_POST['passwd'] != $info['password']) {
print 'form action=index.php method=post
  div align=left
input class=test name=uname type=text size=8
  maxlength=8
input class=test type=password size=8 maxlength=8
  name=passwd
input name=submit type=submit value=Login
br
span class=welcomewrong password, try again/span/div
/form
  ';
   }
 
   // if we get here username and password are correct, register session
  variables and set
   // last login time.
   $date = date('m d, Y');
   $update_login = $db_object-query(UPDATE users SET last_login =
'$date'
  WHERE username = '.$_POST['uname'].');
   $_POST['uname'] = stripslashes($_POST['uname']);
   $_SESSION['username'] = $_POST['uname'];
   $_SESSION['password'] = $_POST['passwd'];
   $db_object-disconnect();
  ?
  span class=welcomeWelcome a class=header
 

href=javascript:loadPage('mainlayer',null,'users/edit.php?user=?=$_SESSION
  ['username']?')font
  color=white?=$_SESSION['username']?/font/abra class=header
  href=login/logout.phpLogout/a
  /span
  ?php
  }
  else { // if form hasn't been submitted
  ?
  form action=?=$HTTP_SERVER_VARS['PHP_SELF']? method=post
  div align=left
input class=test name=uname type=text size=8
  maxlength=8
input class=test type=password size=8 maxlength=8
  name=passwd
input name=submit type=submit value=Login
br
a class=header
  href=javascript:loadPage('mainlayer',null,'login/signup.php')sign up
  here/a /div
/form
  ?php
  }
  ?
 
  --
  http://seabird.jmtech.ca
 
  Attitude is Everything!
  But Remember, Attitudes are Contagious!
  Is Yours worth Catching
 
 





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] newbie thank you

2002-10-28 Thread Seabird
Hi everyone,

Thanx for the help on my last question (localhost vs remote). Although Peter
gave me a hard time, his solution worked. Thank you for putting up with my
ingorant newbie behaviour.

Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] localhost versus remote

2002-10-27 Thread Seabird
Hi everyone,
I'm using a MySQL DB and a search form. Eveery thing works fine, but when I
upload, it has a Error in query. I checked all the little details but can't
find out why? Any ideas are welcome.

Jacco

--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] localhost versus remote

2002-10-27 Thread Seabird
sorry for my furry message before.

I search a DB in multiple search fields and my result code looks like this:

?PHP
$db=test;
$table=airline_a;

if (! $link)
 die( couldn't connect);
mysql_select_db($db)
 or die (won't open test:.mysql_error() );


$db_res=mysql_list_dbs($link);
$num=mysql_num_rows($db_res);
for($x=0; $x$num; $x++)


$db_res=mysql_list_tables($db,$link);
$num=mysql_num_rows($db_res);
for($x=0; $x$num; $x++)



$count = mysql_query(SELECT * FROM $table);//selects all rows
$total = mysql_num_rows ($count);//counts the selected rows

$query = SELECT * FROM $table WHERE Field1 LIKE '%$icao%' $ton
Field2 LIKE '%$name%' $ton
Field3 LIKE '%$country%'
ORDER BY $sort;
$result = mysql_query($query) or die(Error in
query);//so this is the error I
get/
$total = mysql_num_rows ($result);//counts the selected rows
print span class=textyour search returned .$total. matches/span;

print table border=1\n;
print trtd class=greyIcao/tdtd class=greyName (Location)/tdtd
class=greyCountry/td/tr;
while($row = mysql_fetch_assoc($result)){
 print tr\n
  .td class=white . $row['Field1'] . /td\n
   .td class=white . $row['Field2'] . /td\n
   .td class=white . $row['Field3'] . nbsp/td\n
   ;
}

print /tr/table;
?


The problem I have is that my setup on my localhost and my remote are
identical (I think) and the files are the same. So where does it go wrong.
All I get as error is 'Error in query' which doesn't tell me much. Please
help me...

Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
John W. Holmes [EMAIL PROTECTED] wrote in message
news:002801c27dc0$844bfb00$7c02a8c0;coconut...
  Hi everyone,
  I'm using a MySQL DB and a search form. Eveery thing works fine, but
 when
  I
  upload, it has a Error in query. I checked all the little details but
  can't
  find out why? Any ideas are welcome.
 
  Jacco

 This one is an easy problem to fix. All you have to do is find the error
 and correct what's causing the problem.

 Hope that helps.

 ---John Holmes...

 PS: If you found my answer worthless, it was about as helpful as your
 question. What error? What versions of PHP and MySQL? What's your
 code???





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] localhost versus remote

2002-10-27 Thread Seabird
$ton is my AND/OR field. I'll change my error code and post it, thanx,

Jacco

--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
Peter Beckman [EMAIL PROTECTED] wrote in message
news:20021027151406.T64513-10;thermonuclear.org...
 That's some nasty code

 Two things:

 1. What is $ton in your query?

 2. Change your mysql_query row to this:

   $result = mysql_query($query) or die(MySQL Error:
.mysql_error().brSQL: $query);

So when your query dies, you'll know why.

 Peter

 On Sun, 27 Oct 2002, Seabird wrote:

  sorry for my furry message before.
 
  I search a DB in multiple search fields and my result code looks like
this:
 
  ?PHP
  $db=test;
  $table=airline_a;
 
  if (! $link)
   die( couldn't connect);
  mysql_select_db($db)
   or die (won't open test:.mysql_error() );
 
 
  $db_res=mysql_list_dbs($link);
  $num=mysql_num_rows($db_res);
  for($x=0; $x$num; $x++)
 
 
  $db_res=mysql_list_tables($db,$link);
  $num=mysql_num_rows($db_res);
  for($x=0; $x$num; $x++)
 
 
 
  $count = mysql_query(SELECT * FROM $table);//selects all rows
  $total = mysql_num_rows ($count);//counts the selected rows
 
  $query = SELECT * FROM $table WHERE Field1 LIKE '%$icao%' $ton
  Field2 LIKE '%$name%' $ton
  Field3 LIKE '%$country%'
  ORDER BY $sort;
  $result = mysql_query($query) or die(Error in
  query);//so this is the error I
  get/
  $total = mysql_num_rows ($result);//counts the selected rows
  print span class=textyour search returned .$total. matches/span;
 
  print table border=1\n;
  print trtd class=greyIcao/tdtd class=greyName
(Location)/tdtd
  class=greyCountry/td/tr;
  while($row = mysql_fetch_assoc($result)){
   print tr\n
.td class=white . $row['Field1'] . /td\n
 .td class=white . $row['Field2'] . /td\n
 .td class=white . $row['Field3'] . nbsp/td\n
 ;
  }
 
  print /tr/table;
  ?
 
 
  The problem I have is that my setup on my localhost and my remote are
  identical (I think) and the files are the same. So where does it go
wrong.
  All I get as error is 'Error in query' which doesn't tell me much.
Please
  help me...
 
  Jacco
  --
  http://seabird.jmtech.ca
 
  Attitude is Everything!
  But Remember, Attitudes are Contagious!
  Is Yours worth Catching
  John W. Holmes [EMAIL PROTECTED] wrote in message
  news:002801c27dc0$844bfb00$7c02a8c0;coconut...
Hi everyone,
I'm using a MySQL DB and a search form. Eveery thing works fine, but
   when
I
upload, it has a Error in query. I checked all the little details
but
can't
find out why? Any ideas are welcome.
   
Jacco
  
   This one is an easy problem to fix. All you have to do is find the
error
   and correct what's causing the problem.
  
   Hope that helps.
  
   ---John Holmes...
  
   PS: If you found my answer worthless, it was about as helpful as your
   question. What error? What versions of PHP and MySQL? What's your
   code???
  
  
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

 --
-
 Peter BeckmanSystems Engineer, Fairfax Cable Access
Corporation
 [EMAIL PROTECTED]
http://www.purplecow.com/
 --
-




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] localhost versus remote

2002-10-27 Thread Seabird
My error came out like this:

MySQL Error: You have an error in your SQL syntax near 'Field2 LIKE '%%'
Field3 LIKE '%%' ORDER BY ' at line 2
SQL: SELECT * FROM airline_a WHERE Field1 LIKE '%%' Field2 LIKE '%%' Field3
LIKE '%%' ORDER BY

Why does it not do this at my localhost?? I have the % around my code so
that it searches correctly right? Or should I clean up my code??
Jacco


--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
Peter Beckman [EMAIL PROTECTED] wrote in message
news:20021027151406.T64513-10;thermonuclear.org...
 That's some nasty code

 Two things:

 1. What is $ton in your query?

 2. Change your mysql_query row to this:

   $result = mysql_query($query) or die(MySQL Error:
.mysql_error().brSQL: $query);

So when your query dies, you'll know why.

 Peter

 On Sun, 27 Oct 2002, Seabird wrote:

  sorry for my furry message before.
 
  I search a DB in multiple search fields and my result code looks like
this:
 
  ?PHP
  $db=test;
  $table=airline_a;
 
  if (! $link)
   die( couldn't connect);
  mysql_select_db($db)
   or die (won't open test:.mysql_error() );
 
 
  $db_res=mysql_list_dbs($link);
  $num=mysql_num_rows($db_res);
  for($x=0; $x$num; $x++)
 
 
  $db_res=mysql_list_tables($db,$link);
  $num=mysql_num_rows($db_res);
  for($x=0; $x$num; $x++)
 
 
 
  $count = mysql_query(SELECT * FROM $table);//selects all rows
  $total = mysql_num_rows ($count);//counts the selected rows
 
  $query = SELECT * FROM $table WHERE Field1 LIKE '%$icao%' $ton
  Field2 LIKE '%$name%' $ton
  Field3 LIKE '%$country%'
  ORDER BY $sort;
  $result = mysql_query($query) or die(Error in
  query);//so this is the error I
  get/
  $total = mysql_num_rows ($result);//counts the selected rows
  print span class=textyour search returned .$total. matches/span;
 
  print table border=1\n;
  print trtd class=greyIcao/tdtd class=greyName
(Location)/tdtd
  class=greyCountry/td/tr;
  while($row = mysql_fetch_assoc($result)){
   print tr\n
.td class=white . $row['Field1'] . /td\n
 .td class=white . $row['Field2'] . /td\n
 .td class=white . $row['Field3'] . nbsp/td\n
 ;
  }
 
  print /tr/table;
  ?
 
 
  The problem I have is that my setup on my localhost and my remote are
  identical (I think) and the files are the same. So where does it go
wrong.
  All I get as error is 'Error in query' which doesn't tell me much.
Please
  help me...
 
  Jacco
  --
  http://seabird.jmtech.ca
 
  Attitude is Everything!
  But Remember, Attitudes are Contagious!
  Is Yours worth Catching
  John W. Holmes [EMAIL PROTECTED] wrote in message
  news:002801c27dc0$844bfb00$7c02a8c0;coconut...
Hi everyone,
I'm using a MySQL DB and a search form. Eveery thing works fine, but
   when
I
upload, it has a Error in query. I checked all the little details
but
can't
find out why? Any ideas are welcome.
   
Jacco
  
   This one is an easy problem to fix. All you have to do is find the
error
   and correct what's causing the problem.
  
   Hope that helps.
  
   ---John Holmes...
  
   PS: If you found my answer worthless, it was about as helpful as your
   question. What error? What versions of PHP and MySQL? What's your
   code???
  
  
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

 --
-
 Peter BeckmanSystems Engineer, Fairfax Cable Access
Corporation
 [EMAIL PROTECTED]
http://www.purplecow.com/
 --
-




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] localhost versus remote

2002-10-27 Thread Seabird
Hi Peter I understand your frustration,

but how come that it works fine on my localhost, prosessing the exact same
code?? I thought it worked because it works fine locally

What is the differense in my code posted locally and remote?

Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
Peter Beckman [EMAIL PROTECTED] wrote in message
news:20021027172628.I64513-10;thermonuclear.org...
 It seems to me you have no idea what you are doing.  You really need to
 learn how to troubleshoot your code, as this is a very simple problem to
 fix.  It's not your code.  The variables you put in your SQL are empty.

 Your code:

 $query = SELECT * FROM $table WHERE Field1 LIKE '%$icao%' $ton
 Field2 LIKE '%$name%' $ton
 Field3 LIKE '%$country%'
 ORDER BY $sort;

 Problem:

   $ton should equal AND or OR but it doesn't equal anything.  In fact,
   all of your variables are either empty or not set.

 You are trying to get:

  Select * from table where field1 like '%something%' AND
 field2 like '%something%' AND
 field3 like '%something%'
 order by field1

 But since $ton is empty you are executing this:

  select * from airline_a where field1 like '%%'
field2 like '%%'
field3 like '%%'
order by

 Which is COMPLETELY INVALID.  Notice no AND statements between fields?

 I won't publicly flog you, but please don't respond.  I believe this list
 is for help with more advanced issues, not how to properly write an SQL
 command and troubleshoot your code for you.

 Peter

 On Sun, 27 Oct 2002, Seabird wrote:

  My error came out like this:
 
  MySQL Error: You have an error in your SQL syntax near 'Field2 LIKE '%%'
  Field3 LIKE '%%' ORDER BY ' at line 2
  SQL: SELECT * FROM airline_a WHERE Field1 LIKE '%%' Field2 LIKE '%%'
Field3
  LIKE '%%' ORDER BY
 
  Why does it not do this at my localhost?? I have the % around my code so
  that it searches correctly right? Or should I clean up my code??
  Jacco
 
 
  --
  http://seabird.jmtech.ca
 
  Attitude is Everything!
  But Remember, Attitudes are Contagious!
  Is Yours worth Catching
  Peter Beckman [EMAIL PROTECTED] wrote in message
  news:20021027151406.T64513-10;thermonuclear.org...
   That's some nasty code
  
   Two things:
  
   1. What is $ton in your query?
  
   2. Change your mysql_query row to this:
  
 $result = mysql_query($query) or die(MySQL Error:
  .mysql_error().brSQL: $query);
  
  So when your query dies, you'll know why.
  
   Peter
  
   On Sun, 27 Oct 2002, Seabird wrote:
  
sorry for my furry message before.
   
I search a DB in multiple search fields and my result code looks
like
  this:
   
?PHP
$db=test;
$table=airline_a;
   
if (! $link)
 die( couldn't connect);
mysql_select_db($db)
 or die (won't open test:.mysql_error() );
   
   
$db_res=mysql_list_dbs($link);
$num=mysql_num_rows($db_res);
for($x=0; $x$num; $x++)
   
   
$db_res=mysql_list_tables($db,$link);
$num=mysql_num_rows($db_res);
for($x=0; $x$num; $x++)
   
   
   
$count = mysql_query(SELECT * FROM $table);//selects all rows
$total = mysql_num_rows ($count);//counts the selected rows
   
$query = SELECT * FROM $table WHERE Field1 LIKE '%$icao%' $ton
Field2 LIKE '%$name%' $ton
Field3 LIKE '%$country%'
ORDER BY $sort;
$result = mysql_query($query) or die(Error in
query);//so this is the error I
get/
$total = mysql_num_rows ($result);//counts the selected rows
print span class=textyour search returned .$total.
matches/span;
   
print table border=1\n;
print trtd class=greyIcao/tdtd class=greyName
  (Location)/tdtd
class=greyCountry/td/tr;
while($row = mysql_fetch_assoc($result)){
 print tr\n
  .td class=white . $row['Field1'] . /td\n
   .td class=white . $row['Field2'] . /td\n
   .td class=white . $row['Field3'] . nbsp/td\n
   ;
}
   
print /tr/table;
?
   
   
The problem I have is that my setup on my localhost and my remote
are
identical (I think) and the files are the same. So where does it go
  wrong.
All I get as error is 'Error in query' which doesn't tell me much.
  Please
help me...
   
Jacco
--
http://seabird.jmtech.ca
   
Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
John W. Holmes [EMAIL PROTECTED] wrote in message
news:002801c27dc0$844bfb00$7c02a8c0;coconut...
  Hi everyone,
  I'm using a MySQL DB and a search form. Eveery thing works fine,
but
 when
  I
  upload, it has a Error in query. I checked all the little
details
  but
  can't
  find out why? Any ideas

Re: [PHP-DB] localhost versus remote

2002-10-27 Thread Seabird
I also provide my searchform here. The problem I have is that everything
works when run on my localhost (which is my testing location before upload.
I have the exact same code local and remote.

My searchform should pass the code. here it comes:

  form method=GET action=aviation/result.php target=frameData
table
  tr
td width=122/td
td /td
  /tr
  tr
td class=textIcao code:/td
td  input name=icao type=text class=search size=3
maxlength=3
/td
  /tr
  tr
td class=text Airline name:/td
td  input type=text name=name class=search br /td
  /tr
  tr
td class=text Country:/td
td  select name=country class=search
?PHP
 $query = SELECT DISTINCT(Field3) FROM $table ORDER BY Field3;
 $result = mysql_query($query) or die(Error in query);

 while($row = mysql_fetch_assoc($result))
  {
  print option.$row['Field3']./option\n;
  }
?
  /select /td
  /tr
  tr
td class=text Search Criteria:/td
td select name=ton
option value=ANDAND/option
option value=OROR/option
  /select /td
  /tr
  tr
tdspan class=textSort by:/span /td
td select name=sort
option value=Field1Designator/option
option value=Field2Name/option
option value=Field3Country/option
  /select /td
  /tr
  tr bgcolor=#FF
td/td
td input type=submit value=Search these criteria /td
  /tr
  tr bgcolor=#CC
td colspan=2 class=grey div align=center
class=signature***no wildcards permitted***/div/td
  /tr

/table
  /form

Thanx, and excuse my newbie ignorance,
Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching
John W. Holmes [EMAIL PROTECTED] wrote in message
news:002601c27e08$680a2a50$7c02a8c0;coconut...
  MySQL Error: You have an error in your SQL syntax near 'Field2 LIKE
 '%%'
  Field3 LIKE '%%' ORDER BY ' at line 2
  SQL: SELECT * FROM airline_a WHERE Field1 LIKE '%%' Field2 LIKE '%%'
  Field3
  LIKE '%%' ORDER BY

 You need some ANDs between each of your field LIKE '%%' clauses.

 WHERE field1 LIKE '%%' and field2 LIKE '%%' ...

 ---John Holmes...





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] desperate need for MySQL host

2002-10-16 Thread Seabird

I emailed you back.

Thank you very much for the offer. It's always good to know there are people
like you out there.

Jacco

James Mackie [EMAIL PROTECTED] wrote in message
007001c27535$171ce000$c301a8c0@emptymind">news:007001c27535$171ce000$c301a8c0@emptymind...
 If you seriously need it.. Contact me.. I will set you up.. Its always
 nice to be able to something nice for someone once in a while.. What
 goes around comes around.. :)

 James

 -Original Message-
 From: Seabird [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 15, 2002 12:47 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] desperate need for MySQL host


 Hi everyone,

 as a pilot in difficult times, I'm not in the position to pay for my
 webhosting. My solution that I have right now is less then desirable, as
 I
 have either PHP support and no ads, or PHP and MySQL (limit one DB) with
 pop-up ads.

 I'm looking for a place that is willing to provide me with minimum space
 to
 host 2 DB's with outside acces so that I can use it via my PHP provider.
 No
 Warez, No Porn, No Illegal things. Just some airline and airport Db's.

 Pls, due to my situation, don't refer me to paid hosting (no matter how
 cheap).

 I appreciate the thought you put in.

 Jacco

 Attitude is Everything!
 But Remember, Attitudes are Contagious!
 Is Yours worth Catching





 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php







-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] GOOD PEOPLE EXCIST

2002-10-16 Thread Seabird

Hi everyone,

I must say that my faith in mankind has not been disapointed. My cry for
help has been answered by several people offering to help me out. I won't
name names in here (because they might be flooded with requests) but for
those of you who helped me out:

THANK YOU!

Now that I have no more ad-pop-ups, my location is:

http://seabird.host.sk

Although not the most reliable server out there, that's what I use.

Thanx everyone,

any errors would be appreciated as report.

Jacco



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: GOOD PEOPLE EXCIST

2002-10-16 Thread Seabird

Those of you wondering:

the page does not have any content yet. the catogories work and the
guestbook is there.

That's it for now, still working on the rest.

Jacco

Seabird [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi everyone,

 I must say that my faith in mankind has not been disapointed. My cry for
 help has been answered by several people offering to help me out. I won't
 name names in here (because they might be flooded with requests) but for
 those of you who helped me out:

 THANK YOU!

 Now that I have no more ad-pop-ups, my location is:

 http://seabird.host.sk

 Although not the most reliable server out there, that's what I use.

 Thanx everyone,

 any errors would be appreciated as report.

 Jacco





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: Set Cookies

2002-10-15 Thread Seabird

Because there is no complete code, I'm not sure, but I think:

you already have code above the cookie. The cookie has to come before any
other:

e.a.
1 ?PHP
2cookie
3 ?
4 HTML
5 HEAD
etc.

Jacco

Steve Dodkins [EMAIL PROTECTED] wrote in message
416B83EEF0C5D4119731000255589B77A3BC67@ebmnt01">news:416B83EEF0C5D4119731000255589B77A3BC67@ebmnt01...
 Hi

 I'm trying to use the following simple script to set cookies but get the
 following error message

 cannot add header information - headers are already sent by(output
started
 at c:\program files\php home edition 2\www\listing19.1.php:3) in
c:\program
 files\php home edition 2\www\listing19.1.php on line 4

 3 ?php
 4 setcookie( vegetable, artichoke, time()+3600, /, $SERVER_NAME,
 0 );
 5 ?
 6 html
 7 head
 8 titleListing 19.1/title
 9 /head
 10 body
 11 ?php
 12 if ( isset($vegetable ) )
 13 print phello again your chosen veg is $vegetable/p;
 14
 15 else print phello  your 1st visit ?/p;
 16
 17 ?
 18
 19 /body
 20 /html


 Regards

 Steve Dodkins

 IMPORTANT NOTICE The information in this e-mail is confidential and should
 only be read by those persons to whom it is addressed and is not intended
to
 be relied upon by any person without subsequent written confirmation of
its
 contents. ebm-ZIEHL (UK) Ltd. cannot accept any responsibility for the
 accuracy or completeness of this message as it has been transmitted over a
 public network.   Furthermore, the content of this e-mail is the personal
 view of the sender and does not represent the advice, views or opinion of
 our company. Accordingly, our company disclaim all responsibility and
accept
 no liability (including in negligence) for the consequences of any person
 acting, or refraining from acting, on such information prior to the
receipt
 by those persons of subsequent written confirmation. In particular (but
not
 by way of limitation) our company disclaims all responsibility and accepts
 no liability for any e-mails which are defamatory, offensive, racist or in
 any other way are in breach of any third party's rights, including breach
of
 confidence, privacy or other rights. If you have received this e-mail
 message in error, please notify me immediately by telephone. Please also
 destroy and delete the message from your computer. Any form of
reproduction,
 dissemination, copying, disclosure, modification, distribution and/or
 publication of this e-mail message is strictly prohibited.  If you have
 received this E-mail in error, or suspect that the message may have been
 intercepted or amended, please notify ebm-ZIEHL (UK) Ltd on +44(0)1245
 468555.
 ebm-ZIEHL (UK) Ltd Chelmsford Business Park, Chelmsford, Essex CM2 5EZ






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Paying host is better

2002-10-15 Thread Seabird

Hi everyone,

I know the answer: get a payed host.

question, I'm looking for a FREE MySQL provider. I already have PHP support,
just no MySQL, so anything will do now.

Thank you,
Jacco



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] hotlink MySQL

2002-10-15 Thread Seabird

Is it possible to hotlink a MySQL database?

my site location is different then my MySQL location. (or at least a site).
Is it possible to use the database for both sites or should I set up the
database at both locations?

The reason for asking is that one of the locations doesn't provide MySQL
DB's anymore (max number of DB's is limited)

Pls let me know if this is possible, and if so, how.

Thanx,

Jacco
http://seabird.coolfreepage.com/main2.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] desperate need for MySQL host

2002-10-15 Thread Seabird

Hi everyone,

as a pilot in difficult times, I'm not in the position to pay for my
webhosting. My solution that I have right now is less then desirable, as I
have either PHP support and no ads, or PHP and MySQL (limit one DB) with
pop-up ads.

I'm looking for a place that is willing to provide me with minimum space to
host 2 DB's with outside acces so that I can use it via my PHP provider. No
Warez, No Porn, No Illegal things. Just some airline and airport Db's.

Pls, due to my situation, don't refer me to paid hosting (no matter how
cheap).

I appreciate the thought you put in.

Jacco

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php