RE: [PHP-DB] sessions

2002-05-23 Thread matt stewart
nders of open source. Are sessions required for a shopping basket? I don't want people to login, just order and go. "Matt Stewart" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > i'd imagine there'll be a decent on

RE: [PHP-DB] sessions

2002-05-23 Thread matt stewart
at seemed to do the trick. Any help on php shopping carts would be great! Thanks "Matt Stewart" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > sent the session_start(); before any output, that should do it... > > -Original Me

RE: [PHP-DB] sessions

2002-05-23 Thread matt stewart
sent the session_start(); before any output, that should do it... -Original Message- From: James Kupernik [mailto:[EMAIL PROTECTED]] Sent: 23 May 2002 15:38 To: [EMAIL PROTECTED] Subject: [PHP-DB] sessions I get this error when I try to start a session (I'm trying to create a shopping c

RE: [PHP-DB] displaying records

2002-05-23 Thread matt stewart
at first glance i'd assume that the variable $category is not being passed through to the second page - you're using it to get the first query, but not keeping it (either in the url or hiddenform variable for your next page link). -Original Message- From: Natividad Castro [mailto:[EMAIL P

RE: [PHP-DB] Anti-virus alarm! Sulfbnk var inget virus.

2002-05-16 Thread matt stewart
bit cynical maybe craig??? i think he actually made an honest mistake and is trying to rectify the situation... don't think there's any harm done, just a couple more emails to delete from the inbox! -Original Message- From: Craig Vincent [mailto:[EMAIL PROTECTED]] Sent: 16 May 2002 11:51

RE: [PHP-DB] Virus alarm!

2002-05-16 Thread matt stewart
DON'T!! this file is on everyones machine, and is not a virus!! -Original Message- From: Trond Erling Hundal [mailto:[EMAIL PROTECTED]] Sent: 16 May 2002 10:26 To: ,; -=* Alf Marius *=-; Abonnement; Alf Halsen; Alf Lange De; Amajonaz . . .; Andreas Nordenstam; Andrey Hristov; 'And

RE: [PHP-DB] session variables across several pages

2002-05-15 Thread matt stewart
N_VARS['sess_address']=$address; see if that makes any difference? -Original Message- From: Terry Romine [mailto:[EMAIL PROTECTED]] Sent: 15 May 2002 16:40 To: matt stewart Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] session variables across several pages This is freaky.

RE: [PHP-DB] session variables across several pages

2002-05-15 Thread matt stewart
You need to look up $HTTP_SESSION_VARS['name'] - that's how to change the variables when they are already set.. i think most people have this problem when they first use sessions! -Original Message- From: Terry Romine [mailto:[EMAIL PROTECTED]] Sent: 15 May 2002 15:49 To: [EMAIL PROT

RE: [PHP-DB] Using functions in SELECT statements

2002-05-02 Thread matt stewart
tion_Membership WHERE organisation LIKE '%$SearchBox'"; if this is the wrong anser, and you were trying to do something different, let me know! Matt Stewart [EMAIL PROTECTED] -Original Message- From: Robin S McKenzie [mailto:[EMAIL PROTECTED]] Sent: 02 May 2002 15:11 To:

RE: [PHP-DB] calculations based on checkbox value

2002-03-22 Thread matt stewart
can you post some code, and an exmaple of an input, the current output, and what the desired output would be? -Original Message- From: jas [mailto:[EMAIL PROTECTED]] Sent: 22 March 2002 04:57 To: [EMAIL PROTECTED] Subject: [PHP-DB] calculations based on checkbox value Ok here is my prob

RE: [PHP-DB] need help guys

2002-03-14 Thread matt stewart
you can't pass a literal "&" in a url - it makes it think that it's the next variable. -Original Message- From: its me [mailto:[EMAIL PROTECTED]] Sent: 14 March 2002 11:21 To: [EMAIL PROTECTED] Subject: [PHP-DB] need help guys i have this Antiques & Arts then i pass this to next page:

RE: [PHP-DB] Grouped sql output

2002-02-26 Thread matt stewart
Not entirely sure what you're trying to do, but would it be sensible to use... $sql="SELECT * FROM Customers ORDER BY zip ASC"; . . and then when you've got the results... if ($myrow = mysql_fetch_array($result)) { $zip=0; $zipcount=0; do { if ($zip!=$myrow[

RE: [PHP-DB] How do I add multiple var to a if clause ?

2002-02-21 Thread matt stewart
either if (($var <= 3)&&($var >= 1)){ } if you want it to just be somewhere between one and 3, or $my_array = array ("1", "2", "3"); if (in_array($variable, $my_array)) { } if you want it to be just one of those exact values. -Original Message- From: Dave Carrera [mailto:[EMAIL

RE: [PHP-DB] numeric string problem

2002-02-13 Thread matt stewart
yeah, i would go with Rick on this. however, the reason i think it's not working is because it's comparing the contents alphabetically ie. "2" is greater than "1" but is also greater than "10", "19" etc etc alphabetically, just as anything beginning with "b" is greater than "a" and also "aazzx

FW: [PHP-DB] renaming uploaded files

2002-02-01 Thread matt stewart
Forgot to post to the whole list! sorry -Original Message- From: matt stewart Sent: 01 February 2002 09:22 To: 'Jose Maria Sala' Subject: RE: [PHP-DB] renaming uploaded files Hi Jose - this has a bit of error checking with it too. this just uploads one file with the na

RE: [PHP-DB] Pictures in MySQL database

2002-01-24 Thread matt stewart
Agreed, i think you'll find aan easy way of doing this is to name each image after the primary key to your table (ie 1.jpg, 2.jpg, 3.jpg etc if the primary key is an autonumber. and store them all in a certain file, then when you fetch the record from the table, you can run a simple check to see i

RE: [PHP-DB] string compare function

2002-01-17 Thread matt stewart
by the way, what are you actually trying to do with the code? there may be a different way of doing it which isn't so confusing? -Original Message- From: tomhilton [mailto:[EMAIL PROTECTED]] Sent: 17 January 2002 15:20 To: [EMAIL PROTECTED] Subject: [PHP-DB] string compare function Hi,

RE: [PHP-DB] string compare function

2002-01-17 Thread matt stewart
take it you've tried having exactly the same value for each to test if the return is 0? it shouldn't be comparing literals, but it looks like it could well be! try putting "" round the variables, and various things like that? -Original Message- From: tomhilton [mailto:[EMAIL PROTECTED]]

RE: [PHP-DB] string compare function

2002-01-17 Thread matt stewart
post the entire line of code, (and the surrounding couple of lines?? and we'll get more of an idea. -Original Message- From: tomhilton [mailto:[EMAIL PROTECTED]] Sent: 17 January 2002 14:56 To: [EMAIL PROTECTED] Subject: [PHP-DB] string compare function Hi, I'm having a problem with the

RE: [PHP-DB] What is REG_BADRPT, and why do I get it?

2002-01-17 Thread matt stewart
It's not anything to do with the special regular expression characters again is it? -Original Message- From: Beau Lebens [mailto:[EMAIL PROTECTED]] Sent: 17 January 2002 01:38 To: 'Markus Lervik'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] What is REG_BADRPT, and why do I get it? on a gue

RE: [PHP-DB] How can recommend a book for SQL and DB design

2002-01-16 Thread matt stewart
finished University nearly two years ago, but back then, this book was the one we used too - very in depth introduction to general database theory, well worth investing in if you need very well designed databases for large volume applications. all the best, Matt -Original Message- From:

RE: [PHP-DB] Replacing * with %

2002-01-15 Thread matt stewart
P-DB] Replacing * with % The following works fine for me: $currentword = ereg_replace("\*","%",$currentword); Chris }:) > -----Original Message- > From: matt stewart [SMTP:[EMAIL PROTECTED]] > Sent: Tuesday, January 15, 2002 9:57 AM > To: [EMAIL PROTECTED

RE: [PHP-DB] Replacing * with %

2002-01-15 Thread matt stewart
just checked it out, and * is a special character unless enclosed in class brackets. so using "[*]" should hopefully work! give it a go and see. cheers, Matt -Original Message----- From: matt stewart [mailto:[EMAIL PROTECTED]] Sent: 15 January 2002 09:54 To: [EMAIL PROTECTED] S

RE: [PHP-DB] Replacing * with %

2002-01-15 Thread matt stewart
/* sorry markus, forgot to post this to the list, so here it is again! */ don't know if this is the solution without doing some reading, so i'll tell you what i think it might be and you can read up on it! is either (or both?) * and % special characters in regular expressions? if so, it may be p

RE: [PHP-DB] grabbing id from new record

2002-01-14 Thread matt stewart
straight after you do the insert command, use the call: $ID = mysql_insert_id(); The $ID is now the primary key for the record you just inserted. -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED]] Sent: 14 January 2002 14:56 To: Ireneusz Piasecki; [EMAIL PROTECTED] Subje

RE: [PHP-DB] RE: LIMIT and get_num_rows

2002-01-14 Thread matt stewart
yep, it returns 20. -Original Message- From: DL Neil [mailto:[EMAIL PROTECTED]] Sent: 14 January 2002 14:17 To: matt stewart; [EMAIL PROTECTED] Subject: Re: [PHP-DB] RE: LIMIT and get_num_rows Have you (original post-er) tested performing a SELECT ... LIMIT 0, 20 and then calling

RE: [PHP-DB] RE: LIMIT and get_num_rows

2002-01-14 Thread matt stewart
you've assumed correctly - so it's definitely faster to do the two queries? okey dokey, then that's the method i shall use. thanks to everyone who's added their thoughts! -Original Message- From: Peter Westergaard [mailto:[EMAIL PROTECTED]] Sent: 14 January 2002 14:01 To: [EMAIL PROTECTED

RE: [PHP-DB] LIMIT and get_num_rows

2002-01-14 Thread matt stewart
g a get_num_rows and then only using the first 20? -Original Message- From: Jonatan Bagge [mailto:[EMAIL PROTECTED]] Sent: 14 January 2002 11:00 To: matt stewart Subject: Re: [PHP-DB] LIMIT and get_num_rows First do a SELECT count(*) from tablename; This will get the number of entries.

[PHP-DB] LIMIT and get_num_rows

2002-01-14 Thread matt stewart
hi guys, just looking for verification on this, as i don't think there's any way to do it Basically, i want to return the results for a search, but only return the first 20 results from the start number given LIMIT $start, 20 BUT... i'd like to have a page 1-whatever so if there are 65 re

RE: [PHP-DB] MySQL Result Resource

2002-01-11 Thread matt stewart
shouldn't it be PASSWORD('madonna') ?? -Original Message- From: Necro [mailto:[EMAIL PROTECTED]] Sent: 11 January 2002 04:39 To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] MySQL Result Resource http://www.hotscripts.com/Detailed/4219.html <<--- that is the script But I cannot use crypt()

RE: [PHP-DB] simple question

2002-01-10 Thread matt stewart
not tried it, but according to the manual, it should be something like.. SELECT * FROM Bands WHERE Name REGEXP "^[0-9]"; check out the relevant page and see what you think: http://www.mysql.com/doc/S/t/String_comparison_functions.html regards, Matt -Original Message- From: Barry Rums

RE: [PHP-DB] mysql_num_rows

2002-01-08 Thread matt stewart
don't know if this makes a difference, but i've always used WHERE bookid = '$bookid'"; - single quote round the $bookid variable - not sure if that's the problem, or if it's just good practice? -Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]] Sent: 08 January 2002 14:0

RE: [PHP-DB] Formated Results

2002-01-07 Thread matt stewart
well, i'm sure there are lots out there, but i am very happy with... "PHP and MySQL Web Development" By Luke Welling and Laura Thomson, published by SAMS First printed in March 2001, so it's still not out of date. there are probably lots of other good books out there too though. -Original Me

RE: [PHP-DB] Formated Results

2002-01-07 Thread matt stewart
without code it's hard to know, but i'd have thought a simple html tag around the entry should work. ie... printf "%s",$myrow[Lyrics]; -Original Message- From: Barry Rumsey [mailto:[EMAIL PROTECTED]] Sent: 07 January 2002 12:20 To: [EMAIL PROTECTED] Subject: [PHP-DB] Formated Results H

RE: [PHP-DB] Fixed Quote Marks in Inputs

2002-01-07 Thread matt stewart
No! don't get them started again! my inbox won't take it any more. -Original Message- From: Boaz Yahav [mailto:[EMAIL PROTECTED]] Sent: 05 January 2002 08:07 To: Bogdan Stancescu; Jonathan Hilgeman Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Fixed Quote Marks in Inputs I jus

RE: [PHP-DB] Re: Redirecting to a new page

2002-01-07 Thread matt stewart
e admin.php url in the browser and they get admin access even if they are not admins. Fred Matt Stewart <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Can't find the right instructions on php.net, basically, i want a page where > so

[PHP-DB] Redirecting to a new page

2002-01-04 Thread matt stewart
Can't find the right instructions on php.net, basically, i want a page where someone logs in, and then according to the database entry for them, either they are an admin user or a normal user, and it should then send them to a page depending on which they are. I've accessed the db ok, and checked

RE: [PHP-DB] Checkboxes, PHP, and MySQL

2001-12-20 Thread matt stewart
the value doesn't determine whether it's checked or not - it determines the value passed WHEN it's checked. try the lines below: echo""; }else{ echo">"; } or something along these lines. -Original Message- From: SpyProductions Support Team [mailto:[EMAIL PROTECTED]] Sent: 20 Decem

RE: [PHP-DB] Decrypting PASSWORD() from MySQL

2001-12-20 Thread matt stewart
good point well made. this system has pretty much everything we need - thanks! -Original Message- From: Ryan Marrs [mailto:[EMAIL PROTECTED]] Sent: 20 December 2001 16:17 To: 'Zach Curtis'; matt stewart Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Decrypting PASSWORD() from

RE: [PHP-DB] Decrypting PASSWORD() from MySQL

2001-12-20 Thread matt stewart
I would go for the "generate new random password" approach - email the new random password to the registered email address, then they can log in using it and reset it to whatever they want. probably easier than using lots of code encrypting and decrypting things? Let me know what you decide on, an

RE: [PHP-DB] Re: while...if statements???

2001-12-19 Thread matt stewart
and i always thought the best tactic was to go ugly early. seriously, this isn't really that ugly a solution, most textbooks tend to tell you to use this method to start with as its a bit simpler to understand for beginners - an if...else statement to see if an initial row is returned, then you c

RE: [PHP-DB] Re: Dynamically populating a dropdown box

2001-12-14 Thread matt stewart
yep, that's basically what i use for this sort of thing - it's a nice short simple function, and works a treat. Obviously if you'd rather be passing the actual colour name to the next step, you use printf("%s", $myrow["colorname"], $myrow["colorname"]); I also prefer to use printf(" so it has the

RE: [PHP-DB] parse error

2001-12-14 Thread matt stewart
the way to start this is to just add a couple of letters to the message and see if you're still getting an error - try (on line 357)... $message .=">no\nHello world"; keep it all on one line, and then see if you're still getting an error - if you are then i don't think this line is the one you h

RE: [PHP-DB] Problem with MySQL and array loop

2001-12-13 Thread matt stewart
you're only printing stuff while i=0, i=1,i=6. therefore only 7 things come out. either make the loop for($i=0;$i<=7;$i++), or for($i=0;$i<8;$i++). -Original Message- From: +markus lervik [mailto:[EMAIL PROTECTED]] Sent: 13 December 2001 09:37 To: php-db Subject: [PHP-DB] Problem with

RE: [PHP-DB] WAS: Use php to plot graph. NOW: ASCII GRAPH CONTEST

2001-12-04 Thread matt stewart
we could even give an "i love linux" t-shirt to the winner of the contest! -Original Message- From: Daniel Barton [mailto:[EMAIL PROTECTED]] Sent: 03 December 2001 17:00 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP-DB] WAS: Use php to plot graph. NOW: ASCII GRAPH CONTEST

RE: [PHP-DB] Use php to plot graph.

2001-12-03 Thread matt stewart
yes, it is possible - read up on the .PNG image format, as it is possible to create graphs ind images dynamically to suit the data and figures youve extracted from the database -Original Message- From: Denny Ow [mailto:[EMAIL PROTECTED]] Sent: 03 December 2001 16:14 To: [EMAIL PROTECTED]

RE: [PHP-DB] get the record id of the last addition in a table

2001-11-27 Thread matt stewart
$last_add = mysql_insert_id(); - thanks to Bruno Gimenes Pereti who answered this very same question when i asked it a couple of weeks ago ;) all the best, Matt -Original Message- From: LeTortorec, Jean-Louis [mailto:[EMAIL PROTECTED]] Sent: 26 November 2001 22:22 To: '[EMAIL PROTECTE

RE: [PHP-DB] Combination of SQL statements invalid in MySQL?

2001-11-22 Thread matt stewart
never tried this before, but do you need some single quote's around the whole "(select user_id.)"? then of course there'd need to be some escape character for the single quotes in the "user_name = 'herbert01'" bit... let me know if that is the problem, as this is just a guess! cheers, Matt

RE: [PHP-DB] New to PHP and MySQL!!!

2001-11-22 Thread matt stewart
i'd advise not using something like ultradev until you can write some nice little scripts in notepad! it's always easier to debug if you start learning the code properly, then move onto something like ultradev just to speed it up a bit when you're competent. firstly, the actual extraction of code

RE: [PHP-DB] Upload

2001-11-16 Thread matt stewart
always make sure you restrict what can be uploaded though! only allow file extensions that you know are safe! otherwise people might do nasty things to your server! -Original Message- From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] Sent: 16 November 2001 16:29 To: 'Lilian Salazar'; [EM

RE: [PHP-DB] Converting Date Form Fields

2001-11-16 Thread matt stewart
put them into an array $date_stuff[0] = $date_year; $date_stuff[1] = $date_month; $date_stuff[2] = "01"; $date_to_enter = join('-',$date_stuff); then whack $date_to_enter into your database - obviously if the input to $date_month is "

RE: [PHP-DB] help me on projecting some tables

2001-11-16 Thread matt stewart
VALUES(NULL,"Bread",1,"each",1.49); INSERT INTO styles VALUES( "White",LAST_INSERT_ID() ); INSERT INTO styles VALUES( "Black",LAST_INSERT_ID() ); INSERT INTO styles VALUES( "Wheat",LAST_INSERT_ID() ); INSERT INTO styles VALUES( "Hawaiian",LAST_INS

RE: [PHP-DB] PHP results bold in HTML

2001-11-16 Thread matt stewart
class $name $type ACTIVE SIM\n"; } }; } "Matt Stewart" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > if you post a bit of the offending code then i'll have a look

RE: [PHP-DB] help me on projecting some tables

2001-11-16 Thread matt stewart
not really sure how to do this, other than planning for as much as you can in your original tables, then have a spare table with four columns - Row_ID, Characteristic_Name, Characteristic_Value, and Product_Refer_ID. so then if you get a new characteristic (eg colour) then you could have values 1,

RE: [PHP-DB] PHP results bold in HTML

2001-11-16 Thread matt stewart
if you post a bit of the offending code then i'll have a look - sounds strange though -Original Message- From: Kevin Schaaps [mailto:[EMAIL PROTECTED]] Sent: 16 November 2001 11:44 To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP results bold in HTML Hi everyone, I've noticed something stra

RE: [PHP-DB] Why use MySQL with PHP

2001-11-15 Thread matt stewart
27;t mySQL 4 therefore be slower? -Original Message- From: Lars B. Jensen [mailto:[EMAIL PROTECTED]] Sent: 15 November 2001 12:19 To: matt stewart Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Why use MySQL with PHP Stored procedures is missing in mySQL correct but is scheduled with the exit

RE: [PHP-DB] Why use MySQL with PHP

2001-11-15 Thread matt stewart
The main reasons are possibly later on its drawbacks - basically, its main attraction is the ease of use, as it's so simple! MySQL and PHP fit together so well and for people just learning scripting with databases, there's not much that's as easy to pick up quickly and produce basic database drive

RE: [PHP-DB] Problem with include()

2001-11-13 Thread matt stewart
That sounds the likely answer to me too - you don't generally try to send a parameter to something you're including. if you're just trying to go to that page after executing some code, do a print "Location:yadayadayada...?id=KnChooseBoots" -Original Message- From: Bruno Gimenes Pereti [ma

RE: [PHP-DB] COPY files = Warning permission denyed

2001-11-09 Thread matt stewart
think the most likely is there is not a temporary upload directory set in PHP on your server? I'd check the relevant PHP settings first, also check the final destination folder has relevant write permissions. -Original Message- From: Ivo [mailto:[EMAIL PROTECTED]] Sent: 09 November 2001 1

RE: RE: [PHP-DB] inserting array into mySQL

2001-11-09 Thread matt stewart
wboys (American Football team) and Manchester United (Funny Football team), the win goes to the Cowboys. yee...haaa... -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 8:27 AM To: matt stewart Cc: [EMAIL PROTECTED] Subject: Re: RE: [P

RE: [PHP-DB] inserting array into mySQL

2001-11-09 Thread matt stewart
Was that line in the movie? If so, wisely said. -Original Message----- From: matt stewart [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 8:22 AM To: 'Rick Emery'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] inserting array into mySQL >>As we say here in Dallas: the

RE: [PHP-DB] inserting array into mySQL

2001-11-09 Thread matt stewart
>>As we say here in Dallas: there are two kinds of people...those who live in Texas...and those who wish they did. Full Metal Jacket? ;) --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.295 / Virus Database: 159 - Release Date: 0

RE: [PHP-DB] Not a valid MySQL result resource

2001-11-09 Thread matt stewart
don't you need it to be SELECT login, password... lowercase first letter? - if you're comparing the columns user.login and user.password. -Original Message- From: DL Neil [mailto:[EMAIL PROTECTED]] Sent: 09 November 2001 01:34 To: MPropre Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] No

[PHP-DB] getting results from INSERT

2001-10-26 Thread Matt Stewart
What i'm after is getting the primary key for a record that's just been added - I have an image file upload accompanying a database addition, and the image gets renamed $unique_ID.jpeg only problem is that the current method inserts the information, which auto produces the primary key, but the onl