RE: [PHP-DB] How can this be done?

2001-04-26 Thread Beau Lebens
you need to use the addslashes() command which will escape the quote mark for you, so something like $query="insert into trivia (trivia) values ('" . addslashes($line) . "')"; however, you will find that on a machine which is configured with magic_quotes_gpc turned on, you will end up with somet

RE: [PHP-DB] problem with functin newbie please help

2001-04-29 Thread Beau Lebens
also, on line 11 you use a variable called $localhost, i think you mean $hostname, which has the value "localhost" :) that won't help since it will pass a null value and mysql_connect will bork at having too few parameters. and you need to assign your mysql connection to a variable, so that you c

RE: [PHP-DB] Updating Mysql database from a remote computer

2001-04-30 Thread Beau Lebens
if the computer where the writable copy of the database is stored is permanently connected to the other one, then you could just create a new user for that database using mysqls security features which only has access to read information, no change or delete. and yes you can connect using an ip,

RE: [PHP-DB] Keeping authentication

2001-04-30 Thread Beau Lebens
you need to use sessions and register the user's session name, and save it to the db against their account, then you can check that the session still exists and that will say they are logged in still. have a look at the session management functions in the manual (only in php4+) HTH Beau // -

RE: [PHP-DB] Computer Exploded!!!

2001-04-30 Thread Beau Lebens
SELECT name FROM sites WHERE description LIKE '%best%' AND description LIKE '%net%' should do what you want i think :) % = wildcard for any character, any number of tiems _ = wildcard for any character, once only HTH Beau // -Original Message- // From: Selvin Sakal [mailto:[EMAIL PRO

RE: [PHP-DB] Your Internet Education!

2001-05-06 Thread Beau Lebens
something tells me that people on a php database mailing list already know a little about computers and the internet... dick // -Original Message- // From: Noel Hadfield [mailto:[EMAIL PROTECTED]] // Sent: Monday, 7 May 2001 10:54 AM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] Your Int

RE: [PHP-DB] sessions and page refresh?

2001-05-06 Thread Beau Lebens
if you just want to refresh same page, then there shouldn't really be a need, if you just do something like or, if you mean refresh to another page, then you could use the second one could also be used to send the location back to this page, but make sure you do something conditional to keep

RE: [PHP-DB] session.save_path

2001-05-09 Thread Beau Lebens
if you are using c: (win32 box) it should actually be c:\\ :) HTH Beau // -Original Message- // From: Philippe Saladin [mailto:[EMAIL PROTECTED]] // Sent: Wednesday, 9 May 2001 4:55 PM // To: [EMAIL PROTECTED] // Subject: Re: [PHP-DB] session.save_path // // // save_path = c://temp (wi

RE: [PHP-DB] INSERT statement

2001-05-21 Thread Beau Lebens
try INSERT INTO table (column2,column4) VALUES ('$x','$y') WHERE column1 = '$z' quote marks around the $z and make sure you are doing it as query( "INSERT INTO table (column2,column4) VALUES ('$x','$y') WHERE column1 = '$z'" ); or whatever, using " marks properly :) HTH Beau // -Original M

RE: [PHP-DB] PHP-Javascript

2001-05-23 Thread Beau Lebens
you are trying to use a php header to redirect... there is no need, just do it via javscript, and keep your variables where they belong :) var id; uid = prompt("Enter your ID","Your ID"); document.location.href = 'ndex.php?uid=' + uid; easy :) // -Original Message- // From: vipin cha

RE: [PHP-DB] concatenation

2001-06-21 Thread Beau Lebens
$mailto_link = "mailto:"; . $result["email_address"]; // -Original Message- // From: DanielW [mailto:[EMAIL PROTECTED]] // Sent: Thursday, 21 June 2001 1:06 PM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] concatenation // // // Greetings. // // Can anyone tell me how to concatenat

RE: [PHP-DB] MySQL Error???

2001-06-28 Thread Beau Lebens
sounds like your field definition is something like int(2) or something, it needs to be bigger so that it can handle higher numbers for the unique primary key :) // -Original Message- // From: Brian Grayless [mailto:[EMAIL PROTECTED]] // Sent: Thursday, 28 June 2001 12:24 AM // To: PHP DB

RE: [PHP-DB] Adobc error

2001-06-28 Thread Beau Lebens
Wilmar, it means that a file which is "included" via the "require()" function cannot be found. usually this is because they are doing something like require( $ROOT . "/the/file/they/want.php"); and you haven't set $ROOT properly, or something like that. basically, search registro.php for "requir

RE: [PHP-DB] Showing an image

2001-07-02 Thread Beau Lebens
what you should actually do is save that script as something like "image.php" and then on the page where you want to have text + images, do something like I am some text under the image that is grabbed from the DB assuming that the image.php page accesses teh DB based on a car called "uid'

RE: [PHP-DB] Newbie:Backend scripts

2001-07-05 Thread Beau Lebens
Sagil, the way I do something like this is write a script using PHP that does exactly what you want, without any input or anything like that, then just set up cron to run that script every 2 hours. you can use either lynx to hit it as a webpage, or it's an admin script or something that you don't

RE: [PHP-DB] Newbie:Backend scripts

2001-07-05 Thread Beau Lebens
ly to the same file ENJOY! beau // -Original Message- // From: PHPFAN [mailto:[EMAIL PROTECTED]] // Sent: Friday, 6 July 2001 10:20 AM // To: [EMAIL PROTECTED] // Subject: Re: [PHP-DB] Newbie:Backend scripts // // // Hello Beau Lebens, // // Thank you very much for the advice. // I a

RE: [PHP-DB] Newbie:Backend scripts

2001-07-05 Thread Beau Lebens
// OK, i just checked and tested (jeez i'm a nice guy.. :P) and // dodgy Windoze // schedule doesn't allow you to do it by the hour, so if you // want it every 2 // hours, you'll have to set one, daily at 2am, one daily at // 4am etc etc, all // doing the same thing. change this, under the "S

RE: [PHP-DB] Re: setting cookies so the cookie will expire when the user's session ends.

2001-07-05 Thread Beau Lebens
one hour after the cookie is set, the session won't expire as such until either 1. the user closes their browser and destroys temporary cookies (not the case if you set expiry time) 2. the expiry time is reached 3. you determine from some other method (i.e. a different variable is set to fale or

RE: [PHP-DB] parsing checkbox array without [] and selecting all boxes

2001-07-09 Thread Beau Lebens
don't your checkboxes act like radio buttons when you check them if they all have the same name? i would do something like \n"; } ?>