Try putting your HTML below setting the cookie.
I'm getting this error:
Warning: Cannot add header information - headers already sent by (output
started at /home/tiempodemaria/main.php:3) in /home/tiempodemaria/main.php
on line 11
With this code in main.php:
html
?
GodFoca mailto:[EMAIL PROTECTED]
on Friday, May 21, 2004 1:29 PM said:
Warning: Cannot add header information - headers already sent by
(output started at /home/tiempodemaria/main.php:3) in
/home/tiempodemaria/main.php on line 11
[snip]
Does anybody knows what's going on? I don't
All headers have to be sent before any output is sent to the browser.
Chris W. Parker [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
GodFoca mailto:[EMAIL PROTECTED]
on Friday, May 21, 2004 1:29 PM said:
Warning: Cannot add header information - headers already sent by
(output
I'm trying to compose a general purpose text snip expression to extract
a text segment from a string.
Should this work for all reasonable cases? It seems to work for several
test strings.
$start= str1;
$end= str2;
preg_match (|$start (.*) ? $end |i, $contents, $text);
$segment= $text[1];
From: Al [EMAIL PROTECTED]
I'm trying to compose a general purpose text snip expression to extract
a text segment from a string.
Should this work for all reasonable cases? It seems to work for several
test strings.
$start= str1;
$end= str2;
preg_match (|$start (.*) ? $end |i,
If I have multiple instances that match the pattern, but only want the
first one, which is the best way to handle it?
Putting the U flag seems to work, but I don't understand the full
implications of using it here.
preg_match(|$start(.*?)$end |Ui, $contents, $text);
Alternatively, I could use
Al mailto:[EMAIL PROTECTED]
on Thursday, May 20, 2004 12:51 PM said:
If I have multiple instances that match the pattern, but only want the
first one, which is the best way to handle it?
reread the last sentence in John's post.
John W. Holmes wrote:
From: Al [EMAIL PROTECTED]
[snip]
Dave G wrote:
If that text is not properly validated and escaped, you could
be open to SQL Injection attacks
I'm less clear on what properly escaped means. I thought
escaping was a matter of putting slashes before special characters, so
that their presence doesn't confuse the SQL queries
Vans Hallden wrote:
Please try to endure my ignorance. I'm new to PHP4 and out to perform
just a single isolated task with it. :)
I would like to form some simple statistics from specific column data in
a mysql database and display those stats on a webpage.
I have collected a few demographics
Here is one way:
(probably not the best)
I was able to get almost everything working with your help. Thanks!!! :)
average ages for male/female respondents (database column 'age')
SELECT AVG(age) FROM tablename WHERE sex = 'male';
SELECT AVG(age) FROM tablename WHERE sex = 'female';
I have one
Vans Hallden wrote:
Here is one way:
(probably not the best)
I was able to get almost everything working with your help. Thanks!!! :)
average ages for male/female respondents (database column 'age')
SELECT AVG(age) FROM tablename WHERE sex = 'male';
SELECT AVG(age) FROM tablename WHERE sex =
Vans Hallden [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Here is one way:
(probably not the best)
I was able to get almost everything working with your help. Thanks!!! :)
average ages for male/female respondents (database column 'age')
SELECT AVG(age) FROM tablename WHERE
John,
If that text is not properly validated and escaped, you could
be open to SQL Injection attacks
...
you could be open to Cross Site Scripting attacks
After reading your response, I looked the web to determine what
you meant by properly validated and escaped.
From what I
Please try to endure my ignorance. I'm new to PHP4 and out to perform
just a single isolated task with it. :)
I would like to form some simple statistics from specific column data
in a mysql database and display those stats on a webpage.
I have collected a few demographics from certain
[snip]
I would very much appreciate if someone could point me to eg. code
examples helping me to accomplish this task.
[/snip]
Google and http://www.php.net/ are going to be your best friends, this
mailingin list is also very helpful but search those 2 places before you
ask.
I am assuming that
PHP Listers,
I was just reading about Hardened PHP, and the debate between
those who thinks it's a good idea and those who think it will allow for
lazy coding. I'm firmly of the belief that any new security feature is a
good thing. If for no other reason that it will help me stay secure
From: Dave G [EMAIL PROTECTED]
I almost exclusively use PHP
to draw from data held within a MySQL database on the same server. I do
not allow users to upload files. I suppose the most that I allow users
to do is input some information like email addresses, user names and
passwords. But it
Ma Siva Kumar a écrit :
For example: One of the repeatedly discussed
question in the list is Best PHP editor.
(...)
try this link :
http://phpeditors.linuxbackup.co.uk/
(contributed by Christophe Chisogne).
The link has now moved (http redirect)
http://www.thelinuxconsultancy.co.uk/phpeditors/
===
This message is for the benefit of new
subscribers and those new to PHP. Please
feel free to add more points and send to the
list.
===
1. If you have any queries/problems about PHP
try http://www.php.net/manual/en
===
This message is for the benefit of new
subscribers and those new to PHP. Please
feel free to add more points and send to the
list.
===
1. If you have any queries/problems about PHP
try http://www.php.net/manual/en
===
This message is for the benefit of new
subscribers and those new to PHP. Please
feel free to add more points and send to the
list.
===
1. If you have any queries/problems about PHP
try http://www.php.net/manual/en
===
This message is for the benefit of new
subscribers and those new to PHP. Please
feel free to add more points and send to the
list.
===
1. If you have any queries/problems about PHP
try http://www.php.net/manual/en
===
This message is for the benefit of new
subscribers and those new to PHP. Please
feel free to add more points and send to the
list.
===
1. If you have any queries/problems about PHP
try http://www.php.net/manual/en
===
This message is for the benefit of new
subscribers and those new to PHP. Please
feel free to add more points and send to the
list.
===
1. If you have any queries/problems about PHP
try http://www.php.net/manual/en
Looking at the code below, what exactly is happening with the $name=$value
part? I looked in the PHP online documentation and I can't find that
operator. What is it doing exactly and what is it called?
foreach ($some_array as $name=$value)
{
... some code ...
}
Thanks alot!
--
PHP General
[snip]
foreach ($some_array as $name=$value)
{
... some code ...
}
[/snip]
http://www.php.net/foreach
will give you a good explanation.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks for the page. That was helpful. Just to make sure, is that
operator only typically used then with foreach loops and arrays?
Matt Matijevich [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[snip]
foreach ($some_array as $name=$value)
{
... some code ...
}
[/snip]
arrays :-)
you are defining arrays like:
$x = array ( 'a' = 'Apple' , 'b' = 'Banana' , ... );
-- red
Gabe wrote:
Thanks for the page. That was helpful. Just to make sure, is that
operator only typically used then with foreach loops and arrays?
Matt Matijevich [EMAIL PROTECTED] wrote in
Ma Siva Kumar said:
10. Ask smart questions
http://catb.org/~esr/faqs/smart-questions.html
Though I've been using newsgroups since '95 and though I'd read this page
before, it's helpful to review it. I can see a few mistakes I'd made as
recently as a few months ago on another list :-)
This
Chris de Vidal mailto:[EMAIL PROTECTED]
on Thursday, April 01, 2004 7:20 AM said:
Though I've been using newsgroups since '95 and though I'd read this
page before, it's helpful to review it. I can see a few mistakes I'd
made as recently as a few months ago on another list :-)
This
===
This message is for the benefit of new
subscribers and those new to PHP. Please
feel free to add more points and send to the
list.
===
1. If you have any queries/problems about PHP
try http://www.php.net/manual/en
===
This message is for the benefit of new
subscribers and those new to PHP. Please
feel free to add more points and send to the
list.
===
1. If you have any queries/problems about PHP
try
http://www.php.net/manual/en
first.
Hi,
I've written the piece of code below and I do not get any output out of the 2
dimensional array. I do not see what's wrong. Must be something obvious I guess.
?php
$monthname[NL][1] = Januari;
$monthname[NL][2] = Februari;
$monthname[NL][3] = Maart;
$monthname[NL][4] = April;
Sorry, I am new and could not supply the correct search strings on search
sites to answer by question.
I am trying to construct an array with key-value from a resultSet which will
be used often within the page or between pages.
Which looks like this:
$optionBox=select used_1, rub from
On Monday 29 March 2004 03:27, [EMAIL PROTECTED] wrote:
I am trying to construct an array with key-value from a resultSet which
will be used often within the page or between pages.
Which looks like this:
$optionBox=select used_1, rub from rub_table order by rub asc;
===
This message is for the benefit of new
subscribers and those new to PHP. Please
feel free to add more points and send to the
list.
===
1. If you have any queries/problems about PHP
try http://www.php.net/manual/en
===
This message is for the benefit of new
subscribers and those new to PHP. Please
feel free to add more points and send to the
list.
===
1. If you have any queries/problems about PHP
try http://www.php.net/manual/en
===
This message is for the benefit of new
subscribers and those new to PHP. Please
feel free to add more points and send to the
list.
===
1. If you have any queries/problems about PHP
try http://www.php.net/manual/en
Hi
I am a newbie in PHP and MySQL. I have developed a web databse using PHP and
MySQL. However , I need more info on these product. Any sites you can
recommend.
Amimu
CAFCA Limited
Zimbabwe
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to
On Fri, 2004-03-05 at 06:55, Amimu Austin wrote:
Hi
I am a newbie in PHP and MySQL. I have developed a web databse using PHP and
MySQL. However , I need more info on these product. Any sites you can
recommend.
php.net
mysql.com
--
Brian V Bonini [EMAIL PROTECTED]
--
PHP General Mailing
===
This message is for the benefit of new
subscribers and those new to PHP. Please
feel free to add more points and send to the
list.
===
1. If you have any queries/problems about PHP
try http://www.php.net/manual/en
hi -
i don't know much about php, but somehow i managed to install a simple
php-guestbook on my website:
http://www.maanzand.be/guestbookk/readbook.php
unfortunately, i cannot get it to work
everything seems fine, but i can't manage to write to the guestbook.txt
file
(permissions are
could it be that this is an old script that requires register_globals to be
turned ON or so?
if you can read Dutch, read http://www.phpfreakz.nl/artikelen.php?aid=88
At 12:25 24-2-04, you wrote:
hi -
i don't know much about php, but somehow i managed to install a simple
php-guestbook on my
===
This message is for the benefit of new
subscribers and those new to PHP. Please
feel free to add more points and send to the
list.
===
1. If you have any queries/problems about PHP
try http://www.php.net/manual/en
PHP Newbie,
I'm trying to find out if a username already appears in my database.
I have two users in my table, one is colin so when I enter a username of
colin I would normally under ColdFusion anyway just to something like:
cfif $query_qUsername.RecordCount GT 0
User already exists do something
Hi,
Do a select query with a COUNT() in it
if you dont understand that read the php manual for accessing the database
and lookup the mysql COUNT
-Ryan
On 2/16/2004 1:35:42 AM, PETCOL ([EMAIL PROTECTED]) wrote:
PHP Newbie,
I'm trying to find out if a username already appears in my
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] says...
PHP Newbie,
I'm trying to find out if a username already appears in my database.
I have two users in my table, one is colin so when I enter a username of
colin I would normally under ColdFusion anyway just to something like:
cfif
no result till you do mysql_query
Read these please:
http://www.php.net/mysql
http://www.php.net/mysql_query
Petcol wrote:
PHP Newbie,
I'm trying to find out if a username already appears in my database.
I have two users in my table, one is colin so when I enter a username of
colin I would normally
://www.php.net/mysql
http://www.php.net/mysql_query
Petcol wrote:
PHP Newbie,
I'm trying to find out if a username already appears in my database.
I have two users in my table, one is colin so when I enter a username of
colin I would normally under ColdFusion anyway just to something like
);
$query_qUsername is a String
mysql_num_rows want a result resource as argument You have no result
till you do mysql_query
Read these please: http://www.php.net/mysql
http://www.php.net/mysql_query
Petcol wrote:
PHP Newbie,
I'm trying to find out if a username already appears in my
database.
I
a result resource as argument You have no result
till you do mysql_query
Read these please: http://www.php.net/mysql
http://www.php.net/mysql_query
Petcol wrote:
PHP Newbie,
I'm trying to find out if a username already appears in my
database.
I have two users in my
PETCOL wrote:
PHP Newbie,
I'm trying to find out if a username already appears in my database.
I have two users in my table, one is colin so when I enter a username of
colin I would normally under ColdFusion anyway just to something like:
cfif $query_qUsername.RecordCount GT 0
User already
===
This message is for the benefit of new subscribers
and those new to PHP. Please feel free to add
more points and send to the list.
===
1. If you have any queries/problems about PHP try
http://www.php.net/manual/en
Hey Everyone,
I have a couple of questions I'd like to ask:
1.) Are there built in libraries to connect to DB2?
Nothings clear from the documentation I've read. I see
that there's libraries for Oracle, Informix, MySQL.
2.) If there is a DB2 library(support or whatever its
called, someone
On Thursday 12 February 2004 01:03, James Marcinek wrote:
I have a couple of questions I'd like to ask:
1.) Are there built in libraries to connect to DB2?
Nothings clear from the documentation I've read. I see
that there's libraries for Oracle, Informix, MySQL.
Apparently so, ask google.
Jason Wong wrote:
snip
Anything else anyone could tell me would be great!
Depends on what you want to know. Almost every problem that you will come
across will be covered in:
- the php manual
- the list archives
- google
Don't forget about Mr. Holmes. I betcha he's got php scribbled all
Hi all,
I want to install apache and php in a redhat box version 8 and want apache
to load php. So how i shld proceed. Just downloading the rpms of both
and installing will help or I have to down load the source and compile it.
Pls help
Thank u
Geetha
--
PHP General Mailing List
Hi,
Defaults installations of RH 8 usually have both apache and php. You can
upgrade by
rpm -Uvh rpmname.rpm
but what you should really be doing is heading off to php.net and
reading their installation guide. and googling for php newby articles.
Mrs. Geeta Thanu wrote:
Hi all,
I want to
This might help as well: http://www.php.net/manual/en/installation.php
Jordan S. Jones
Mrs. Geeta Thanu wrote:
Hi all,
I want to install apache and php in a redhat box version 8 and want apache
to load php. So how i shld proceed. Just downloading the rpms of both
and installing will help or I
Jonno Agnew wrote:
I wondered if I can ask you two follow-up questions?
On-list, yes. Off-list, yes, at consultancy rates.
(1) On Useractive's PHP environment, if ($guessnumb) { seems to work
fine, but on my PHP 4.3.4 environment it doesn't. Is there some setting
I need to tweak, and if so
===
This message is for the benefit of new subscribers
and those new to PHP. Please feel free to add
more points and send to the list.
===
1. If you have any queries/problems about PHP try
http://www.php.net/manual/en
Hello.
OK, so I'm new and I'm doing this Useractive/O'Reilly Learn PHP course
and they want us to make a guessing game where you have to guess a
number between 0-100 and get 10 tries; each time you're told if your
guess was higher, or lower, or just right.
I've hit a wall. Can you help me
Jonno Agnew wrote:
if ($guessnumb) {
Try $_GET['guessnumb'] or $_POST['guessnumb'] if the form is posted.
--
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
name=guessnumb value=?php echo $guessnumb; ?
/
change one of these to something else and that should do the trick
HTH
Martin
-Original Message-
From: Jonno Agnew [mailto:[EMAIL PROTECTED]
Sent: Friday, 23 January 2004 7:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP] newbie issues
Hola, PHP folk!
I am slowly getting a handle on what php/mysql can do. I have a mysql
database that I can display in a web browswer with php. That part is
working just fine, but it was the easiest part, of course.
My goal is to create an order form sort of thing were a certain quantity
of
Hello Everyone,
I'm new to this so forgive my ignorance. I'm trying to use php with MySQL
as a database. I'm using apache 2.0 in addition to Mysql 4.1.
I created a simple page (using book to learn) and when I try to go to a
simple php script I recieve the following error:
Call to undefined
Hello James,
Tuesday, January 13, 2004, 3:37:17 PM, you wrote:
JM The book I'm learning from had some simple examples pages that I created
JM early on and they work; however this is the first attempt at trying to use
JM php to connect.
Post your code (if it's from a book I'm guessing it isn't
It appears as if you don't have MySQL support compiled in with your PHP
build. If you installed it from source you will want to recompile PHP
with the --with-mysql option. I have never installed PHP from RPM
though so if you installed it that way, perhaps someone else in the
group can provide
Hi all,
I was wondering how you get the year, month, and day from a timestamp.
(mySQL timestamp, Eg: 20040113130137) What PHP function(s) do I use? An
example would be great
Cheers,
David
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
I was wondering how you get the year, month, and day from a timestamp.
(mySQL timestamp, Eg: 20040113130137) What PHP function(s) do I use? An
example would be great
I *believe* you can use strtotime();
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Tuesday 13 January 2004 13:57, DL wrote:
Hi all,
I was wondering how you get the year, month, and day from a
timestamp. (mySQL timestamp, Eg: 20040113130137) What PHP
function(s) do I use? An example would be great
Cheers,
David
http://www.php.net/manual/en/function.strtotime.php
===
This message is for the benefit of new subscribers
and those new to PHP. Please feel free to add
more points and send to the list.
===
1. If you have any queries/problems about PHP try
http://www.php.net/manual/en
===
This message is for the benefit of new subscribers
and those new to PHP. Please feel free to add
more points and send to the list.
===
1. If you have any queries/problems about PHP try
http://www.php.net/manual/en
Hi all,
I'm quite a newbie ot php/mysql, so my question might be oversimple
(though i tried for hours to understand..)
I'm making an addressbook, as a try out, to see how it al works. All is
great actually, but only the sorting of the addresses seems complicated
for me..
I have a databse
[snip]
$result = mysql_query(
SELECT id, name, surname, address FROM
addresses);
This scripts works, but.. my desire is now to be able to sort the
output, wich is generated by the 'while' loop, for instance on 'name',
or on 'surname' .
[/snip]
Do it in
Hello Bart,
Tuesday, January 6, 2004, 12:40:38 PM, you wrote:
BK This scripts works, but.. my desire is now to be able to sort the
BK output, wich is generated by the 'while' loop, for instance on 'name',
BK or on 'surname' . sort(), ksort()? I couldn't understand the
BK explanations i found
===
This message is for the benefit of new subscribers
and those new to PHP. Please feel free to add
more points and send to the list.
===
1. If you have any queries/problems about PHP try
http://www.php.net/manual/en
Hi,
Hopefully an administrator could append this to the welcome message
that's sent to new subscribers.
Ma Siva Kumar wrote:
On Monday 29 Dec 2003 10:24 am, you wrote:
Hi,
This compilation of your is really excellent.
Over the last few months i have noticed that
many posters are cleary
Raditha Dissanayake mailto:[EMAIL PROTECTED]
on Sunday, December 28, 2003 8:55 PM said:
This compilation of your is really excellent. Over the last few
months i have noticed that many posters are cleary sending messages
without having read your newby guide. IMHO whenever that happens all
;
while($row= mysql_fetch_array($dbdo)){
...
Chris
-Original Message-
From: tony [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 27, 2003 4:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] newbie mysql and php
hello
I'm new with php just learning and i have just a problem
4:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] newbie mysql and php
hello
I'm new with php just learning and i have just a problem with the
following
code
$dbconnect = mysql_connect(localhost, prog_tony,PASSWORD);
mysql_select_db(prog_dealer, $dbconnect);
$stop = 0;
$counter = 1;
while
===
This message is for the benefit of new subscribers
and those new to PHP. Please feel free to add
more points and send to the list.
===
1. If you have any queries/problems about PHP try
http://www.php.net/manual/en
Hi,
This compilation of your is really excellent. Over the last few months i
have noticed that many posters are cleary sending messages without
having read your newby guide. IMHO whenever that happens all of us on
this list should suggest that the user should read this message in the
archive
On Monday 29 Dec 2003 10:24 am, you wrote:
Hi,
This compilation of your is really excellent.
Over the last few months i have noticed that
many posters are cleary sending messages
without having read your newby guide. IMHO
whenever that happens all of us on this list
should suggest that
hello
I'm new with php just learning and i have just a problem with the following
code
$dbconnect = mysql_connect(localhost, prog_tony,PASSWORD);
mysql_select_db(prog_dealer, $dbconnect);
$stop = 0;
$counter = 1;
while(!$stop){
$query = SELECT name FROM category WHERE id = $counter;
On Sat, 2003-12-27 at 17:17, tony wrote:
hello
I'm new with php just learning and i have just a problem with the following
code
$dbconnect = mysql_connect(localhost, prog_tony,PASSWORD);
mysql_select_db(prog_dealer, $dbconnect);
$stop = 0;
$counter = 1;
while(!$stop){
$query =
===
This message is for the benefit of new subscribers
and those new to PHP. Please feel free to add
more points and send to the list.
===
1. If you have any queries/problems about PHP try
http://www.php.net/manual/en
I am simply trying to redirect users from one page to another. Yet when
I use this code I get the following error:
*Warning*: Cannot add header information - headers already sent by
(output started at
/usr/local/psa/home/vhosts/miningstocks.com/httpdocs/etc/php/login/admin/test.php:8)
in
Unless you're using an 'if' statement, the header redirect must be the first line of
the page, above any HTML markup.
Jim
www.websitemanagers.net
- Original Message -
From: Scott Taylor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, December 21, 2003 8:04 PM
Subject: [PHP
Scott Taylor wrote:
I am simply trying to redirect users from one page to another. Yet when
I use this code I get the following error:
*Warning*: Cannot add header information - headers already sent by
(output started at
On Monday, December 22, 2003, at 01:13 PM, Website Managers.net wrote:
Unless you're using an 'if' statement, the header redirect must be the
first line of the page, above any HTML markup.
That's not entirely accurate.
---Quoted from http://php.net/header ---
Remember that header() must be
===
This message is for the benefit of new subscribers
and those new to PHP. Please feel free to add
more points and send to the list.
===
1. If you have any queries/problems about PHP try
http://www.php.net/manual/en
===
This message is for the benefit of new subscribers
and those new to PHP. Please feel free to add
more points and send to the list.
===
1. If you have any queries/problems about PHP try
http://www.php.net/manual/en
===
This message is for the benefit of new subscribers
and those new to PHP. Please feel free to add
more points and send to the list.
===
1. If you have any queries/problems about PHP try
http://www.php.net/manual/en
===
This message is for the benefit of new subscribers
and those new to PHP. Please feel free to add
more points and send to the list.
===
1. If you have any queries/problems about PHP try
http://www.php.net/manual/en
Ma Siva Kumar mailto:[EMAIL PROTECTED]
on Tuesday, December 09, 2003 4:00 PM said:
4. Just put the following code into a file with a
.php extension and access it through your
webserver:
?php
phpinfo();
This will display tons of info if php is enabled,
or, it will ask you to
===
This message is for the benefit of new subscribers
and those new to PHP. Please feel free to add
more points and send to the list.
===
1. If you have any queries/problems about PHP try
http://www.php.net/manual/en
===
This message is for the benefit of new subscribers
and those new to PHP. Please feel free to add
more points and send to the list.
===
1. If you have any queries/problems about PHP try
http://www.php.net/manual/en
Here's what i have done. i have downloaded a very simple database manager
from www.hotscripts.com. It allows me to edit, delete and add new
information to the database. i have a couple of problems.
1. form field dont fill with all the data senback from the db to be edited,
as fars as i am
PAUL FERRIE wrote:
Here's what i have done. i have downloaded a very simple database manager
from www.hotscripts.com. It allows me to edit, delete and add new
information to the database. i have a couple of problems.
1. form field dont fill with all the data senback from the db to be edited,
801 - 900 of 1847 matches
Mail list logo