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
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
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,
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
// -
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
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
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
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
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
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
$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
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
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
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'
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
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
// 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
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
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";
}
?>