Did a php.ini-dist or php.ini-recommended file come with your installation
files? Locate those, edit them accordingly, and save it as php.ini in
/usr/lib/
---John Holmes...
- Original Message -
From: Verdon Vaillancourt [EMAIL PROTECTED]
To: Peter [EMAIL PROTECTED]; [EMAIL PROTECTED]
I have a bunch of pages on my site inside an apache .htaccess protected
directory. After visitors have logged in I am on part of my site I need to
find out which user it is that has logged in. I thought this information
was
stored in the $PHP_AUTH_USER variable, but when I print this variable
img src=http://www.yourserver.com/image.php?ID=xxx;
Do what you need to do with the PHP code as far as keeping a count of
visitors, etc, and then create an image header and send it the data for a
1x1 pixel transparant image.
Got a question for everyone else, b/c I'm not sure on this. If I have
. Holmes' [EMAIL PROTECTED]; Fifield, Mike
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, June 04, 2002 12:19 PM
Subject: RE: [PHP] PHP_AUTH_USER
Correction Redhat7 :-) Got it working thanks for all the help!
-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED
No problem bud, sorry I tried to help.
Anyhow, this does work, you just do not know how to write image.php so that
it returns the correct data for an image counter. maybe i misunderstood your
first email, but I thought you were looking for a hidden way of keeping
track of page hit counts and
The only good way to do it is with authentication. Have the user log in
and then allow them one vote.
Any other method is going to be open to cheating, so be aware of it.
If the poll is important and the results need to be as exact as possible,
use some form of authentication. If it's just a
What are your settings for magic_quotes?
magic_quotes_gpc
magic_quotes_runtime
in your php.ini.
magic_quotes_gpc will automagically addslashes() to incoming GET, POST, and
COOKIE data. So you don't need to do it yourself. The defaults to On.
magic_quotes_runtime will autmagically addslashes()
in a new window, then the session will not exist and they will be
considered a new user.
Have you tried anything so far?
---John Holmes...
- Original Message -
From: Martin Smetak [EMAIL PROTECTED]
To: 1LT John W. Holmes [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, June 05, 2002 6
I said try it...I'm not guaranteeing it works.
---John Holmes...
- Original Message -
From: Martin Smetak [EMAIL PROTECTED]
To: 1LT John W. Holmes [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, June 05, 2002 7:56 AM
Subject: Re: [PHP] multisite hit counter, includin session
Program it into the homepage to run once a day. As long as you get one hit
per day, then it'll run.
---John Holmes...
- Original Message -
From: Mauricio Cuenca [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 05, 2002 9:15 AM
Subject: [PHP] Crontab
Hello,
I need to
Since those look like MySQL timestamps, I would suggest you do it in your
query.
SELECT TO_DAYS(column1) - TO_DAYS(column2) AS Difference FROM table
Adapt to your needs.
Explain what your overall mission is and there is probably a query that'll
return just that.
If you want to use PHP, format
You already have the php script, so use that. modify it so that it does
exactly what you need on your system, so that when you call it up through
www.youdomain.com/script.php, it does what you need without any user
interaction or producing any output to the screen (email or log file is
okay).
Subject: Re: [PHP] Stopping multiple votes by IP
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then 1LT John W. Holmes declared
The only good way to do it is with authentication. Have the user log
in
and then allow them one vote.
Any other method is going to be open to cheating
If you compile it with --enable-trans-sid, then PHP will use cookies when
they are available and if they are not, it'll append the SID to links and
forms. Basically, it's automatic.
---John Holmes...
- Original Message -
From: Jeff Field [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
SELECT * FROM table WHERE ID = $_GET['ID']
Then create a page to display all of that information. Look at the mysql
functions and learn some PHP. We can't help you without knowing what's in
your table and how you want it displayed, etc...
So keep learning and reading and you'll figure out how
Use $HTTP_POST_VARS['var'] instead of $var and you will know it comes from
post. Or $HTTP_GET_VARS['var'] if you want it from GET (the URL).
Or use the superglobals like someone else mentioned if you have the latest
PHP version.
---John Holmes...
- Original Message -
From: Joe
PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 4:29 PM
To: Igor Portnoy; [EMAIL PROTECTED]
Subject: Re: [PHP] Passing variable to new page and pulling
the rest of
info from
I guess PHP just can't tell that cookies are enabled. I'm sure the method
isn't full proof. Your sessions get through either way, so what's the big
deal?
---John Holmes...
- Original Message -
From: Dan Hardiker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 05, 2002 4:50
form method=post action=blah.php
select multiple name=bleh
option value=11/option
option value=22/option
option value=33/option
option value=44/option
option value=55/option
/select
/form
form method=post action=blah.php
select multiple name=bleh[]
Asking twice doesn't help, bud. It's just going to piss people off.
If someone has an answer they'll let you know, otherwise look for other
resources.
---John Holmes...
- Original Message -
From: Igor Portnoy [EMAIL PROTECTED]
To: [EMAIL PROTECTED] '[EMAIL PROTECTED]'
Sent: Thursday,
Can you do the strtoupper() in your query, using the appropriate Oracle
function?
Maybe it'll handle the different character sets better.
---John Holmes...
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 07, 2002 3:07 PM
Subject: [PHP] HTML or PHP
Look at the output buffering section in the manual. Read the user comments.
http://www.php.net/manual/en/ref.outcontrol.php
---John Holmes...
- Original Message -
From: W. Enserink [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 10, 2002 3:34 PM
Subject: [PHP] storing html
The PHP parsing would take place before the file is sent to the browser. The
CSS goes into effect when it hits the browser, on the client side, so it
wouldn't matter. All the client cares is that there was a CSS file sent, it
doesn't care if it was text or created by PHP or whatever.
That's how
Just note that REQUEST accounts for COOKIE, POST, and GET data...the
settings for which overrides which are in php.ini.
---John Holmes...
- Original Message -
From: Analysis Solutions [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Tuesday, June 11, 2002 10:25 AM
Subject: Re:
Double check that you have a.title, and not just title by itself. Two
tables must have a title column, so make sure you specify which one you
mean.
---John Holmes...
- Original Message -
From: Aaron [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 12, 2002 12:40 AM
I don't understand what you want at all, but you can use fopen() to open
your file and read it from there...
www.php.net/fopen
---John Holmes...
- Original Message -
From: Uma Shankari T. [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]
Sent: Wednesday, June 12, 2002 6:46 AM
Subject: [PHP]
Make the target of the form a blank window. process the form, then generate
some javascript to close the window. original window remains unchanged.
---John Holmes...
- Original Message -
From: Bret L Conard [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 12, 2002 7:33 AM
Do it just like you would with prev/next links. Use LIMIT in your query to
get out 50 or so at a time. Loop through them, sending mail, then use header
to automatically redirect to the next page, incrementing the number to use
in LIMIT.
---John Holmes...
- Original Message -
From:
You shouldn't have to store the sessionID. It's going to be new each time
someone comes to the site, anyhow. Once the log in, you should know who they
are. Save the tracking information you want in your database and pull it
out based on their username.
You have to use a database or a file to
If you want to do it right, don' t output anything, obviously. Instead of
using ECHO, assign all output to a variable within your class. Then, at the
end of the processing, after everything is done, echo out that variable
(which will contain the entire page). Then you can set cookies, sessions,
Google??
http://www.google.com/search?hl=enie=UTF8oe=UTF8q=HTML-Kit
---John Holmes...
- Original Message -
From: [EMAIL PROTECTED]
To: Adrian Greeman [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Friday, June 14, 2002 11:38 AM
Subject: Re: [PHP] Editor
URL??
:)
*
* Cal Evans
You have your answer, just use this:
$outstring = eregi_replace(badword,goodword,$stringtocheck);
It'll replace it whether it's at the beginning or end of a string, embedded
in a word, or by itself. Isn't that what you want?
Actually, it'd be better and faster to just use str_replace() instead
Kind of. You can have it include() or fopen() something from another server
and do whatever.
But you have to realize that the code is still open on their page, so they
can bypass or just comment out whatever you are trying to do.
Search the archives, too. Wasn't there a huge discussion on this
Plain and simple...you have four options: COOKIE, GET, POST, SESSION.
So, load all of your data into a cookie or load it into hidden elements in a
form and submit it somewhere...
Okay?
---John Holmes...
- Original Message -
From: Don [EMAIL PROTECTED]
To: php list [EMAIL PROTECTED]
You pass a string to the function and it returns a string with each word
starting with an uppercase.
$string = hello world;
$new_string = ucwords($string);
echo $new_string; // Displays 'Hello World'
---John Holmes...
- Original Message -
From: Daniel Negron/KBE [EMAIL PROTECTED]
To:
So you just want to insert a bunch of words into the table if they aren't
there already? Why not make the column unique and just insert them. Ignore
the warnings about duplicates...
---John Holmes...
- Original Message -
From: Zac Hillier [EMAIL PROTECTED]
To: [EMAIL PROTECTED];
Temporary tables only exist for the duration of your script, with or without
using mysql_pconnect(). If you want a MySQL table to remain, then don't make
it temporary. Make it a regular table and then create a cron script that
goes through and deletes tables that are more than X minutes/hours
I thought we answered this question already!
It's simple. On your login page or whatever, you start a session and set a
variable saying that the user is logged in.
?
session_start();
//check username and password
//if good...
$_SESSION['logged_in'] = 1;
?
Now, the most secure way to protect
You can do whatever you want, of course.
Sessions just make your code easier and portable and more people will be
able to understand what you're talking about.
Sessions are just a way to pass a variable between pages. You assign a
variable to the session, and you retrieve it on any other page
See my posting I just made about How do I hide the download link ...
You'll want to use a similar method with the download.php. You may not have
to check for a session, but you can use the scirpt to keep track of what
file was downloaded, increment it's counter in a database, or send an email,
The layout on that site is so annoying. Yeah, it looks pretty, but it's
annoying. It's PHP2Excel BiffWriter that your looking for on that site.
Should be one of the topics when you expand the central dot (after you
close the news' popup). annoying...
Like someone else said, I just use HTML and
Are you sure display_errors is turned ON in php.ini on the new server? Do
the two servers have different settings for register_globals in php.ini?
---John Holmes...
- Original Message -
From: Kris Vose [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 18, 2002 11:12 AM
John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 11:47 AM
To: Martin Lucas; 'Chad Day'; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP to Excel?
The layout on that site is so annoying. Yeah, it looks pretty, but it's
annoying. It's PHP2Excel BiffWriter that your looking
Like someone else said, this applies if PHP is compiled as a cgi and you can
run it from the command line.
If it's a module, you have to load up your page through a web browser to run
it. So for your command, you can use
lynx --dump http://www.domain.com/whatever.php
providing you have lynx
http://phorum.org
- Original Message -
From: Martin Thoma [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 19, 2002 5:43 AM
Subject: [PHP] Forum with php
Hello! I saw a lot of forums (or boards) which looks almost the same and
they are done in php. Is there a free
I never saw the original post, but you'll want to use the TO_DAYS() function
in your query.
SELECT TO_DAYS(leave_to) - TO_DAYS(leave_from) AS Num_Days FROM your_table
---John Holmes...
- Original Message -
From: Lazor, Ed [EMAIL PROTECTED]
To: 'Jack' [EMAIL PROTECTED]; [EMAIL
Is there any way to determine script's memory usage?
Depends on your web server. There is a way in apache. Rasmus answered this
same question for me a couple weeks ago, look through the archives. I saw an
option in IIS to put memory usage into the logs, that may work, too.
What about
Sorry, I should've mentioned I had looked over those. I may take bits and
pieces from those. Was just wondering if anyone had anything else. something
that follows the manual, for example? This is a variable, this is an IF
loop, this is how you do a file upload, etc...
---John Holmes...
-
It's correct for PHP, but there's no telling what MySQL is actually
recieving. Are you sure all of those variables have values?? Yeah? Are you
really sure??
Use mysql_error() with your query.
$result = mysql_query(UPDATE ...) or die(Error in update: .
mysql_error());
---John Holmes...
-
$query = INSERT INTO `stats` (`vid`, `id`, `vn`, `time`, `host`, `referrer`,
`browser`) VALUES ('', '$id', '$_COOKIE
['tececo_stats']', '$time', '$_SERVER['REMOTE_HOST']', '$_SERVER['HTTP_REFERER']',
'$_SERVER
['HTTP_USER_AGENT']'); ;
Try using $_COOKIE[tececo_stats] instead...without the
So what's on /usr/home/pagon/www/index.php on line 497 at a few lines
before it?
---John Holmes...
- Original Message -
From: Pag [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 22, 2002 9:50 PM
Subject: [PHP] getaddrinfo failed
Sorry, i sent this to the list a few days
$query = INSERT INTO `stats` (`vid`, `id`, `vn`, `time`, `host`, `referrer`,
`browser`) VALUES ('', '$id', '$_COOKIE
['tececo_stats']', '$time', '$_SERVER['REMOTE_HOST']', '$_SERVER['HTTP_REFERER']',
'$_SERVER
['HTTP_USER_AGENT']'); ;
I hope you are using addslashes on your $_COOKIE and
$query = UPDATE $table SET field1='$var1' WHERE id='$id';
I really hope you don't have register_globals on, or you are validating the
value of $table before you run this kind of query, otherwise your query is
open up to an attack to update any table in the database...
$table = admin SET
info
from?
Thanks,
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com
BTW I have fixed the error now.
- Original Message -
From: 1LT John W. Holmes [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, June 23, 2002 2:11 PM
Subject: Re: [PHP] Error(Newbie)
$query
I have a program in php, with access at mysql database.
The problem is, my users have to access Refresh button anytime when they
want to see
real time values in database.
How to make a function for refreshing values in php pages, without pressing
Refresh button. What must i read?
PHP can't
Take a look at this page, it uses flush to stagger the results as php
processes it. pretty cool
http://www.massassi.com/bTemplate/benchmarks/benchmark_var_assign.php?i=50
I'd be interested to hear from other people if that works in other browsers.
It had a nice effect when I looked at it in
Can you please explain what you're doing more?
PHP and Javascript are completely different. PHP happens first, on the web
server, to create code to send to the browser. The browser then interprets
this code, executes any javascript, etc, and displays the page. You can't
have both at the same
Can someone let me know when you call sybase_fetch_array that the internal
row pointer of the sybase result is increased. So that subsequent calls
using sybase_fetch_array will return a result 1 more than the previous
result return?
Hey, I just wanted to let you know that when you call
Do you have display_errors ON in your php.ini ??
---John Holmes...
- Original Message -
From: Chuck PUP Payne [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Monday, June 24, 2002 3:24 PM
Subject: [PHP] Lost, need help debuggin
Hi,
I am trying to debugging this
PROTECTED]
To: 1LT John W. Holmes [EMAIL PROTECTED]; Chuck PUP Payne
[EMAIL PROTECTED]; PHP General [EMAIL PROTECTED]
Sent: Monday, June 24, 2002 3:31 PM
Subject: Re: [PHP] Lost, need help debuggin
Not sure I am on my laptop, an iBook running php/apache. So I am not sure
where php.ini is.
Chuck
Are there any other reasons why header() would fail while output
buffering is off.
What's the error message? It tells you exactly what file and line number
started the output, so that's where you should look...
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To
A combination of $_SERVER['SERVER_NAME'], $_SERVER['SCRIPT_NAME'], and
$_SERVER['QUERY_STRING'] should get you what you want.
Check out a phpinfo() page for more variables, or do a print_r($_SERVER);
---John Holmes...
- Original Message -
From: Harriet Xing [EMAIL PROTECTED]
To: [EMAIL
Put a valid path in your session.save_path in php.ini. Something like
c:\windows\temp or whatever...
---John Holmes...
- Original Message -
From: Phil Schwarzmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 25, 2002 1:54 PM
Subject: [PHP] php not remembering a session
I'm busy with an order form in php. How would I display a text field only
if a checkbox is checked. The reason for this is that if the user selects
the product in the form and, how would I get to display the quantity field
corresponding to that checkbox
On Tuesday, June 25, 2002, at 03:46 PM, Peter wrote:
When you have the standard
$link = mysql_connect(localhost,username,secretpassword);
Would it not be possible for someone to use PHP from another server to
download your source and find out your MySQL details including password?
Do you have session_start() on each page?
---John Holmes...
- Original Message -
From: Phil Schwarzmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 26, 2002 11:31 AM
Subject: [PHP] sessions are remembered for one page, then forgotten
I'm still having a little
fopen('http://www.yahoo.com,r;);
---John Holmes...
- Original Message -
From: Kelly Meeks [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 27, 2002 3:53 PM
Subject: [PHP] grabbing content of a web page...
Howdy,
I know there has to be a way to grab output of an url on
You're fault. :)
Remember that quotes are used to tell the beginning and end of a string. So
if you are using a to mean the beginning of the string, then there can't
be any within the string itself. If there are any , they need to be
changed to \, which means they are escaped.
How do you define idle time in a stateless environment??
How do you know if it just takes the person 20 minutes to read the page, or
they are idle?
All you can do is set a time when the page was requested, and when the next
page is requested, if it's been over XX minutes, they were idle too
From: Jonathan Rosenberg [EMAIL PROTECTED]
Let's say I am in a shared server environment the provider does
NOT have safe_mode turned on. In that case, it seems to me that
it is insecure to keep secrets (e.g., DB passwords) in a PHP
file that is executed by the server.
I say this because
I want to search within a result from a query
A specific range (price)
If that's what you really want, then you need to save the results of your
first query into a table that you can re-query at a later date. Run a cron
job to delete old tables.
If your query is:
SELECT * FROM main WHERE price
From: Jason Wong [EMAIL PROTECTED]
select * from table where price 0 AND price 50;
SELECT * FROM table WHERE price BETWEEN 0 AND 50;
Same thing, easier to read (assuming MySQL, don't know if it works on
others).
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To
Thanks for the reply. But changing the ground read permission of
the PHP files wouldn't help, either, would it? Because the other
users who have web sites can just create a PHP file that reads my
PHP files from one of their pages (which would be running in
group websecret).
Seems like
There are some programs out there that'll take a word document and extract
all of the text from it. Good for indexing database or making summaries. I
can't remember the name of any, but search the usual Google, sourceforge,
hotscripts.com, etc..
---John Holmes...
- Original Message -
Can you post some example code. I know that 2038 is the maximum for a MySQL
date column, but I don't know how you'd be setting it to that...
---John Holmes...
- Original Message -
From: Shane [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 01, 2002 12:38 PM
Subject: [PHP]
The code to create a check box is:
input type=checkbox name=whatever value=something
HTH,
---John Holmes...
PS: It might help if you actually try to do something yourself and then ask
a question. We're not here to feed you code. Anyways, a way you might
approach it is to name all of your
Put a form around each section, so only the data in the form will be
submitted. You can have more than one form on a page, and only the form
containing the submit button that's pressed will be sent, the others will be
ignored/dropped/whatever...
---John Holmes...
- Original Message -
Yes, your problem is it doesn't work.
HTH,
---John Holmes...
PS: Think that's a worthless answer? Well...same for your question...
- Original Message -
From: Adrian Murphy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 03, 2002 8:47 AM
Subject: [PHP] whats wrong with
$fd = fopen($filename,'r');
fpassthru($fd);
or
readfile($filename);
Saves you an fopen call, same result...
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Just pick one, and use only one. If you have magic_quotes ON, then you don't
need addslashes, etc.
---John Holmes...
- Original Message -
From: Jean-Christian Imbeault [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 03, 2002 9:40 AM
Subject: [PHP] addslahes and magic quote
From: Jean-Christian Imbeault [EMAIL PROTECTED]
Erik Price wrote:
Turn off magic_quotes and do addslashes() explicitly every time you do a
database insert. Then make sure you always stripslash() data returned
from a database query.
You don't need to strip slashes from data coming out
- Original Message -
From: Erik Price [EMAIL PROTECTED]
foreach ($_POST as $key = $val)
{
$str .= $key=$val;
}
Make sure you define $str = ; before it enters the loop, othewise you'll
throw some warnings if your error reporting level is set high. It's because
$str is
Or just use import_request_variables(). You can do all of them at once. It's
only in PHP 4.1.0, though.
www.php.net/import_request_variables
---John Holmes...
- Original Message -
From: Kevin Stone [EMAIL PROTECTED]
To: php-general [EMAIL PROTECTED]
Sent: Wednesday, July 03, 2002 2:33
Look into exec() or virtual().
If the script is run over the web, you can just do a
fopen(http://www.example.com/script.php;); and read the result. You can do
the same for any other script that's run through the web b/c you'll receive
it's parsed output, not the source.
---John Holmes...
-
.
In article 007501c222c5$2014f020$2f7e3393@TB447CCO3,
[EMAIL PROTECTED] (1lt John W. Holmes) wrote:
I have a perl script that outputs HTML data. How would I do to execute
that script from within a php-script and have it's output parsed by
-apache-.
I'm not talking about eval
It seems that PHP is much more powerful and would completely replace the
need for SSI.
Heh...wow...the understatement of the century.. :)
Glad you figured that out.
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
// Message on my web page
Warning: Undefined index: mode in /var/www/html/inc/header.php on line 3
// My Script Here
1: ?php
2: // These are globals on every page
3: $mode = $_GET['mode'];
4: $si_uuid = $_GET['si_uuid'];
5: $po_uuid = $_GET['po_uuid'];
PHP is warning you that 'mode' is
My favorite part is that he requests a read receipt for every one of these
messages. I hope everyone is sending him one of those, too, to clutter up
his email even more.
---John Holmes...
- Original Message -
From: Zac Hillier [EMAIL PROTECTED]
To: Erik Hegreberg [EMAIL PROTECTED];
How about
SELECT * FROM table WHERE $current_shot BETWEEN start_shot AND end_shot
Also, I hope you are validating $current_shot if register globals is on, to
make sure it's really just an integer and not some extra SQL that'll allow
someone to view your entire table/database...
---John
You DON'T have to use stripslashes() on data coming out of a database. The
slashes were there to escape certain characters so they could make it into
the database. The actual slashes do not go into the database. If they are in
your case, then you're using addslashes() twice, somehow. The only
The GIMP is free
Man, if I had a nickel for every time I heard that...
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
You've got all kinds of options. I suggest you do any date calculations in
the database and use DATE_FORMAT to format any dates pulled out. It's
exactly like the date() function in PHP. MySQL has some great date and time
functions so you can select out exactly what you want. You can use the
I have an array of elements which are separated with the operator
comma(,).
==
$array = implode(,, $checkb);
echo $array.'\n';
$result = mysql_query(DELETE FROM temp WHERE inv_tag IN
($array)) or die('Error in query'.mysql_error());
You'll have to assign each user a unique id each time they log on. If they
attempt to log on again, check and see if they already have a unique id and
if they do, don't let them log on again.
the problems you'll run into with this is, though, is that if someone
doesn't log out, they'll still
Why do you need to exit? If your code is layed out correctly, you shouldn't
have to.
if($something)
{ //part 1 }
else
{ //part 2 }
If $something evaluates to true, only Part 1 is executed...part 2 is never
seen. vice versa if $something is negative.
---John Holmes...
- Original Message
There really isn't a good way to do this, I think.
Any time you're taking just a cookie, and using that data to assume who the
user is, it's open to hijacking. I can sniff the cookie or maybe find a
cross-site scripting bug to steal it, create the same cookie on my machine,
and poof, i'm that
It's not random. Strings need to be enclosed. You can use single or double
quotes, but you have to use them.
---John Holmes...
- Original Message -
From: Phil Schwarzmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 11:19 AM
Subject: [PHP] Queries - Sometimes I
Call session_start() before ANY output. html is OUTPUT.
---John Holmes...
- Original Message -
From: Matt Babineau [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 11:20 AM
Subject: [PHP] $_SESSION - autostart, or session_start() ?
If I set the SESSION
I want query my mysql table and get one particular row.
So let's say my table had 5 rows (entries) in it, and I want to pull
just row #2, how would I do this??
What is row #2?? The second row when the table is ordered by the first
column? second column? ascending? decending? without an ORDER
Off topic...
So let's say my table had 5 rows (entries) in it, and I want to pull
just row #2, how would I do this??
SELECT * FROM table LIMIT 1,1;
Technically, without an ORDER BY in your query, the database can return a
different row each time with this query. Without an ORDER BY, how do
1 - 100 of 2745 matches
Mail list logo