If the file is of a reasonable size (not hundreds of kilobytes), then you
can just slurp it all into an array and foreach through it:
$matched = 0;
$myfile = file('/usr/home/crud/myfile');
foreach ($myfile as $line)
{
$split_line = explode(':', $line);
if ($split_line[1] ==
What is the best/recommended method of saving form data into session
variables? Currently only have to deal with regular text input,
checkboxes and radio buttons (no multiple selects for now). Any sample
code someone could throw up on the list? I've only recently begun
working with sessions,
On Saturday 08 June 2002 14:39, Greg Macek wrote:
What is the best/recommended method of saving form data into session
variables? Currently only have to deal with regular text input,
checkboxes and radio buttons (no multiple selects for now). Any sample
code someone could throw up on the
Ok, I'll have to try that on my next project. Unfortunately these forms were
written by another developer and there too many variables to rename to make an
array and not enough time on the project :-) But for next time.
I've seen many examples of assigning values to session variables w/o
When you say serve the files through a script, I assume you mean
download.php force-feeds an MP3 (or whatever) to the browser.
Is this correct?
I read people have lots of problems with this...
Justin
on 08/06/02 4:08 PM, Jason Wong ([EMAIL PROTECTED]) wrote:
On Saturday 08 June 2002
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Chris Sechiatano declared
You have to code the PHPSESSID into your URL if your browser has cookies
disabled or else it won't work.
No. As I said, i have php compiled with --enable-trans-sid
- --
Nick Wilson //
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Greg Macek declared
Ok, I'll have to try that on my next project. Unfortunately these forms
were written by another developer and there too many variables to rename
How about something like this:
foreach($HTTP_POST_VARS as $key
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Nick Wilson declared
How about something like this:
foreach($HTTP_POST_VARS as $key = $val) {
$myFormData['$key']=$val;
}
Actually that may be a little redundent. You may well get away with:
$myFormData=$HTTP_POST_VARS;
-
On Sat, 8 Jun 2002, Justin French wrote:
When you say serve the files through a script, I assume you mean
download.php force-feeds an MP3 (or whatever) to the browser.
Is this correct?
I read people have lots of problems with this...
Only until they get it working (I should hope). We use
I'm looking for e-commerce example (PHP+MySQL) so I don't start from zero
and save some time.
Does somebody knows something about?
Thanks
Makis Savaidis
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
www.google.com / www.freshmeat.net
Kind Regards,
Chris Knipe
MegaLAN Corporate Networking Services
Tel: +27 21 854 7064
Cell: +27 72 434 7582
- Original Message -
From: savaidis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 08, 2002 5:59 AM
Subject: [PHP] e-commerce
try this link
http://www.devshed.com/Server_Side/PHP/Commerce
-Original Message-
From: savaidis [mailto:[EMAIL PROTECTED]]
Sent: June 7, 2002 11:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] e-commerce example
I'm looking for e-commerce example (PHP+MySQL) so
I don't start from zero
I have made a file wich start a session and set a session variable if user
and pass are verifyed.
Than I use the session variable to protect all other userfiles.
To run the file I enter:
http://myserver.com/start.php3?user=xpass=yy
What is the differans using SSL and enter the same
Is there anyway to get rid of this message:
Warning: Too many connections in xxx on line xx
line xx is a connection to a mysql database.
In PHP.ini I have:
[MySQL]
; Allow or prevent persistent links.
mysql.allow_persistent = On
; Maximum number of persistent links. -1 means no limit.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Dan Morris declared
Is there anyway to get rid of this message:
Warning: Too many connections in xxx on line xx
Can you show the code that connects?
- --
Nick Wilson // www.explodingnet.com
-BEGIN PGP SIGNATURE-
Timothy J. Luoma wrote:
Oh, I forgot to mention that it is a different way of indicating
that a favicon to be used, which is found in the HEAD of the HTML
document.
link rel=shortcut icon href=/favicon.ico /
This works in browsers other than IE, but I don't think that IE
supports this
Thank you for the feedback. Sablotron is running
fine now. Just had to do some modifications
with my *.xsl file.
Here is what I have going now with the
implementation:
http://213.84.71.105/
On Tue, Jun 04, 2002 at 10:57:45AM +1000, Tom Rogers wrote:
hi
I am using 4.2.1 and it works fine, I
My OS is XP Pro.
I installed my web folders in c:\web instead of c:\apache\htdocs
My php folder is: c:/php
In the httpd.conf:
DocumentRoot /web/myweb
ScriptAlias /php/ c:/php/
AddType application/x-httpd-php .php
Action application/x-httpd-php /php/php.exe
In my Php.ini:
include_path =
[0] would match the whole ip, I was hoping [1] and[2] would echo the next 2
found, but it doesn't
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am trying to store several results from an mysql_query into an int
I want to produce several lines into $result, so i can include $result
Into my email, or is there a better way to do this ?
$query = mysql_query(select * from $table);
$number = mysql_numrows($query) ;
$i = 0;
while ($i
I am trying to store several results from an mysql_query into an int I
want to produce several lines into $result, so i can include $result Into my
email, or is there a better way to do this ?
$query = mysql_query(select * from $table);
$number = mysql_numrows($query) ;
$i = 0;
while ($i
On Saturday 08 June 2002 22:36, Rob Packer wrote:
[0] would match the whole ip, I was hoping [1] and[2] would echo the next 2
found, but it doesn't
1) Could you not start a new thread each time? It makes it difficult for
people to help because your responses and their repsonses are all over
Nick Wilson wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Chris Sechiatano declared
You have to code the PHPSESSID into your URL if your browser has cookies
disabled or else it won't work.
No. As I said, i have php compiled with --enable-trans-sid
Php
On Saturday 08 June 2002 19:42, Bård Tommy Nilsen wrote:
I am trying to store several results from an mysql_query into an int I
want to produce several lines into $result, so i can include $result Into
my email, or is there a better way to do this ?
$query = mysql_query(select * from
oops, no coffee yet
Jason Wong [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Saturday 08 June 2002 22:36, Rob Packer wrote:
[0] would match the whole ip, I was hoping [1] and[2] would echo the
next 2
found, but it doesn't
1) Could you not start a new
I want to build my own poll(The ones availble from
sites such as hotscripts.com are not quite what I need)
Could any one tell me of a *good*
tutorial?
Particularly the number of questions would be
different between each poll not a fixed number.
JJ Harrison[EMAIL PROTECTED]www.tececo.com
Is it possible to read cookies from javascript
written by PHP and vice-versa?
Just out of curiousity
JJ Harrison[EMAIL PROTECTED]www.tececo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Did u notice and problems when you are accessing the mysql server using
mozilla ??
I am in a 1.53Mhz amd and the CPU usage goes to the max when use
phpmyadmin.. ??
while in IE everything is fine..
Did I missed any previews post ?
--
Sapilas/dev/pinkeye
php-general Digest 8 Jun 2002 14:10:08 - Issue 1393
Topics (messages 101231 through 101273):
Re: Form Variables
101231 by: Beeman
Not php related - php.net logo in Netscape 7?
101232 by: Leif K-Brooks
101233 by: Timothy J. Luoma
101234 by: Stuart Dallas
Is there another way to read the files from a directory?
I tried the following:
foreach (glob(*.txt) as $filename) {
echo $filename size . filesize($filename) . \n;
}
but get an error whether safe mode is on or off.
I'm just learning as you might guess.
--
Steve Mallett
Try...
?
//$dirname should contain the directory name including it's full path...
$handle=opendir($dirname);
while ($file = readdir($handle)){
echo($file is located in the $dirname directory);
}
?
HTH,
Dw.
Sqlcoders.com Dynamic data driven web solutions
- Original Message
On Saturday, June 8, 2002 at 3:23:01 PM, you wrote:
Is there another way to read the files from a directory?
http://www.php.net/readdir
--
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I notice that some webhosts offer the apache module and some the cgi.
On the surface, the cgi version appears to be a lot of extra hassle.
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am trying remove ^M characters (some kind of newline character) from an
HTML file. I've tried all sorts of ereg_replace and sed possibilities
but the
things just won't go away. Does anyone have a way of removing such
characters?
TIA
Mick
--
PHP General Mailing List
You could replace if by ASCII code (^M is actually a representation of ASCII
013, the CR character, thanks to
http://www.mindspring.com/~jc1/serial/Resources/ASCII.html for the ASCII
lookup table.).
This should fix it (untested)
?
$chrnumber = 13; //this is the ascii code for ^M
$nicestring =
Here's my problem:
I'm trying to make a simple publication of 30+ articles, using PHP but not
MySQL.
There are basically three components:
- a table of contents (contents.html)
- an article template (article.php)
- and then 30+ text files.
The idea I was going for was to make
Thanks for taking the time to answer. As I said, there is no problem
with the code in either OPT or in phpMyAdmin - there is a problem with
PHP and I was hoping someone on this list bounced into the same kind of
problem.
Bogdan
Edward Marczak wrote:
On 6/7/02 11:43 AM, Bogdan Stancescu
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Steven declared
# Is that enough?
?php include($auth.txt); ?
# I then assume this would result in it trying to include 'name.txt',
# but instead there is always a nasty error about the .txt part.
# I should probably ask, is
Hello Steven,
Saturday, June 08, 2002, 5:40:40 PM, you wrote:
S Here's my problem:
S I'm trying to make a simple publication of 30+ articles, using PHP but not
S MySQL.
S There are basically three components:
S - a table of contents (contents.html)
S - an article template
I want to make all fatal errors trigger an error file to be include, the
file to exit, and the error never t be displayed. Is there any way to
do this without access to php.ini?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
It's nothing to do with PHP. Raise your max_connections in your MySQL
configuration file...
---John Holmes...
-Original Message-
From: Dan Morris [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 08, 2002 4:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Warning: Too many connections in
I want to make all fatal errors trigger an error file to be include,
the file to exit, and the error never t be displayed. Is there any
way to do this without access to php.ini?
Implement your own error handler. There is a load of documentation in the
manual.
--
Dan Hardiker [[EMAIL
Jan grafström [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I have made a file wich start a session and set a session variable if user
and pass are verifyed.
Than I use the session variable to protect all other userfiles.
To run the file I enter:
Be warned that explode won't work as expected if any of your fields contain
colons, though it doesn't look like it'll be an issue in this sort of case.
Gaylen Fraley [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Use the explode() function based on the colon.
Thanks. I am trying, but it refuses to work. Can you help? My code is:
function error_handler ($code, $str) {
if(($errno == FATAL) (error_reporting() != 0)){
//include the error file
exit;
}
}
set_error_handler(error_handler);
//set_error_handler returns false. When I test it, the
On Sun, 9 Jun 2002, Michael Hall wrote:
I am trying remove ^M characters (some kind of newline character) from
an HTML file. I've tried all sorts of ereg_replace and sed possibilities
but the things just won't go away. Does anyone have a way of removing
such characters?
$str =
On Sat, 8 Jun 2002, Al wrote:
I notice that some webhosts offer the apache module and some the cgi.
On the surface, the cgi version appears to be a lot of extra hassle.
The Apache module runs faster and has smoother integration with the web
server.
The CGI version allows you to run in
Perl apparently also works very nice for this
open (FILE, filename):
open (NEWFILE, filename);
WHILE (FILE) {
chomp;
print NEWFILE $_
}
close (FILE);
close(NEWFILE);
this should take care of ^M
Kind Regards,
Chris Knipe
MegaLAN Corporate Networking Services
Tel: +27 21 854 7064
Cell: +27
The error message is coming from the connect line in:
function MOpen() {
global $db_address, $db_username, $db_password, $link;
$link = mysql_connect($db_address,$db_username,$db_password);
}
Nick Wilson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
-BEGIN
'chomp' removes the end-of-line character(s) from its input, which is
different from doing an EOL conversion (which is what the OP was after).
The result of the below perl would be to concatenate all lines together as
one.
miguel
On Sat, 8 Jun 2002, Chris Knipe wrote:
Perl apparently also
print NEWFILE $_ . \n;
Then :P
This isn't a perl list, it's off topic. Just thought it might help if I
added this to the pool Let's rather not go into a in depth discussion
about it... I'm no perl guru either.
Kind Regards,
Chris Knipe
MegaLAN Corporate Networking Services
Tel: +27 21
I'm looking for e-commerce example (PHP+MySQL) so I don't
start from zero and save some time.
You could try searching for php mysql commerce on any of the
following:
www.google.com
www.freshmeat.net
www.hotscripts.com
Where you'd probably find what you're looking for.
CYA, Dave
--
I posted this to the MySQL list as well, but haven't gotten an answer so
far. Just wonderin gif it may be a PHP problem I'm looking at. Anyway, this
is the text of the message I posted to MySQL, with a few edits:
I don't know if this is more of a PHP thing or a MySQL user issue that I'm
having
why not just run
tr -d \r htmlfile.htm
- Original Message -
From: Michael Hall [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Sunday, June 09, 2002 2:40 AM
Subject: [PHP] Removing ^M
I am trying remove ^M characters (some kind of newline character) from an
HTML
This is just a MySQL problem. You've got something messed up or set
incorrectly in your MySQL.user table.
In the MySQL database, look at the user table. SELECT * FROM user. Look
at the Host and User columns. If you want to connect as root from the
same machine, only, then there should be only
Im looking for ways to benchmark my script.
I read on O'Reilly that I could use PEAR, and I tried it a few weeks ago
when I was running php 4.1.2.
Today I upgraded to php 4.2.1 and when I try to include the benchmark
the script is unable to find the PEAR benchmark class.|
I get this when running that command:
tr: only one string may be given when deleting without squeezing repeats
I looked at the tr man pages and it didn't help much. I also tried using
'\r' and `\r` and just \r , but always get the same result.
Steve
At 11:07 PM 6/8/2002 +0200, you wrote:
Problem resolved!
I replaced ?php include($auth=name); ? with
?php include($_GET['auth']..txt); ? in article.php
Worked exactly as I was trying for.
Thanks for the help!
Best regards,
Steven
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Oops, typo:
?php include($auth=name); ? ...
is suppose to read ?php include($auth.txt); ?
Also for reference, the error was:
Warning: Failed opening '.txt' for inclusion (include_path='.;c:\php4\pear')
in c:\server\www\article.php on line 9
--
PHP General Mailing List (http://www.php.net/)
I have created the following htaccess file using rewrite rules for the
purpose of having search engine friendly files created from my dynamic
files.
RewriteEngine On
RewriteRule ^index-(.*),(.*)\.html$ index.php?section=$1page=$2
RewriteRule ^nav-(.*),(.*)\.html$ nav.php?section=$1page=$2
-
Original Message -From: "Nick Wilson" [EMAIL PROTECTED]To: [EMAIL PROTECTED]Sent: Sunday, June 09, 2002 12:15
AMSubject: Re: [PHP] Suggestions for getting started with poll
app.* and then [EMAIL PROTECTED]
declared I want to build my own poll(The ones availble from sites
such
php-general Digest 9 Jun 2002 02:12:14 - Issue 1394
Topics (messages 101274 through 101305):
Reading from a dir.
101274 by: Steven Mallett
101275 by: Sqlcoders.com Programming Dept
101276 by: Stuart Dallas
What are pros and cons of the Apache module verses cgi
I don't think tr expects to receive a filename on the command line. Try:
tr -d \r oldfile.html newfile.html
miguel
On Sat, 8 Jun 2002, Steve Buehler wrote:
I get this when running that command:
tr: only one string may be given when deleting without squeezing repeats
I looked at the
On Sat, 8 Jun 2002, Nicole Lallande wrote:
I have created the following htaccess file using rewrite rules for the
purpose of having search engine friendly files created from my dynamic
files.
RewriteEngine On
RewriteRule ^index-(.*),(.*)\.html$ index.php?section=$1page=$2
RewriteRule
I am in need of a function/script that will take a directory and search all
filenames, recursively down, for a given file. Can anyone point me to a
source? Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Are there alternatives to PHPMyAdmin available?
www.mysql.com/ is supposed to have one, no?
--
John Taylor-Johnston
-
- Université de Sherbrooke:
--
PHP General Mailing List (http://www.php.net/)
To
Hello,
I am having nothing but trouble with the date function. I want it to print
out a date like this: Saturday June 8, 2002 but as soon as I put spaces or
comma's in the string I get parse errors. I can get it to print
SaturdayJune082002 with ? echo date (lFdY); ? I have tried escaping with
\
? echo date (l., .F. .d., .Y); ?
Sunday, June 09, 2002
But I would use:
?php echo date (l., .F. .d., .Y); ?
Don't know why, but someone told me once it had something to do with versions.
John
Jeremy Bowen wrote:
I am having nothing but trouble with the date function. I want it to print
Absolutely. I've done it. Cookies are cookies.
What I don't like is that the cookie is not saved unitl after a submit.
In Javascript, I have JS code that will assign a value and save it to a cookie and
then recall the cookie value and document.write(myvalue), over and
over if I want, without
Pardon the probably stupid question but,
Is there a PHP function for listing number of columns in a mySQL table?
Thanks in advance
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com
Look in http://www.mysql.com/downloads/gui-mycc.html and download the
latest version of MyCC, which helped me to manage the DBs on the server.
I found a problem with the current version, but one of it's developers
told me to wait 'till next week when the new release is available.
The problem is
Any News ??
Moussa Dahadha wrote:
Hi, i know that this question was asked many times but i still
can't find any solution :-(
When i try to compile php
I alweys recive this error:
Making all in .
make[1]: Entering directory `/root/php-4.2.1'
/bin/sh
I added a comment to the FAQ:
http://www.php.net/manual/en/function.date.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
This a binary? I was hoping for a web-based (PHP, Perl, ASP, etc.) alternative - like
PHPMyAdmin - to analyse.
César l . aracena wrote:
Look in http://www.mysql.com/downloads/gui-mycc.html and download the
The problem is that you can't issue multiple SQL queries, but that will
be solved.
try
mysql_num_fields()
Hugh
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 08, 2002 9:54 PM
Subject: [PHP] PHP function for listing number of columns in table
Pardon the probably stupid question but,
Is there a PHP function for listing number
75 matches
Mail list logo