From: Jackson Linux [mailto:[EMAIL PROTECTED]
Sent: 8. marts 2005 04:23
First of all, echo the output to see if You get, what Tou expect in a debug
situation:
if (!empty($where)) {
echo
ul;
$article = mysql_fetch_assoc($result);
} else {
while ($article = mysql_fetch_assoc($result)) {
sir,
iam new to php i'll explain my problem .if u could help i'll be very
thankful...
in my mysql database i have two tables i.e., table1 and table2.
i have an array of result from one query select feild1 from table1
i have to use this result in another query.
select field2 from table 2
Leif Gregory wrote:
Hello Marek,
Sunday, March 6, 2005, 7:08:24 PM, you wrote:
I don't see where that tells me where the include folder would be.
MK If you know how the files are layed out in your application, you do.
No... You missed the point of this whole thread which was explained in
point 1
Hi
I have always felt for reasons for cleanliness and clarity, it is
better to have the validation and insert / update statements in a
seperate file rather than have it in the same script.
Case 1
--
//file:form.php
if $_POST
then validate
Insert or update on success
else
if
Hello Steve,
I tried this on my own servers and after replacing OUR FTP SERVER
with $ftp_server it works perfectly, all ASCII files get uploaded the
way they should with the correct filenames.
Do you get any errors? (add error_reporting(E_ALL); above the login
vars to show them all)
--
PHP
Hi,
MySQL is capable of doing very complex queries. You could boil down
your query into just one single line:
'SELECT * FROM table1, table2 WHERE table2.field2 = table1.field1'
A good starting point would be the MySQL manual.
I would also strongly recommend you to take a look at the PHP manual
On Mon, 07 Mar 2005 19:19:24 -0600, Greg Dotts
[EMAIL PROTECTED] wrote:
Sure enough Kirk! That was it. Seems strange that you can set a
name/value pair on the form tag, but they aren't used. Guess they
were just kidding ;-)
The name attribute is used in javascript, for example when you are
Thanks, Kim! Still having difficulties though..
On 8 Mar 2005, at 03:29, Kim Madsen wrote:
From: Jackson Linux [mailto:[EMAIL PROTECTED]
Sent: 8. marts 2005 04:23
First of all, echo the output to see if You get, what Tou expect in a
debug situation:
if (!empty($where)) {
echo
ul;
*This message was transferred with a trial version of CommuniGate(tm) Pro*
It works now. Thanks Jason.
I had never realized that once $_SESSION is set, and if you are not going to
modify it, the session could be closed. It does not seem a good programming
practice, thou.
On Tuesday 08 March
K Karthik wrote:
sir,
iam new to php i'll explain my problem .if u could help i'll be very
thankful...
in my mysql database i have two tables i.e., table1 and table2.
i have an array of result from one query select feild1 from table1
i have to use this result in another query.
select
Hello Vinayakam,
Tuesday, March 8, 2005, 4:11:43 AM, you wrote:
V However in the second case, in case of an error, displaying the
V data becomes an issue.
V Any recommended ways for server side validation
I usually do the updates in the same file unless there are a lot of
different things
Hello Jochem,
Tuesday, March 8, 2005, 3:30:19 AM, you wrote:
J link rel=stylesheet type=text/css title=Site CSS
href=includes/site.css /
J I'm pretty sure the url is ./includes/site.css i.e. the include
J subdir of the dir in which the html file that includes the link tag
J is in. if you move
The way I do it is to have display, edit, validation and save all in
the same file. I have an op variable that tracks whether the
operation is an edit or reedit (reuse submitted data) because of
validation failure. Another variable would track if it's a new entry
(blank fields) or editing an
Hi,
This is quite a very basic question, but i think the code following my
signature should work.
Instead, i get a
Warning: Cannot modify header information - headers already sent by
(output started at /home/vhosts/dte/cv/register_action.php:10) in
/home/vhosts/dte/cv/register_action.php on
Mrio Gamito wrote:
Hi,
This is quite a very basic question, but i think the code following my
signature should work.
Instead, i get a
Warning: Cannot modify header information - headers already sent by
(output started at /home/vhosts/dte/cv/register_action.php:10) in
Hello Mário,
Tuesday, March 8, 2005, 8:18:34 AM, you wrote:
M How can i solve this ?
M Any help would be apreciated.
Because you're outputting javascript to the browser before doing the
redirection. You can't output *anything* to the browser before a
redirect.
M echo
M script
Mario,
From the PHP Manual:
Remember that header() must be called before any actual output is sent, either
by normal HTML tags, blank lines in a file, or from PHP. It is a very common
error to read code with include(), or require(), functions, or another file
access function, and have spaces
Mário Gamito wrote:
Hi,
This is quite a very basic question, but i think the code following my
signature should work.
Instead, i get a
Warning: Cannot modify header information - headers already sent by
(output started at /home/vhosts/dte/cv/register_action.php:10) in
I sure I'm not the only one on this list that reads php-internals
after reading the thread entitled:
I'm wondering if anyone here has _ever_ used the script tags
to enclose php code? e.g.:
script language=php
echo testing 123;
/script
or if many were even aware of the possibility?
IMHO it rather
On Tue, 2005-03-08 at 10:55, Jochem Maas wrote:
I sure I'm not the only one on this list that reads php-internals
after reading the thread entitled:
I'm wondering if anyone here has _ever_ used the script tags
to enclose php code? e.g.:
script language=php
echo testing 123;
Robert Cummings wrote:
On Tue, 2005-03-08 at 10:55, Jochem Maas wrote:
I sure I'm not the only one on this list that reads php-internals
after reading the thread entitled:
I'm wondering if anyone here has _ever_ used the script tags
to enclose php code? e.g.:
script language=php
echo testing 123;
Jochem Maas wrote:
I sure I'm not the only one on this list that reads php-internals
after reading the thread entitled:
I'm wondering if anyone here has _ever_ used the script tags
to enclose php code? e.g.:
script language=php
echo testing 123;
/script
Only in talks/presentations,
On Tue, 2005-03-08 at 11:08, M. Sokolewicz wrote:
Robert Cummings wrote:
On Tue, 2005-03-08 at 10:55, Jochem Maas wrote:
I sure I'm not the only one on this list that reads php-internals
after reading the thread entitled:
I'm wondering if anyone here has _ever_ used the script
Franklin van de Meent wrote:
Hello Steve,
I tried this on my own servers and after replacing OUR FTP SERVER
with $ftp_server it works perfectly, all ASCII files get uploaded the
way they should with the correct filenames.
Do you get any errors? (add error_reporting(E_ALL); above the
Hi
Does any one have a good (fairly advanced) PHP book which has detailed
explanations of LDAP and FTP?
I allready have two o'rielly books (Programming PHP PHP Cookbook) and
these do cover the topics briefly, but if any one has read a book with more
intensive explanations, please recommend...
Ross Hulford wrote:
Is it possible to call a named anchor from within a php script?? I need my
page to go to the point in the page where the form is and bypass all the
rubbish.
If you are giving the user a link to that page, you can simply give them
the named anchor in the link:
echo a
Franklin van de Meent wrote:
On Mon, 07 Mar 2005 19:19:24 -0600, Greg Dotts
[EMAIL PROTECTED] wrote:
Sure enough Kirk! That was it. Seems strange that you can set a
name/value pair on the form tag, but they aren't used. Guess they
were just kidding ;-)
The name attribute is used in javascript,
$len = filesize($file_path);
header(Content-Type: application/force-download);
header(Content-Type: application/octet-stream);
Call me crazy, but sending TWO Content-type: headers seems just plain
WRONG to me.
application/octet-stream will force a
Leif Gregory mailto:[EMAIL PROTECTED]
on Tuesday, March 08, 2005 6:55 AM said:
link rel=stylesheet type=text/css title=Site CSS
href=/includes/site.css /
and I've never placed a period at the beginning.
But you raise an interesting point. Is the server telling the browser
where the
On 8 Mar 2005, at 11:40, Richard Lynch wrote:
1. $content = substr($article['content'], 0 200); // get first
200
chars is choking, and I've looked in docs and can't understand why.
I get
Parse error: parse error, unexpected T_LNUMBER in
/usr/www/users/domain/dynamic/templates/substr.htm
Jochem Maas mailto:[EMAIL PROTECTED]
on Sunday, March 06, 2005 5:24 AM said:
that said you still don't want this file or this string to get into
the hands of evilhaxors - best to keep this file (one with the
encrypted pwd in it) outside of the docroot.
Why encode it at all then?
If
Jared Williams wrote:
Does anyone have any idea why this is happening and how I can avoid
this double request?
Try checking the UserAgent for each request.
http://support.microsoft.com/default.aspx?scid=kb;en-us;293792
Anybody notice how they wrote that article as if we're all supposed to
I have a list in php where the user can select 1 or more (rooms book in a
bb). The following code is part of the form.
select name=rooms size=7 multiple
option value=Single StandardSingle
Standard/option
option value=Single
f00l wrote:
Come here to get help, not abuse
for what its worth:
sql dbase with fields
usernamepassiptime
if duplicate username/passowrd then check that IPs match and dont do
anything
if IPs match then kick both users off / disable username/password
go figure the code out
f00l wrote:
I was wondering if anyone has come across (or even using) a shoutbox that
doesnt require an sql dbase. While it isnt hard to access one id prefer to
write everything to a file (wanting to learn how to write, append etc
files)
Think about this very carefully:
Will you *EVER* have
(If I could only get off ezmlm's suspicious user list. I think there
isn't much I can do, it's my ISP rejecting some PHP list postings.)
Don't feel too bad.
Every few weeks, I get an automated email from ezmlm warning me that
php-general messages have bounced, and I might be removed from the
Richard Lynch mailto:[EMAIL PROTECTED]
on Tuesday, March 08, 2005 9:54 AM said:
Don't feel too bad.
Every few weeks, I get an automated email from ezmlm warning me that
php-general messages have bounced, and I might be removed from the
list if it keeps up.
Same here.
--
PHP General
James Williams wrote:
rory walsh wrote:
Can anyone tell me if there is a difference between double quotes and
single quotes? Cheers,
Rory.
What's up Rory... actually there *is* a difference. Double quotes are
parsed by the php engine, meaning it goes through and finds variables
and stuff
Jochem Maas wrote:
I sure I'm not the only one on this list that reads php-internals
after reading the thread entitled:
I'm wondering if anyone here has _ever_ used the script tags
to enclose php code? e.g.:
script language=php
echo testing 123;
/script
or if many were even aware of the
Kevin wrote:
Right now I'm working on a script that would calculate dates from one
calendar to another. The normal calendar we use and a newly invented one.
[shudder]
There are already WAY too many calendar systems.
Inventing a new one is probably not such a good plan...
Why re-invent the
Josh Whiting wrote:
SO, does anyone have some code that uses MySQL to replace PHP's native
session storage that also correctly handles this concurrency problem?
Create your MySQL session tables using ENGINE=innoDB (in older MySQL, use
TYPE=innoDB)
http://mysql.com can tell you lots more about
Does this affect _execution performance_ of the scripts at all i.e. are
they precompiled/interpreted and cached without comments or interpreted
on every execution?
The comments get stripped out on each execution of the whole script,
unless you are using a caching system such as Zend Cache.
Ross Hulford wrote:
I have a list in php where the user can select 1 or more (rooms book in a
bb). The following code is part of the form.
select name=rooms size=7 multiple
option value=Single StandardSingle
Standard/option
Chris wrote:
I'm requesting some remote files to cache on my own server and performing
a get_headers() first to find out the file type, since I don't always know
what it is. I've discovered some timeout problems with the remote server
sometimes and my own script would end up with a fatal
M. Sokolewicz wrote:
JoShQuNe wrote:
Hi, i wanna ask if anybody knows how to calculate the total process
time. I guess there exists a
function to perform but i dont know which one it is. I mean if u c any
PHP Nuke site, it says this
page is produced in seconds. I made some codes it
Sorry if this posts twice. Thanks everyone for the help.
The missing comma was the problem with the display; the missing
specification of the column at the start of the sql query was the
problem with getting the data from the column.
Again, thanks all who replied for the fast and excellent
Dave Carrera wrote:
Hi List,
I have a table like the diag below:
ID Name Pos
1 jig 1
2 pig 2
3 dig 3
4 fig 4
What i am trying to do is upon click to change pos 1 to pos 2 and pos 2
to pos 1so that i can manage the position i show my list.
Can someone throw me some nuggets
Jackson Linux wrote:
On 8 Mar 2005, at 11:40, Richard Lynch wrote:
1. $content = substr($article['content'], 0 200); // get first
200
chars is choking, and I've looked in docs and can't understand why.
I get
Parse error: parse error, unexpected T_LNUMBER in
Ross Hulford wrote:
I have a list in php where the user can select 1 or more (rooms book in a
bb). The following code is part of the form.
select name=rooms size=7 multiple
http://php.net/manual/en/faq.html.php#faq.html.select-multiple
You may want to switch to CHECKBOX since many users have
First off - do you have global variables turned on? If not then you need to
collect the data from the $_POST variable.
Also - when you use a multiple select form field the values come across in
an array.
So you would need to access the data using something like this:
$i=0;
while($rooms[$i]) {
Your right -- it is wrong. I cut and pasted that directly from a File
Sharing app I wrote for our company intranet.
I wrote that script a very long time ago (1999 or 2000). I think that,
originally, the first one didn't work and I added the second.
I forgot to remove it, maybe I though it
(I had posted this in the Zend php-general mailing
list
but it did not show up in php.net, so here it is
again)
Greetings,
I am not sure whether this is a bug or a 'feature'
(new to PHP). I have a cookie that is set by our
password server (NON-PHP) for our domain, whose value
is base64 encoded
Pink Floyd wrote:
(I had posted this in the Zend php-general mailing
list
but it did not show up in php.net, so here it is
again)
Greetings,
I am not sure whether this is a bug or a 'feature'
(new to PHP). I have a cookie that is set by our
password server (NON-PHP) for our domain, whose
Say I place the results of a set of database queries
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Say I create a matches array from a set of SQL queries With each query,
an entry is added to my matches array. If the name already exists, its value
gets incremented. How can I sort the array based on the highest number of
hits?
What is the sort method? Say this is the array:
array('lma-bg51' =
Richard Lynch wrote:
M. Sokolewicz wrote:
JoShQuNe wrote:
Hi, i wanna ask if anybody knows how to calculate the total process
time. I guess there exists a
function to perform but i dont know which one it is. I mean if u c any
PHP Nuke site, it says this
page is produced in seconds. I made
Brian A. Anderson wrote:
Say I create a matches array from a set of SQL queries With each query,
an entry is added to my matches array. If the name already exists, its value
gets incremented. How can I sort the array based on the highest number of
hits?
What is the sort method? Say this is the
Hello Brian,
Everytime you're looking for an specific function to do some job, look
at the php functions list.
In this case:
http://ar2.php.net/manual/es/ref.array.php
These are the most common ones i use:
array_reverse
usort
uksort
uasort
and obviusly
sort
Hope this helps,
Guillermo Rauch
Say I create a matches array from a set of SQL queries with each
query,
an entry is added to my matches array. If the name already exists, its
value
gets incremented. How can I sort the array based on the highest number
of
hits?
What is the sort method? Say this is the array:
On Tue, 2005-03-08 at 18:24, Brian A. Anderson wrote:
Say I create a matches array from a set of SQL queries With each query,
an entry is added to my matches array. If the name already exists, its value
gets incremented. How can I sort the array based on the highest number of
hits?
What is
RTFM
arsort()
Ok, so I use asort(), and I don't get the result I wanted. Instead I get the
script telling me my foreach loop is wrong on the second test round, as if
it did something other than simply sort the array. It seems that I can't
access the array now?
$nar = array('lma-bg51' = 1,
have you looked at the various array sorting functions available?
http://www.php.net/manual/en/ref.array.php
Brian A. Anderson wrote:
Say I create a matches array from a set of SQL queries With each query,
an entry is added to my matches array. If the name already exists, its value
gets
Right! That fixed it. I was doing it like this:
$nar = asort($nar);
which gave me a boolean result
When I should have done it like this:
asort($nar) ;
reset($nar);
I didn't understand the return of an asort was boolean and not the processed
array itself.
Thanks,
-Brian
- Original
Robert Cummings wrote:
On Tue, 2005-03-08 at 10:55, Jochem Maas wrote:
I sure I'm not the only one on this list that reads php-internals
after reading the thread entitled:
I'm wondering if anyone here has _ever_ used the script tags
to enclose php code? e.g.:
script language=php
echo testing 123;
Hi,
I'm trying to integrate some JavaScript functions in PHP, but so far, no
good :(
I want to have a js.php file that has the JavaScript functions i want to
use. This file, albeit its extension, has no PHP code or even tag.
It's just like this:
js.php
--
script language=JavaScript
function
On Tue, 2005-03-08 at 19:27, Marek Kilimajer wrote:
Robert Cummings wrote:
On Tue, 2005-03-08 at 10:55, Jochem Maas wrote:
I sure I'm not the only one on this list that reads php-internals
after reading the thread entitled:
I'm wondering if anyone here has _ever_ used the script
On Wed, Mar 09, 2005 at 12:27:39AM +, M?rio Gamito wrote:
Hi,
I'm trying to integrate some JavaScript functions in PHP, but so far, no
good :(
I want to have a js.php file that has the JavaScript functions i want to
use. This file, albeit its extension, has no PHP code or even tag.
Mário Gamito wrote:
Hi,
I'm trying to integrate some JavaScript functions in PHP, but so far, no
good :(
...
How can i do this ?
How to tell PHP, that def(word) is a JS function in js.php file ?
I've tried include ('js.php'), etc., but got no results :(
Any help would be apreciated.
Hello.
Is there a records limit when browsing (a sql SELECT) in PHP from a MySQL
table?
I´m browsing a table with PHP from MySQL, and something is wrong, if the
table has more than 5047 records, the browse appears blank. Additionaly, if
make the browse in a child window (target=_blank), the
Mário Gamito mailto:[EMAIL PROTECTED]
on Tuesday, March 08, 2005 4:28 PM said:
I'm trying to integrate some JavaScript functions in PHP, but so far,
no good :(
[snip]
Now... i want to call this JavaScript function from the regular PHP
files. In particular, before the HTML code.
Like
On Tue, Mar 08, 2005 at 10:38:28AM -0800, Richard Lynch wrote:
Josh Whiting wrote:
SO, does anyone have some code that uses MySQL to replace PHP's native
session storage that also correctly handles this concurrency problem?
Create your MySQL session tables using ENGINE=innoDB (in older
Richard,
Thanks for clearing that up. I figured the value was
transformed by the parser, but I did not know that it
could be urlencode. I will test it tomorrow and
confirm that it is so, I tried to look in the manual
but did not find it anywhere.
Thanks a lot.
MK
--- Richard Lynch [EMAIL
Hello List
I've looked at array_multisort( ), but it doesn't seem like the right
function. Here's an example of my array, it's a listing of CD reviews:
$cds=array(array(Lowest of the Low, 20050105,9,Toronto), array(Heavy
Blinkers,20041020,6,Chicago), array(Apple,Fiona,20050308,5,Seattle));
If I
On Tue, 2005-03-08 at 22:56, Gabino Travassos wrote:
Hello List
I've looked at array_multisort( ), but it doesn't seem like the right
function. Here's an example of my array, it's a listing of CD reviews:
$cds=array(array(Lowest of the Low, 20050105,9,Toronto), array(Heavy
Hey!
Anybody know of a software catalog (or cart preferably) that is free?
A site i am working for sells software, now they want to have a cart feature
so people can put the packages in a cart and get discounts etc if they
purchase more than 1 product...they are using 2checkout for processing.
I
What's up Ryan, I do believe that the cart software you choose should
for the most part be independent upon what exactly your selling. There
are a few big shopping cart solutions that work for selling anything and
I'm sure there are features and / or plugins that will allow you to do
Hi, all,
I have three tables; 'cv', the main table, 'jobcat', a definition table
and 'cvjobcats', an intersection table (for more detail see PS below).
I'd like to join this all together to be able to make a headline
consisting of the plain English description of the job category
followed by
hello sir,
i am so happy about the immiediate response for any of my question.
i would like to create a static html page.
using cronjob regenerate it every 24 hours.
how can i do it using php.
thanks,
kkarthik
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
This is the P H P list not the S Q L list. I mean really, your question
isn't even worded as a PHP question. Maybe if you add a few echos or a
variable here and there someone here might let it pass. But just asking
a plain old SQL question is not the purpose of the P H P list.
Cheers,
Rob.
On
The following should be pretty selfexplanatory
* 0 * * * /usr/local/bin/php /usr/local/www/cron/sync.php
--
Lars B. Jensen, Internet Architect
CareerCross Japan
Japan's premier online career resource for english speaking professionals
http://www.careercross.com
- Original Message -
From:
I'm trying to use pam_auth for a script. It loads into php but it's not
authenticating the users. I'm using the correct password and username.
This is a example of how I'm using the function:
pam_auth($_POST[uname], $_POST[passwd], $error)
Any ideas? Thanks in advance
--
PHP General
Jackson Linux wrote:
Hi, all,
I have three tables; 'cv', the main table, 'jobcat', a definition table
and 'cvjobcats', an intersection table (for more detail see PS below).
I'd like to join this all together to be able to make a headline
consisting of the plain English description of the job
Gabino Travassos wrote:
Hello List
I've looked at array_multisort( ), but it doesn't seem like the right
function. Here's an example of my array, it's a listing of CD reviews:
$cds=array(array(Lowest of the Low, 20050105,9,Toronto),
array(Heavy Blinkers,20041020,6,Chicago),
83 matches
Mail list logo