[Scottish] RE: Scottish digest, Vol 1 #125 - 2 msgs

2003-02-11 Thread Peter George

It's a bit noisier over at EdLug. Maybe we should come over ;)

P

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: 11 February 2003 12:00
To: [EMAIL PROTECTED]
Subject: Scottish digest, Vol 1 #125 - 2 msgs


Send Scottish mailing list submissions to
[EMAIL PROTECTED]

To subscribe or unsubscribe via the World Wide Web, visit
http://mailman.lug.org.uk/mailman/listinfo/scottish
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]

You can reach the person managing the list at
[EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific than "Re: Contents 
of Scottish digest..."


Today's Topics:

   1. Pin drop (willie fleming)
   2. Re: Pin drop (Allan Whiteford)

--__--__--

Message: 1
From: willie fleming <[EMAIL PROTECTED]>
Organization: SLUG
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Date: Tue, 11 Feb 2003 11:55:32 +
Subject: [Scottish] Pin drop
Reply-To: [EMAIL PROTECTED]



either this list is broken or nothing interesting is happening.
-- 
Best Regards
Willie Fleming
[EMAIL PROTECTED]



--__--__--

Message: 2
Date: Tue, 11 Feb 2003 11:51:23 +
From: Allan Whiteford <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [Scottish] Pin drop
Reply-To: [EMAIL PROTECTED]

willie fleming wrote:
> 
> 
> 
> either this list is broken or nothing interesting is happening.
> --
> Best Regards
> Willie Fleming
> [EMAIL PROTECTED]
> 
> ___
> Scottish mailing list
> [EMAIL PROTECTED] 
> http://mailman.lug.org.uk/mailman/listinfo/scottish

Or, we're all just sitting here, poised to reply.

Thanks,

Allan
-- 
This sentence have three erors.



--__--__--

___
Scottish mailing list
[EMAIL PROTECTED] http://mailman.lug.org.uk/mailman/listinfo/scottish


End of Scottish Digest

___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



Re: [Scottish] Pin drop

2003-02-11 Thread ray
On Tuesday 11 February 2003 18:26, Huard, Elise - D C&W Consultant wrote:
> Sounds interesting : i'll try Tom's root&boot.  MS hasn't trashed anything
> (yet), it just doesn't allow me to write Lilo on the MBR (NTFS), and so i
> use a floppy to boot Linux from hdb1.  Which i forgot at home.
> Thanks,

I used to have a multi-boot NT4/NT5/Linux machine and used the NT boot manager 
(boot.ini) to choose.  I found instructions at 
http://www.linuxgazette.com/issue36/larriera.html  that looks as if it is the 
method that I used.  I also used some software to mount an ext2 partition 
into NT.

-- 
 rayH



___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



RE: [Scottish] Pin drop

2003-02-11 Thread Huard, Elise - D C&W Consultant
Sounds interesting : i'll try Tom's root&boot.  MS hasn't trashed anything
(yet), it just doesn't allow me to write Lilo on the MBR (NTFS), and so i
use a floppy to boot Linux from hdb1.  Which i forgot at home.
Thanks,


--
From:  Paul Millar [SMTP:[EMAIL PROTECTED]]
Sent:  11 February 2003 18:16
To:  [EMAIL PROTECTED]
Cc:  'Allan Whiteford'
Subject:  RE: [Scottish] Pin drop

On Tue, 11 Feb 2003, Huard, Elise - D C&W Consultant wrote:
> i have a question, but it's probably not very interesting : forgot
my boot
> disk at home, is there any way i could get Linux running ?  If no,
that's
> alright, i'm asking out of curiosity.  I do have partition magic
if that
> would help.

Depends what you're after.

If you're trying to get Linux up and running when MS has trashed
your MBR 
then get a prebuilt kernel from somewhere and
  dd if=kernel of=/dev/fd0
  rdev /dev/fd0 /dev/hda1
(or wherever your root partition is).  Although this does rather
require a 
Linux machine up and running.

Alternatively, if you want a "full" Linux distro, try getting Tom's
root
and boot, install it onto a floppy and reboot.

HTH

Paul.


> 
>   --
>   From:  Allan Whiteford [SMTP:[EMAIL PROTECTED]]
>   Sent:  11 February 2003 11:51
>   To:  [EMAIL PROTECTED]
>   Subject:  Re: [Scottish] Pin drop
> 
>   willie fleming wrote:
>   > 
>   > 
>   > 
>   > either this list is broken or nothing interesting is
happening.
>   > --
>   > Best Regards
>   > Willie Fleming
>   > [EMAIL PROTECTED]
>   > 
>   > ___
>   > Scottish mailing list
>   > [EMAIL PROTECTED]
>   > http://mailman.lug.org.uk/mailman/listinfo/scottish
> 
>   Or, we're all just sitting here, poised to reply.
> 
>   Thanks,
> 
>   Allan
>   -- 
>   This sentence have three erors.
> 
>   ___
>   Scottish mailing list
>   [EMAIL PROTECTED]
>   http://mailman.lug.org.uk/mailman/listinfo/scottish
>

***
> This email and any accompanying files are confidential.  If
you are
> not  the  intended recipient  you  must not use,  copy or disclose
the
> content.   If you have received this email in error please contact
the 
> sender by return email and delete this message. 
> Thankyou for your co-operation.
>

*
> 
> ___
> Scottish mailing list
> [EMAIL PROTECTED]
> http://mailman.lug.org.uk/mailman/listinfo/scottish
> 

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- 
Particle Physics (Theory & Experimental) GroupsDr
Paul Millar 
Department of Physics and Astronomy
[EMAIL PROTECTED]
University of Glasgow
[EMAIL PROTECTED]
Glasgow, G12 8QQ, Scotland
http://www.astro.gla.ac.uk/users/paulm 
+44 (0)141 330 4717A54C A9FC 6A77 1664 2E4E  90E3 FFD2 704B
BF0F 03E9
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- 


___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish
***
This email and any accompanying files are confidential.  If you are
not  the  intended recipient  you  must not use,  copy or disclose the
content.   If you have received this email in error please contact the 
sender by return email and delete this message. 
Thankyou for your co-operation.
*

___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



RE: [Scottish] Pin drop

2003-02-11 Thread Paul Millar
On Tue, 11 Feb 2003, Huard, Elise - D C&W Consultant wrote:
> i have a question, but it's probably not very interesting : forgot my boot
> disk at home, is there any way i could get Linux running ?  If no, that's
> alright, i'm asking out of curiosity.  I do have partition magic if that
> would help.

Depends what you're after.

If you're trying to get Linux up and running when MS has trashed your MBR 
then get a prebuilt kernel from somewhere and
  dd if=kernel of=/dev/fd0
  rdev /dev/fd0 /dev/hda1
(or wherever your root partition is).  Although this does rather require a 
Linux machine up and running.

Alternatively, if you want a "full" Linux distro, try getting Tom's root
and boot, install it onto a floppy and reboot.

HTH

Paul.


> 
>   --
>   From:  Allan Whiteford [SMTP:[EMAIL PROTECTED]]
>   Sent:  11 February 2003 11:51
>   To:  [EMAIL PROTECTED]
>   Subject:  Re: [Scottish] Pin drop
> 
>   willie fleming wrote:
>   > 
>   > 
>   > 
>   > either this list is broken or nothing interesting is happening.
>   > --
>   > Best Regards
>   > Willie Fleming
>   > [EMAIL PROTECTED]
>   > 
>   > ___
>   > Scottish mailing list
>   > [EMAIL PROTECTED]
>   > http://mailman.lug.org.uk/mailman/listinfo/scottish
> 
>   Or, we're all just sitting here, poised to reply.
> 
>   Thanks,
> 
>   Allan
>   -- 
>   This sentence have three erors.
> 
>   ___
>   Scottish mailing list
>   [EMAIL PROTECTED]
>   http://mailman.lug.org.uk/mailman/listinfo/scottish
> ***
> This email and any accompanying files are confidential.  If you are
> not  the  intended recipient  you  must not use,  copy or disclose the
> content.   If you have received this email in error please contact the 
> sender by return email and delete this message. 
> Thankyou for your co-operation.
> *
> 
> ___
> Scottish mailing list
> [EMAIL PROTECTED]
> http://mailman.lug.org.uk/mailman/listinfo/scottish
> 

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
Particle Physics (Theory & Experimental) GroupsDr Paul Millar 
Department of Physics and Astronomy [EMAIL PROTECTED]
University of Glasgow [EMAIL PROTECTED]
Glasgow, G12 8QQ, Scotland http://www.astro.gla.ac.uk/users/paulm 
+44 (0)141 330 4717A54C A9FC 6A77 1664 2E4E  90E3 FFD2 704B BF0F 03E9
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 


___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



[Scottish] OT: Conga

2003-02-11 Thread george
ont suppose anyone in this list has any experience using Conga


http://opendoors.com/html/conga.htm


George


___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



Re: [Scottish] php and my sql

2003-02-11 Thread george

That should be fetch

G

george wrote:

I would tend to use a while loop

 while($row=mysql_fetch_array($results))
{
  // Do some stuff
}

to be perfectly honest I would probably use mysql_feetch_object() instead

George

Ismail Murat Dilek wrote:


 Hi
Sillly me. Removing redirect header to out side for loop and adding 
exit  solved  it,

Graeme Chambers wrote:

Hi,

The For loop on first execution sends the redirect header based on first
test 9i.e. first email address returned from database).

Suggest you include email address from form into SELECT query and decide
what to do on basis of number of records returned.

HTH

Graeme

On Tue, 2003-02-11 at 12:22, Ismail Murat Dilek wrote:
 

Hi,
I ve created a mysql database. Basically user fills  the form then  
hits submit button and  all data posted to mysql database.This part 
works fine.
Next time user return the page enters their email address and hits 
submit button. my php script
check if email address exist in our database if exist takes user to 
download page, if not exist takes them to registration page.
Some strange reason this comparasing is not working properly. it 
works for some email addresses,
e.g. my email address [EMAIL PROTECTED] is registered in mysql 
database so script should take to download page but it is taking me 
registration page instead
any ideas

//Author: Ismail Murat Dilek

require("conn.php");
/// 
// following part read values of entered details and prepares them 
for mysql data input format

$email = $HTTP_POST_VARS["email"];
///


$query ="Select email from details"; // selects email field from 
details table
$result = mysql_query($query); //executes sql select query
$num_result = mysql_num_rows($result);
/* searches database for email, if email dosent exist writes details to
database,then redirects user to download page
*/
for ($i=0; $i<$num_result; $i++)
{
   $row= mysql_fetch_array($result);
   $eml = stripslashes($row[email]);
   $email = trim($email);
   $eml = trim($eml);
   $eq = strcmp($email,$eml);
   if ($eq != 0)
   {
   header("Location:register.php");
 }
   else
   {
   header("Location:download.php");
   }
  }//end for

?>

  





___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish


 




___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish





___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish





___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



Re: [Scottish] php and my sql

2003-02-11 Thread george
I would tend to use a while loop

 while($row=mysql_fetch_array($results))
{
  // Do some stuff
}

to be perfectly honest I would probably use mysql_feetch_object() instead

George

Ismail Murat Dilek wrote:

 Hi
Sillly me. Removing redirect header to out side for loop and adding 
exit  solved  it,

Graeme Chambers wrote:

Hi,

The For loop on first execution sends the redirect header based on first
test 9i.e. first email address returned from database).

Suggest you include email address from form into SELECT query and decide
what to do on basis of number of records returned.

HTH

Graeme

On Tue, 2003-02-11 at 12:22, Ismail Murat Dilek wrote:
 

Hi,
I ve created a mysql database. Basically user fills  the form then  
hits submit button and  all data posted to mysql database.This part 
works fine.
Next time user return the page enters their email address and hits 
submit button. my php script
check if email address exist in our database if exist takes user to 
download page, if not exist takes them to registration page.
Some strange reason this comparasing is not working properly. it 
works for some email addresses,
e.g. my email address [EMAIL PROTECTED] is registered in mysql 
database so script should take to download page but it is taking me 
registration page instead
any ideas

//Author: Ismail Murat Dilek

require("conn.php");
/// 
// following part read values of entered details and prepares them 
for mysql data input format

$email = $HTTP_POST_VARS["email"];
///


$query ="Select email from details"; // selects email field from 
details table
$result = mysql_query($query); //executes sql select query
$num_result = mysql_num_rows($result);
/* searches database for email, if email dosent exist writes details to
database,then redirects user to download page
*/
for ($i=0; $i<$num_result; $i++)
{
   $row= mysql_fetch_array($result);
   $eml = stripslashes($row[email]);
   $email = trim($email);
   $eml = trim($eml);
   $eq = strcmp($email,$eml);
   if ($eq != 0)
   {
   header("Location:register.php");
 }
   else
   {
   header("Location:download.php");
   }
  }//end for

?>

  




___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish


 




___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish





___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



RE: [Scottish] php and my sql

2003-02-11 Thread Ian Drake, IT, CIR, SE Dunbartonshire
waiter waiter! there's a bug in my loop!



-Original Message-
From: Graeme Chambers [mailto:[EMAIL PROTECTED]]
Sent: 11 February 2003 16:56
To: [EMAIL PROTECTED]
Subject: RE: [Scottish] php and my sql


On Tue, 2003-02-11 at 16:39, Paxton, Darren wrote:
> Looks vaugely familiar!
> 


Maybe another For loop has gone wrong? :)

-- 
Graeme Chambers <[EMAIL PROTECTED]>


___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish

___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



RE: [Scottish] php and my sql

2003-02-11 Thread Graeme Chambers
On Tue, 2003-02-11 at 16:39, Paxton, Darren wrote:
> Looks vaugely familiar!
> 


Maybe another For loop has gone wrong? :)

-- 
Graeme Chambers <[EMAIL PROTECTED]>


___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



Re: [Scottish] php and my sql

2003-02-11 Thread george

You probably want to change your conditional block to

if(!$eq) {
  	
  	 header("Location:register.php");
  }  else
{
header("Location:download.php");
}



George



Ismail Murat Dilek wrote:

Hi,
I ve created a mysql database. Basically user fills  the form then  hits
submit button and  all data posted to mysql database.This part works fine.
Next time user return the page enters their email address and hits
submit button. my php script
check if email address exist in our database if exist takes user to
download page, if not exist takes them to registration page.
Some strange reason this comparasing is not working properly. it works
for some email addresses,
e.g. my email address [EMAIL PROTECTED] is registered in mysql database
so script should take to download page but it is taking me registration
page instead
any ideas





___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish





___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



Re: [Scottish] php and my sql

2003-02-11 Thread Paul Millar
On 11 Feb 2003, Graeme Chambers wrote:
> Suggest you include email address from form into SELECT query and decide
> what to do on basis of number of records returned.

Good idea, but bear in mind the usual caveats of including unchecked user
input into a SQL statement ...  suppose the user gives their email address
as:
  "[EMAIL PROTECTED]; DELETE FROM details"

 }:^>

Paul.


> On Tue, 2003-02-11 at 12:22, Ismail Murat Dilek wrote:
> > Hi,
> > I ve created a mysql database. Basically user fills  the form then  hits 
> > submit button and  all data posted to mysql database.This part works fine.
> > Next time user return the page enters their email address and hits 
> > submit button. my php script
> > check if email address exist in our database if exist takes user to 
> > download page, if not exist takes them to registration page.
> > Some strange reason this comparasing is not working properly. it works 
> > for some email addresses,
> > e.g. my email address [EMAIL PROTECTED] is registered in mysql database 
> > so script should take to download page but it is taking me registration 
> > page instead
> > any ideas
> >  > //Author: Ismail Murat Dilek
> > 
> > require("conn.php");
> > /// 
> > // following part read values of entered details and prepares them for 
> > mysql data input format
> > 
> > $email = $HTTP_POST_VARS["email"];
> > ///
> > 
> > 
> > $query ="Select email from details"; // selects email field from details 
> > table
> > $result = mysql_query($query); //executes sql select query
> > $num_result = mysql_num_rows($result);
> > /* searches database for email, if email dosent exist writes details to
> > database,then redirects user to download page
> > */
> > for ($i=0; $i<$num_result; $i++)
> > {
> > $row= mysql_fetch_array($result);
> > $eml = stripslashes($row[email]);
> > $email = trim($email);
> > $eml = trim($eml);
> > $eq = strcmp($email,$eml);
> > if ($eq != 0)
> > {
> > header("Location:register.php");
> >
> > }
> > else
> > {
> > header("Location:download.php");
> > }
> >
> >
> >
> > }//end for
> > 
> > ?>
> > 
> 
> 
> 
> ___
> Scottish mailing list
> [EMAIL PROTECTED]
> http://mailman.lug.org.uk/mailman/listinfo/scottish
> 

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
Particle Physics (Theory & Experimental) GroupsDr Paul Millar 
Department of Physics and Astronomy [EMAIL PROTECTED]
University of Glasgow [EMAIL PROTECTED]
Glasgow, G12 8QQ, Scotland http://www.astro.gla.ac.uk/users/paulm 
+44 (0)141 330 4717A54C A9FC 6A77 1664 2E4E  90E3 FFD2 704B BF0F 03E9
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 


___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



Re: [Scottish] php and my sql

2003-02-11 Thread Ismail Murat Dilek
 Hi
Sillly me. Removing redirect header to out side for loop and adding 
exit  solved  it,

Graeme Chambers wrote:

Hi,

The For loop on first execution sends the redirect header based on first
test 9i.e. first email address returned from database).

Suggest you include email address from form into SELECT query and decide
what to do on basis of number of records returned.

HTH

Graeme

On Tue, 2003-02-11 at 12:22, Ismail Murat Dilek wrote:
 

Hi,
I ve created a mysql database. Basically user fills  the form then  hits 
submit button and  all data posted to mysql database.This part works fine.
Next time user return the page enters their email address and hits 
submit button. my php script
check if email address exist in our database if exist takes user to 
download page, if not exist takes them to registration page.
Some strange reason this comparasing is not working properly. it works 
for some email addresses,
e.g. my email address [EMAIL PROTECTED] is registered in mysql database 
so script should take to download page but it is taking me registration 
page instead
any ideas

//Author: Ismail Murat Dilek

require("conn.php");
/// 
// following part read values of entered details and prepares them for 
mysql data input format

$email = $HTTP_POST_VARS["email"];
///


$query ="Select email from details"; // selects email field from details 
table
$result = mysql_query($query); //executes sql select query
$num_result = mysql_num_rows($result);
/* searches database for email, if email dosent exist writes details to
database,then redirects user to download page
*/
for ($i=0; $i<$num_result; $i++)
{
   $row= mysql_fetch_array($result);
   $eml = stripslashes($row[email]);
   $email = trim($email);
   $eml = trim($eml);
   $eq = strcmp($email,$eml);
   if ($eq != 0)
   {
   header("Location:register.php");
  
   }
   else
   {
   header("Location:download.php");
   }
  
  
  
}//end for

?>

   




___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish


 




___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



RE: [Scottish] php and my sql

2003-02-11 Thread Paxton, Darren
Looks vaugely familiar!

-Original Message-
From: Ismail Murat Dilek [mailto:[EMAIL PROTECTED]] 
Sent: 11 February 2003 16:35
To: [EMAIL PROTECTED]
Subject: [Scottish] php and my sql


Hi,
I ve created a mysql database. Basically user fills  the form then  hits
submit button and  all data posted to mysql database.This part works fine.
Next time user return the page enters their email address and hits submit
button. my php script check if email address exist in our database if exist
takes user to download page, if not exist takes them to registration page.
Some strange reason this comparasing is not working properly. it works for
some email addresses, e.g. my email address [EMAIL PROTECTED] is registered
in mysql database so script should take to download page but it is taking me
registration page instead any ideas 




___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish

This e-mail and any attachments may be confidential or legally privileged.
If you received this message in error or are not the intended recipient, you
should destroy the e-mail message and any attachments or copies, and you are
prohibited from retaining, distributing, disclosing or using any information
contained herein.  Please inform us of the erroneous delivery by return
e-mail.  Thank you for your co-operation. 
Mercer Human Resource Consulting Limited is regulated by the Financial
Services Authority and is a member of the General Insurance Standards
Council. Registered in England No. 984275. Registered Office: Telford House,
14 Tothill Street, London SW1H 9NB 


___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



[Scottish] php and my sql

2003-02-11 Thread Ismail Murat Dilek
Hi,
I ve created a mysql database. Basically user fills  the form then  hits
submit button and  all data posted to mysql database.This part works fine.
Next time user return the page enters their email address and hits
submit button. my php script
check if email address exist in our database if exist takes user to
download page, if not exist takes them to registration page.
Some strange reason this comparasing is not working properly. it works
for some email addresses,
e.g. my email address [EMAIL PROTECTED] is registered in mysql database
so script should take to download page but it is taking me registration
page instead
any ideas





___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



Re: [Scottish] php and my sql

2003-02-11 Thread Graeme Chambers
Hi,

The For loop on first execution sends the redirect header based on first
test 9i.e. first email address returned from database).

Suggest you include email address from form into SELECT query and decide
what to do on basis of number of records returned.

HTH

Graeme

On Tue, 2003-02-11 at 12:22, Ismail Murat Dilek wrote:
> Hi,
> I ve created a mysql database. Basically user fills  the form then  hits 
> submit button and  all data posted to mysql database.This part works fine.
> Next time user return the page enters their email address and hits 
> submit button. my php script
> check if email address exist in our database if exist takes user to 
> download page, if not exist takes them to registration page.
> Some strange reason this comparasing is not working properly. it works 
> for some email addresses,
> e.g. my email address [EMAIL PROTECTED] is registered in mysql database 
> so script should take to download page but it is taking me registration 
> page instead
> any ideas
>  //Author: Ismail Murat Dilek
> 
> require("conn.php");
> /// 
> // following part read values of entered details and prepares them for 
> mysql data input format
> 
> $email = $HTTP_POST_VARS["email"];
> ///
> 
> 
> $query ="Select email from details"; // selects email field from details 
> table
> $result = mysql_query($query); //executes sql select query
> $num_result = mysql_num_rows($result);
> /* searches database for email, if email dosent exist writes details to
> database,then redirects user to download page
> */
> for ($i=0; $i<$num_result; $i++)
> {
> $row= mysql_fetch_array($result);
> $eml = stripslashes($row[email]);
> $email = trim($email);
> $eml = trim($eml);
> $eq = strcmp($email,$eml);
> if ($eq != 0)
> {
> header("Location:register.php");
>
> }
> else
> {
> header("Location:download.php");
> }
>
>
>
> }//end for
> 
> ?>
> 



___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



[Scottish] php and my sql

2003-02-11 Thread Ismail Murat Dilek
Hi,
I ve created a mysql database. Basically user fills  the form then  hits 
submit button and  all data posted to mysql database.This part works fine.
Next time user return the page enters their email address and hits 
submit button. my php script
check if email address exist in our database if exist takes user to 
download page, if not exist takes them to registration page.
Some strange reason this comparasing is not working properly. it works 
for some email addresses,
e.g. my email address [EMAIL PROTECTED] is registered in mysql database 
so script should take to download page but it is taking me registration 
page instead
any ideas

//Author: Ismail Murat Dilek

require("conn.php");
/// 
// following part read values of entered details and prepares them for 
mysql data input format

$email = $HTTP_POST_VARS["email"];
///


$query ="Select email from details"; // selects email field from details 
table
$result = mysql_query($query); //executes sql select query
$num_result = mysql_num_rows($result);
/* searches database for email, if email dosent exist writes details to
database,then redirects user to download page
*/
for ($i=0; $i<$num_result; $i++)
{
   $row= mysql_fetch_array($result);
   $eml = stripslashes($row[email]);
   $email = trim($email);
   $eml = trim($eml);
   $eq = strcmp($email,$eml);
   if ($eq != 0)
   {
   header("Location:register.php");
  
   }
   else
   {
   header("Location:download.php");
   }
  
  
  
}//end for

?>



___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish


RE: [Scottish] Pin drop

2003-02-11 Thread Ian Drake, IT, CIR, SE Dunbartonshire
willie, did you just drop one?

-Original Message-
From: willie fleming [mailto:[EMAIL PROTECTED]]
Sent: 11 February 2003 11:56
To: [EMAIL PROTECTED]
Subject: [Scottish] Pin drop




either this list is broken or nothing interesting is happening.
-- 
Best Regards
Willie Fleming
[EMAIL PROTECTED]


___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish

___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



RE: [Scottish] Pin drop

2003-02-11 Thread Huard, Elise - D C&W Consultant
i have a question, but it's probably not very interesting : forgot my boot
disk at home, is there any way i could get Linux running ?  If no, that's
alright, i'm asking out of curiosity.  I do have partition magic if that
would help.

--
From:  Allan Whiteford [SMTP:[EMAIL PROTECTED]]
Sent:  11 February 2003 11:51
To:  [EMAIL PROTECTED]
Subject:  Re: [Scottish] Pin drop

willie fleming wrote:
> 
> 
> 
> either this list is broken or nothing interesting is happening.
> --
> Best Regards
> Willie Fleming
> [EMAIL PROTECTED]
> 
> ___
> Scottish mailing list
> [EMAIL PROTECTED]
> http://mailman.lug.org.uk/mailman/listinfo/scottish

Or, we're all just sitting here, poised to reply.

Thanks,

Allan
-- 
This sentence have three erors.

___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish
***
This email and any accompanying files are confidential.  If you are
not  the  intended recipient  you  must not use,  copy or disclose the
content.   If you have received this email in error please contact the 
sender by return email and delete this message. 
Thankyou for your co-operation.
*

___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



Re: [Scottish] Pin drop

2003-02-11 Thread Allan Whiteford
willie fleming wrote:
> 
> 
> 
> either this list is broken or nothing interesting is happening.
> --
> Best Regards
> Willie Fleming
> [EMAIL PROTECTED]
> 
> ___
> Scottish mailing list
> [EMAIL PROTECTED]
> http://mailman.lug.org.uk/mailman/listinfo/scottish

Or, we're all just sitting here, poised to reply.

Thanks,

Allan
-- 
This sentence have three erors.

___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish



[Scottish] Pin drop

2003-02-11 Thread willie fleming


either this list is broken or nothing interesting is happening.
-- 
Best Regards
Willie Fleming
[EMAIL PROTECTED]


___
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish