if you're trying to redirect with something like header, then you need
to do that redirection before any output is sent to the browser...(note,
ANY output, likes SPACES)
look at www.php.net/header if you're interested...
jack
Justin French wrote:
>
> hi, i'm in the body of a html page, and I'd
On Mon, Apr 02, 2001 at 05:15:26PM +0200, Martin Skjöldebrand wrote:
> I'm afraid I dont quite under stand the output you gave (maybe ... or do
> you mean var_dump included the number of the array elements?)
First I echoed the number, then var_dump() also printed it, try
var_dump yourself.
Stig
hi, i'm in the body of a html page, and I'd like to
redirect to a new URL in an if() statement.
I *could* re-write the whole page so that the test
is in the head, and use meta tags to refresh, but
i'd rather not... the code will be heaps cleaner
without it.
thanks
Justin French
--
PHP Gen
> Fatal error: Call to unsupported or undefined function
> foreach() in ...
You're probably using PHP3 on that Apache server.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail
>can anyone help me in making a webpage (php) that shows the results of a
>MySQL database search?
>the search must be made using a form...
Take a look at webmonkey www.devshed.com www.phpbuilder.com
www.phpbeginner.com www.phpworld.com
But also on www.php.net many scripts can be found to
>p.s. if there is a faq/tutorial/set of guidelines out there on the web
>feel free to just send me a link and say RTFM. I've not found anything yet.
Try www.devshed.com Has some nice stuff.. Read the HOWTO's..
Install SSH and a secure FTP server with the ability to chroot people..
like ProFTP
foreach doesn't work in Linux-Apache and OK in Win with IIS:
Fatal error: Call to unsupported or undefined function foreach() in ...
My code:
foreach ($lineas as $key => $value) {
if (strpos($value,";".$idf.";")>0)
{
print "";
$fila=split(";",$va
I have this problem ? I want to connect to the Informix database on Unix
server and my apache server running on Windows 2000 but I haven't
php_ifx.dll. Please if you want send me. Thanx.
Roman
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EM
Hi Les,
@ 2:38:17 AM on 4/3/2001, Les Neste wrote:
LN> Hi, I'm using PHP4.04pl1 as an Apache module. I just wrote some
LN> code which calls ctype_alpha() and got the message
LN> Fatal error:
LN> Call to undefined function: ctype_alpha() in
LN> /usr/local/lesneste/requestpwd.ph
Hi, I'm using PHP4.04pl1 as an Apache module. I just wrote some code which
calls ctype_alpha() and got the message
Fatal error:
Call to undefined function: ctype_alpha() in
/usr/local/lesneste/requestpwd.php on line 80
Is this function truly non-existent or is there some compi
Marthe, if you post the script we can all get to the bottom of this pretty
quickly. You have a lot of expertise here ready to help. Just copy and
paste it into your email.
BTW, you should remove it from your site before you post it, if at all
possible.
Good luck.
..
@ 1:54:08 AM on 4/3/2001, Rasmus Lerdorf wrote:
RL> So you wrote a script that took a filename as an argument somehow and did
RL> something with it? That's always going to be insecure unless you do a lot
RL> of error checking on it.
...
RL> On Tue, 3 Apr 2001, Marthe Kristiansen wrote:
...
>>
If you could post the actual thing that he did, the actual script, that
would be helpful.
Jason Lotito
www.NewbieNetwork.net
Where those who can, teach;
and those who can, learn.
> -Original Message-
> From: Marthe Kristiansen [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 02, 2001 11
Is there an easy way to do this when I'm so new at this that I don't quite
understand what I'm doing wrong and how to prevent all those mistakes in the
beginning?
/Marthe
-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 03, 2001 7:54 AM
To: Marthe Kr
Of course, you can always disable certain functions, etc, that you deem to
insecure. PHP is as secure as you make it.
~Nuff said
Jason Lotito
www.NewbieNetwork.net
Where those who can, teach;
and those who can, learn.
> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTE
So you wrote a script that took a filename as an argument somehow and did
something with it? That's always going to be insecure unless you do a lot
of error checking on it.
-Rasmus
On Tue, 3 Apr 2001, Marthe Kristiansen wrote:
> Well, since I'm a newbie and also Norwegian it ain't that easy to
Well, since I'm a newbie and also Norwegian it ain't that easy to explain
very simple.
What he did was that he entered a file that showed all the users of the
server, as I said, and he told me this was kindof insecure.
To prevent it he showed me a code that would help a bit.
$filename=str_replace
Hey Marthe,
Do you know what he did? The problem may not have been a "PHP" problem
as much as a design or security issue...if you could include some code,
or tell us what he actually did, we might be able to explain a) why its
a problem or b) why its not a PHP issue...
best regards,
jack
Marthe
Not much to go on here. Basically don't do whatever it was you did. And
yes, understanding the environment you are working in, both the OS and PHP
and whatever 3rd party stuff you hook PHP up to is the first step to
making stuff secure.
-Rasmus
On Tue, 3 Apr 2001, Marthe Kristiansen wrote:
>
Hey you guys!
I'm a new girl at this, and wondering on a question that might be simple for
you.
Yesturday I started to learn PHP and proud I showed it to a friend of mine,
what I had learned.
The first thing he did was check the safity of it and very easy he found the
list over all the users of t
Richard Lynch writes:
> function do_each($passed_array) {
>
> global ${$tmp_var_name};
Move this:
>
> if (substr($passed_array[0],-5) == "_post") {
> $tmp_var_name = substr($passed_array[0],0,-5);
> ${$tmp_var_name} = $passed_array[1];
down here.
> return(${$
G'Day,
You need to have an auto_incrementing field in your database. Then all lines
that are displayed need to be in the form of fieldname[] so that PHP builds
an array.
Then you need a hidden field to represent the unique record number to be
updated.
Here is some code that I use to print out a
Not test your code with GIF yet (I not have GIF support).
In your book they have a result picture of this code ?
I try this by change imagegif($image) to imagepng($image)
and return blank image with specify width.
--
-Tuna-
""Thalis A. Kalfigopoulos"" <[EMAIL PROTECTED]> wrote in message
[EMAI
Okay, with all that code, I can answer your question.
The problem here is that you only have on form field with a date. Therefore
it should not be an array.
You also have only one photono, so it too should not be an array.
When the loop iterates to create the query, there is only a value for the
Hiya i've got a script that basically draws values from a db and will display them, as
i have multiple records in there and want to display them all i'm using a
while ( ($myrow = mysql_fetch_array($result) ) ) statement this is all good as far as
it will display them all how ever when i to be
can anyone help me in making a webpage (php) that shows the results of a
MySQL database search?
the search must be made using a form...
thank you very much
Joao Monteiro
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mai
Ok so i've got a nice little game site and some folks want to start hosting their
websites on my machine. I let a few here and a couple there and now my machine has
more folks on it doing more things than I've got a handle on. Yes I did a bad thing.
Most of them are there because of the PHP an
jon Mon Apr 2 20:33:58 2001 EDT
Modified files:
/php4/pear/DB pgsql.php
Log:
Style and whitespace.
Index: php4/pear/DB/pgsql.php
diff -u php4/pear/DB/pgsql.php:1.35 php4/pear/DB/pgsql.php:1.36
--- php4/pear/DB/pgsql.php:1.35 Mon Apr 2 20:27:46 20
""WK"" <[EMAIL PROTECTED]> wrote in message
9abfvp$v4$[EMAIL PROTECTED]">news:9abfvp$v4$[EMAIL PROTECTED]...
> $fp2=fopen ("userdata","r")or die("unable to open file ($userdata)");
> $fp2 is getting a value 1 or 0
>
> if ($fp2=fopen ("userdata","r") ) {
> lock file
> write some stuff
unlock file
$fp2=fopen ("userdata","r")or die("unable to open file ($userdata)");
$fp2 is getting a value 1 or 0
if ($fp2=fopen ("userdata","r") ) {
lock file
write some stuff
}
else {
echo ("file would not open");
}
wk
""Richard Kurth"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMA
jon Mon Apr 2 20:27:46 2001 EDT
Modified files:
/php4/pear/DB pgsql.php
Log:
Make the 'protocol' DSN element optional.
Index: php4/pear/DB/pgsql.php
diff -u php4/pear/DB/pgsql.php:1.34 php4/pear/DB/pgsql.php:1.35
--- php4/pear/DB/pgsql.php:1.34 We
my solution was actually kinda simple if you think about it...
make a symbolic link. It sure would have been nice if Zeev would just
release a new .tarball liek v2.21 that fixes this little annoyance. It
seemed that no matter how often I changed the makefile in mod_auth_apache,
it still reverted b
I ran into this problem last week. I finally punted. My configuration
is: RH7, Apache 1.3.19, MySQL 3.23.36, mod_auth_mysql 2.20. The strange
thing is that I did not have any problems with RH6.0, Apache1.3.12, MySQL
3.22.x, and mod_auth_mysql 2.20.
If you run into a fix, please copy me as
jon Mon Apr 2 20:12:49 2001 EDT
Modified files:
/php4/pear PEAR.php.in
Log:
Cleaner (and probably safer) condition handling.
Index: php4/pear/PEAR.php.in
diff -u php4/pear/PEAR.php.in:1.17 php4/pear/PEAR.php.in:1.18
--- php4/pear/PEAR.php.in:1.17 Thu
Daevid,
connection script snipped (looked fine)
> $dsn="DSN=OpenLink"; // this is a valid DSN set up in the above odbc.ini
> //$conn_id = odbc_connect("DSN=OpenLink;UID=daevid;PWD=secret","","");
> ?>
> --
>
> [OpenLink]
> Driver = /usr/local/openlink/lib/oplodbc.
I'd check where "class.FastTemplate.php" is located in relation to the
current file you are running. Fully qualify the path for the "include"
statement.
Also, what are the permissions on this file? Are they readable by the apache
user?
> -Original Message-
> From: E K L [mailto:[EMAIL P
"E K L" <[EMAIL PROTECTED]> wrote:
> $tpl = new FastTemplate("../usr/local/apache/htdocs/toplevel.tpl");
According to the error, the path above is incorrect. Looking at it, my
guess is that the path might really be:
"/usr/local/apache/htdocs/toplevel.tpl"
--
Steve Werby
President, Befriend Int
In a message dated 03/04/2001 03:52:47 GMT Daylight Time,
[EMAIL PROTECTED] writes:
<< include "class.FastTemplate.php";
>>
Just for a start, I didn`t notice anything else in the code...
include ("class.FastTemplate.php");
Ade
--
PHP General Mailing List (http://www.php.net/)
To unsubscri
Hi Experts,
It seems to me that, the topic is not attractive or challenging that makes
nobody come to problem. But I really hope those experts or experiance ppl
can give me ur hands. Please Help!
I'm planning to build a template but failed to do so
Here is the code:
define(array("topleve
I've tried this with both PHP4.0.4 and PHP4.0.4pl1 as a module (it's for a
daily script eventually).
[root=pts/1]7:29pm@content:{/www/html/private/TattooShop}>
./odbc-test2.phtml
#!/bin/php -q
Segmentation fault
the relevant part of phpinfo(); is below, so I'm assuming that I finally got
odbc co
This is best done with a LEFT JOIN. Please read up the manual about it.
- Original Message -
From: "Maxim Maletsky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "'PHP General List. (E-mail)'"
<[EMAIL PROTECTED]>
Sent: Tuesday, April 03, 2001 9:41
Subject: SQL : multiple SELECT and missin
"Maxim Maletsky" <[EMAIL PROTECTED]> wrote:
> As you can see, the main data is in 'accounts', the 'addresses.ID' is
UNIQUE
> and corresponds to 'accounts.ID'. The fact is that not every account has
an
> address registered with it.
> FROM
> accounts,
> addresses
You're doing a straight join. You
hello,
does anyone know if set_nonblock() works, what paramaters it takes and
what it returns?
there is only one mention of it in the manual under accept_connect, and
I can not seem to set the socket to non block??
also has anybody successfully written a way to time out a read with the
new
I think many users are confusing about PHP4 session.
I thought this info might be useful for someone.
There are 3 ways to start PHP4 session. (as far as I know)
1) Using php.ini: "session.auto_start = 1" to automatically start session for
any request.
2) Using session_start(): Explicitly start P
I am using the newest ver of PHP and newest ver of apache on win98
just installed new php and apache yesterday set php up as a module
> Don't know. Code looks good, what version of PHP are you using? Module or
> cgi? What version of windows? These are the things the PHP/Zend guys
> probably nee
Hello Guys,
I have a (very simple?) SQL question. I'm more then sure the answer to it is
whether "just do this..." or "It's impossible man, how could you even get
that into your mind..."
I have this database design: (it's more complex of course, but you get an
idea)
Table 'account
Ok,
Here is the code I am using to insert values from a form into a mysql
database...
(Given to me by Lindsay Adams,, thank you!)
This is just a phantom form and database, there are several things you
could look at
right off the bat and ask "Why is this fool doing this"
Don't bother I already aske
It seems PHP used to allow "+" for string concatenation according to php.ini
warn_plus_overloading = off ; my php.ini entry
If you turn on this warring, you may see warning for that.
I guess PHP is doing this
$str = "a";
$str++;
as
$str = "a";
$str = $str + $str; // $str now stores "aa"
PHP
See manual reference on fopen() and fsockopen()
Fopen() can take http://... Or ftp://... As filenames. Therefore, you can do
an ftp login and upload and download files from a remote server, or use
http:// and read files from a server.
On 4/2/01 4:27 PM, "Richard Lynch" <[EMAIL PROTECTED]> wrote
Try these:
http://www.uklinux.net/
http://www.any.za.net/
http://hosting.datablocks.net/free/
AndrewH
- Original Message -
From: "Frank K" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 03, 2001 9:41 AM
Subject: [PHP] Hosting for FREE??
Hi,
I am just learning PH
Did you perhaps download PHP3 DLL's and try to use them with PHP4 or vice
versa?
That will not work.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Ori
Check the database at:
http://hosts.php.net/
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: "Frank K" <[EMAIL PROTECTED]>
N
make install should have copied libphp3.so from the libs directory (inside
the PHP source directory) into the modules directory which lives inside the
Apache directory.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Read php.ini
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Patrick Dunford <[EMAIL PROTECTED]>
Newsgroups: php.general
Sen
Those quotes in the php.ini file matter.
sendmail_path = "/usr/sbin/sendmail -t -i"
Without the quotes, everything after the space is ignored.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: h
Wild Guess:
Your OS has a limited number of files that can be opened at any one time.
Perhaps during heavy activity, you are hitting that limit.
I believe "root" can set something somewhere to increase this limit.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like M
$query = "select blah, blah blah where 1=1 ";
if ($institution){
$query .= " and institution like '%$institution%' ";
}
if ($name){
$query .= " and name like '%$name%' ";
}
.
.
.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e
I think you want strip_tags($fp, "");
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: "David Balatero" <[EMAIL PROTECTED]>
N
> configure: warning: You will need bison if you want to regenerate the PHP
> parsers.
> checking for gcc... no
> checking for cc... no
> configure: error: no acceptable cc found in $PATH
cc and gcc are C compilers.
PHP is written in C.
You need to have a cc compiler, preferably the Gnu CC Comp
> It look like that PHP can't set the environment variable or put in the
> environment variable. The script I wrote down is
>
> putenv("LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH");
> putenv("ODBCINSTINI=/usr/local/bin/odbcinst.ini");
> putenv("ODBCINI=/usr/local/bin/odbc.ini");
>
>
>
> function do_each($passed_array) {
>
> global ${$tmp_var_name};
Move this:
>
> if (substr($passed_array[0],-5) == "_post") {
> $tmp_var_name = substr($passed_array[0],0,-5);
> ${$tmp_var_name} = $passed_array[1];
down here.
> return(${$tmp_var_name});
>
Works for me...
Keep in mind that not all OSes use \n as linefeed, so the data you have may
not be what you think it is...
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/v
Perhaps http://php.net/FAQ.php#4.4 is the answer.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: "Pinwang Chao" <[EMAIL PRO
> I'm loading a set of txt files into a DB. The first 7 lines of each file
> are useless to me...
> I want some way I can always jump those 7 lines... I tought of doing a
> little function like jumpfirstsevenrows(array), but then I'd have to pass
> the whole array as parameter and that can get rea
Check out http://php.net/fopen and PHP's FTP support.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: <[EMAIL PROTECTED]>
Ne
> Now i get a error window saying: "Document contained no data"
That usually means PHP crashed.
Check your web-server error logs.
Also, try adding some debug output before each statement to pinpoint the
crash line.
> --code-
>
> $noaa = "http://weather.noaa.gov/cgi-bin
Why does system() - or any of its cousins, I've tried them all: exec(),
passthru(), backtick operator, etc - doesn't output anything when running
on a Win2k/IIS5 machine?
I ran the exact same script on a WinME/Apache, and the output was perfect
. Christian Deche
Why does one variable gets registered and the other don't (the order
doesn't alter anything.. I've tried)...
$script_total_time=(float)$total_time;
session_register("script_total_time");
$step_times_array[$step]=$total_time;
$step_times=serialize($step_times_array);
//echo "step_times=\"$step_t
cox Mon Apr 2 17:23:46 2001 EDT
Modified files:
/php4/pear/DB odbc.php sybase.php
Log:
odbc.php
- spaces & idents
- new temporary fetchInto()
- removed extra checks in connect()
Note:
in fetchRow this line looks very strange (isn't 3 params
Hi,
I am just learning PHP (I was a ASP developer but I switched over) and I need a
host that is free and lets me use PHP4 and MySQL? Does anyone know of such a host? If
you do please tell me!
Thanks,
-Frank
Just a suggestion, but it seems like it would be helpful if there were
a --make-cgi or some other flag that I could use so that when I compile
PHP4, it generates me both the Apache module and also the stand alone cgi.
I use both frequently, PHP4 for the web interface things, and then also the
cgi
Don't know. Code looks good, what version of PHP are you using? Module or
cgi? What version of windows? These are the things the PHP/Zend guys
probably need to know.
On 4/2/01 4:59 PM, "Richard Kurth" <[EMAIL PROTECTED]> wrote:
> What is causing this error
>
>
> Warning: 1 is not a valid File
$count = 0;
while (($myrow = mysql_fetch_array($result))&&($count<20)) {
do stuff
$count++;
}
Sig for a Day
Stephan Ahonen, ICQ 491101
"That's very funny Scotty, now beam down my clothes!"
Come back tomorrow for a different sig!
Backspace a single "s" to reply by email
--
PHP General Mailing
On Monday, April 2, 2001, at 05:53 PM, Mike King wrote:
>
>
> Michael Stearne wrote:
>>
>> get the application running in it as soon as possible.
>>
>> Maybe, but that's what version 2.0 is for!
>>
>>
>> Again that can come over time, get it to PHP first and then make it run
>> better,
>
> So yo
What is causing this error
Warning: 1 is not a valid File-Handle resource in
c:/httpd/htdocs/autosetup/auto/createaccount.php on line 88
This is the cod in question
$tab = chr(9); // define tabulator
if(file_exists("userdata")) {
$fp2=fopen ("userdata","r")or die("unable to open file ($userdat
Need to see your code for inserting data.
But I think first, you should be naming your fields with empty[]s
Ie.
Etc
That way, php will build an array out of the variables, and it will ONLY
contain values, if values were submitted..
Then you build your insert query by looping through the array
Dimonekene Ditutala wrote:
> Hi all,
>
> I am facing dificulties to make PHP work with Apache on
> Windows. I have installed Apache 1.3.19, PHP_401pl_Win32
> and as indicated I put the following lines in the configuration of Apache
>
> # And for PHP 4.x, use:
> #
> ScriptAlias /php/ "C:/php/"
Hi all,
I am facing dificulties to make PHP work with Apache on
Windows. I have installed Apache 1.3.19, PHP_401pl_Win32
and as indicated I put the following lines in the configuration of Apache
# And for PHP 4.x, use:
#
ScriptAlias /php/ "C:/php/"
AddType application/x-httpd-php .php
AddType a
The imlib2 extension does a very nice job of this.
On Mon, 2 Apr 2001, Joseph Bannon wrote:
> Can PHP change the size of an image (gif or jpg)?
>
> J
>
>
> Say I'm Hot! - Post Your Picture!
> http://www.sayimhot.com
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mai
Hello,
I don't relly get this... can sonmeone try and explain.
I have a mysql database and phtml form.
I can insert information intodatabase from the form, no problem.
UNTIL
I have a few items I want to insert multiples of ie DATE, DESCRIPTION
My table is...
photoid
photono
photodesc
photodate
wez Mon Apr 2 16:14:00 2001 EDT
Modified files:
/php4/ext/openssl openssl.c
Log:
changed the flags parameters to be a bitfield + constants (I don't know what
I was thinking!). Added a couple of extra parameters so that the equivalent
functionality of t
Can PHP change the size of an image (gif or jpg)?
J
Say I'm Hot! - Post Your Picture!
http://www.sayimhot.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-m
Looking into Database Abstraction, and I was recommended to Metabase. I
have looked over it, and found that I like it. However, I was looking to
gain further insight as to other people using Metabase, and their
experiences with it, good, bad, problems, no problems, etc.
Thank you
Jason Lotito
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Lindsay Adams) wrote:
> Two ways:
> Do it in PHP
> add a counter and test for it at the end of the while loop
> if ==20 then break;
>
> Easier, do it in your query:
> tack LIMIT 20 on the end of your query, and you will only get the
> -Original Message-
> From: Bob Stone [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 02, 2001 3:54 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] How to limit a WHILE statement?
>
>
> Dear PHP Helpers,
>
> What is your recommendation on limiting a while
> statement so that it only itera
Two ways:
Do it in PHP
add a counter and test for it at the end of the while loop
if ==20 then break;
Easier, do it in your query:
tack LIMIT 20 on the end of your query, and you will only get the first
20 hits from your database.
On 4/2/01 3:54 PM, "Bob Stone" <[EMAIL PROTECTED]>
Limit it in your query statement i.e.
SELECT * FROM whatever LIMIT 1,20
Jerry Lake- [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com
-Original Message-
From: Bob Stone [mailto:[EMAIL PROTECTED]]
Sent:
Probably a more efficient way to do this is to put a LIMIT qualifier on your
query (see the MySQL docs). Then you won't retrieve rows you are not going
to use anyway.
Kirk
> -Original Message-
> From: Bob Stone [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 02, 2001 4:54 PM
> To: [EMAI
Daevid,
You shouldn't need iodbc.h, just odbc.h - until I can compare what is each
SDK distribution, just create a symbolic link of iodbc.h pointing to odbc.h
udbcext.h is in our iODBC SDK - you should have that. Here is the linux
glibc2.1.1 version: http://www.openlinksw.com/software/open40/l3k
Dear PHP Helpers,
What is your recommendation on limiting a while
statement so that it only iterates a maximum of 20
times?
Here is the code snippet:
$result = mysql_query($sql, $db);
while ($myrow = mysql_fetch_array($result)) {
printf("Name: %s
%s %s %s\n", $myrow["salutation"],
$my
Okay, don't ask me how, but for whatever reason, this "partially worked":
"./configure --with-openlink=/usr/local/openlink/odbcsdk --with-mysql=/usr/l
ocal --with-apache=../apache"
however, now I get a different error:
In file included from internal_functions.c:38:
/usr/src/WT_Apache_Setup/php/
Hello!
After confering with the this group earlier I got some hints on where to
find som tutorials on sessions. But I am still confused about some things.
Have I under stood it right:
#session.php
#END session.php
And then I include the session.php in all the files I need to use session
in
Thank you!!!
That fixed it.
Best Regards,
Yev
--- Bill Rausch <[EMAIL PROTECTED]> wrote:
> I think your script (where you have the print_r() call) has to copy
> or move
> the file to a permanent location as Apache and/or PHP discards it
> once your
> script exits.
>
> ---
> Bill Rausch, Softw
Hello everyone,
I'm looking for a guestbook script that lets you moderate the new
entries, before they are posted.
Do you know any?
PHP or Perl.
Please let me know.
__John Monfort_
_+---+_
P E P I E D E S I G N S
Josh,
Thanks, but still no luck.. Same problems
Yev
--- Josh <[EMAIL PROTECTED]> wrote:
> Change upload_max_filesize in php.ini to 2048000 (which is 2 megs).
> PHP
> does not understand 2M.
>
> Josh
>
> -Original Message-
> From: Yev [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 0
And, to get you started (and maybe done in no time flat) in your port, check
out this!
http://freshmeat.net/projects/asp2php/
No, didn't write, but I used it on a small web app once. Worked like a
charm. Your mileage may vary, depending on complexity.
But as long as you back up all your code, w
Just set it to 10, and same thing..
in my php.ini file it's set to 2M
upload_max_filesize = 2M
still clueless,
Yev
--- Phillip Bow <[EMAIL PROTECTED]> wrote:
> I suspect there is a limit on the MAX_FILE_SIZE. You might want to
> check
> the RFC, but I suspect you should set the value t
I suspect there is a limit on the MAX_FILE_SIZE. You might want to check
the RFC, but I suspect you should set the value to be 2gb or less(I think
that is the limit).
--
phill
"Yev" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> OK, here's my problem
> I wrot
php-general Digest 2 Apr 2001 21:41:59 - Issue 604
Topics (messages 46584 through 46687):
Page Counter
46584 by: Wen Ni
46602 by: Jason Lotito
Re: Max file size of 2 bytes exceeded
46585 by: Christian Reiniger
Re: is this syntax correct?
46586 by: Christian
OK, here's my problem
I wrote a simple upload script:
File:
I purposely specified MAX_FILE_SIZE to be big since I heard it causes
problems if it's too small: ie files get rejected no matter what.
If I input any file, the $HTTP_POST_FILES shows the proper stuff, but
the file doesn't exis
1 - 100 of 230 matches
Mail list logo