When the $_REQUEST['x'] is not 0 or '', it will be always correct condition
of your if. see the magic*.
-Original Message-
From: tedd [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 20, 2006 10:02 PM
To: Ross; php-general@lists.php.net
Subject: Re: [PHP] comparing a string
At 12:43 PM +010
Prathaban Mookiah wrote:
Micheal,
I ran into this problem too. A easy workaround is to right click and choose
'save as' which worked for me.
I wish that would work. The URL is along the lines of
For complete information on this you want to have a look at http://support.
microsoft.com/defau
Don wrote:
Hi,
I have a varchar field in a MySQL database that contains a line of text like
so:
"This is a line if text"
The double quotes are included in the database field.
I cannot seem to display it on my HTML page, it always shows as blank. I
have tried using both the stripslashes
Hi all,
I have 2 php page , whenever i click the submit in 1st page , the
$_SESSION['LIST_OF_DATA'] display nothing in the 2nd page.
If i do echo print_r($_SESSION['LIST_OF_DATA']) in first page , it
displayed the data correctly.
Anybody have any ideas why php session behaviour is like tha
IG wrote:
Hi all,
This may not be complex at all- maybe my head is just screwed up this
afternoon!
I am looping through arrays all at one time for the following-
$filter_subject
$filter_body
$filter_email
$filter_subject_like
$filter_body_like
$filter_email_like
Examples of the following co
Micheal,
I ran into this problem too. A easy workaround is to right click and choose
'save as' which worked for me.
For complete information on this you may want to have a look at http://
support.
microsoft.com/default.aspx/kb/279667
Cheers,
Prathap
-- Original Message ---
Fro
Micheal,
I ran into this problem too. A easy workaround is to right click and choose
'save as' which worked for me.
For complete information on this you want to have a look at http://support.
microsoft.com/default.aspx/kb/279667
Cheers,
Prathap
-- Original Message ---
From: Mi
Jonas:
I am not sure if I understood your problem correct. But the way I understood
it, you want the mail to be displayed as:
F-namn: J
L-namn: R
Birth: 12
Address: 34
Zip: 56
City: 78
Phone: 90
Mail: [EMAIL PROTECTED]
Desc: N
Hair: hair
Make: makeup
Am I correct? If that is the case, I guess y
Beauford wrote:
After my last email I searched around some more and found the following.
/Q: gd keeps saying it can't find png or jpeg support. I did install
libpng and libjpeg. What am I missing?/
/A: Be sure to do "make install-headers" for libpng and "make
install-lib" for libjpeg, in addit
I have a site that generates a file to be streamed down. The relevant
code is:
--
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: attachment; filename=$EXPORT_TIME.txt");
header("Content-disposition: attachment
(inline)
Adam Zey wrote:
Rafael wrote:
A single "=" it's an assignment, not a comparison; and though it
sometimes work, you shouldn't compare strings with "==", but using
string functions, such as strcmp()... or similar_text(), etc.
This is PHP, not C. Operators such as == support strin
Albert Padley wrote:
Thanks everyone. Always nice to know there is more than one direction
to go in.
A alternative to variable variables might use these:
http://us3.php.net/manual/en/function.compact.php
http://us3.php.net/manual/en/function.extract.php
'extract' looks like it might be
On Tue, 2006-06-20 at 19:19, Albert Padley wrote:
> Thanks everyone. Always nice to know there is more than one direction
> to go in.
>
> Albert
>
>
> On Jun 20, 2006, at 4:52 PM, Ray Hauge wrote:
>
> > On Tuesday 20 June 2006 15:28, Adam Zey wrote:
> >> Ray Hauge wrote:
> >>> On Tuesday 20 J
Thanks everyone. Always nice to know there is more than one direction
to go in.
Albert
On Jun 20, 2006, at 4:52 PM, Ray Hauge wrote:
On Tuesday 20 June 2006 15:28, Adam Zey wrote:
Ray Hauge wrote:
On Tuesday 20 June 2006 15:14, Albert Padley wrote:
I have a regular for loop - for($i=1; $
On Tuesday 20 June 2006 15:28, Adam Zey wrote:
> Ray Hauge wrote:
> > On Tuesday 20 June 2006 15:14, Albert Padley wrote:
> >> I have a regular for loop - for($i=1; $i<100; $i++)
> >>
> >> Within the loop I need to create variables named:
> >>
> >> $p1name;
> >> $p2name;
> >> $p3name;
> >> etc.
> >
Are you sure that you don't want an array? Arrays are normally much
better for this type of thing.
That said,
${"p{$i}name"} = 'foo';
David
Albert Padley wrote:
> I have a regular for loop - for($i=1; $i<100; $i++)
>
> Within the loop I need to create variables named:
>
> $p1name;
> $p2name;
Ray Hauge wrote:
On Tuesday 20 June 2006 15:14, Albert Padley wrote:
I have a regular for loop - for($i=1; $i<100; $i++)
Within the loop I need to create variables named:
$p1name;
$p2name;
$p3name;
etc.
The integer portion of each variable name needs to be the value of $i.
I can't seem to ge
for($i=1; $i<100; $i++) {
${'p'.$i.'name'} = 'whatever';
}
- jeff
On 20-Jun-06, at 6:14 PM, Albert Padley wrote:
I have a regular for loop - for($i=1; $i<100; $i++)
Within the loop I need to create variables named:
$p1name;
$p2name;
$p3name;
etc.
The integer portion of each variable
On Tuesday 20 June 2006 15:14, Albert Padley wrote:
> I have a regular for loop - for($i=1; $i<100; $i++)
>
> Within the loop I need to create variables named:
>
> $p1name;
> $p2name;
> $p3name;
> etc.
>
> The integer portion of each variable name needs to be the value of $i.
>
> I can't seem to ge
I have a regular for loop - for($i=1; $i<100; $i++)
Within the loop I need to create variables named:
$p1name;
$p2name;
$p3name;
etc.
The integer portion of each variable name needs to be the value of $i.
I can't seem to get my syntax correct?
Can someone point me in the right direction?
Tha
I've done the following code bellow for an e-mail form. But it handles the
HTML tags as text. Is there anyway to get the HTML tags processed to form
the mail?
'.
'L-name: '.$lastname.''.
'Birth: '.$date_of_birth.''.
'Address: '.$post_address.''.
'Zip
Don wrote:
I have a varchar field in a MySQL database that contains a line of text like
so:
"This is a line if text"
The double quotes are included in the database field.
I cannot seem to display it on my HTML page, it always shows as blank. I
have tried using both the stripslashes() and
Hi,
I have a varchar field in a MySQL database that contains a line of text like
so:
"This is a line if text"
The double quotes are included in the database field.
I cannot seem to display it on my HTML page, it always shows as blank. I
have tried using both the stripslashes() and the html
John Nichel wrote:
> Jochem Maas wrote:
...
>>
>> exactly. btw: var_dump() should be showing exactly where the white
>> space is e.g.:
>>
>>
>> code:
>> > $s1 = "Company Director "; $s2 = "Company Director"; var_dump($s1, $s2);
>>
>> output:
>> string(17) "Company Director "
>> string(16) "Compan
No. I was looking for a way to do it.
mysql_insert_id did the job for me. I can't figure out how I missed out on
this function. I browsed through the manual for 2 hours yesterday looking for
such a function.
Anway, thank you Jay and Chris. And you too John, for your attention.
Cheers,
Prathap
On 6/20/06, Adam Zey <[EMAIL PROTECTED]> wrote:
Shutting down Apache would do the trick ;) But if you're in a shared
hosting environment that may not be possible.
Yeah, don't have full control over the server in this case.
As for sessions, it depends how you track them. You can't kill all PH
Shutting down Apache would do the trick ;) But if you're in a shared
hosting environment that may not be possible.
As for sessions, it depends how you track them. You can't kill all PHP
sessions in one go, but you could have your web app nuke the sessions of
users after they come back after ma
Thanks Adam,
What you say makes good sense to me. Is there some method to run a
script that kills all active sessions on a host? It could become part
of the maintenance script I suppose:
1) Kill all active sessions
2) Put up generic maintenance screen
3) Deny further login attempts
- Ben
On 6/
Ben Liu wrote:
Hello All,
I'm not sure this is strictly a PHP related question or perhaps a
server admin question as well. What do you do when you are trying to
shutdown a web application for maintenance (like a membership or
registration-required system)? I understand that you can temporarily
u
Hi Jon,
Thanks for the response. What would these solutions mean in regards to
users who are active at the moment that the .htaccess file is added?
Would it be wise to force some kind of logout, destruction of open
sessions, etc. I guess there is no simple, graceful way to allow users
to complete
Assuming you're using a web server that supports htaccess files, you
could easily just pop in a .htaccess file that denies access to
everything. You could even add a PHP ini directive like:
php_value auto_prepend_file "maintenance.php"
where maintenance.php could contain something like:
Down
Hello All,
I'm not sure this is strictly a PHP related question or perhaps a
server admin question as well. What do you do when you are trying to
shutdown a web application for maintenance (like a membership or
registration-required system)? I understand that you can temporarily
upload or activat
Andrei wrote:
Since you query all enregs from table why not query all first and
the do mysql_data_seek on result?
// Query to show
$query_rsData = "SELECT * FROM {table} ORDER BY {Whatever field}";
$rsData = mysql_query($query_rsData, $DB_CONECTION);
$num_total_records = mysql_num_rows(
If you're not sure you should probably stick with mysql_connect() -
otherwise you could end up bogging down mysql with way more
connections than you need if you're not careful.
On Jun 20, 2006, at 12:34 PM, Juanjo Pascual wrote:
How can i know which of both is better to use each time?
--
As you didn't mentioned what you use your queries for, maybe read the
manual?
Andy
Juanjo Pascual wrote:
> How can i know which of both is better to use each time?
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, 2006-06-20 at 12:34, Juanjo Pascual wrote:
> How can i know which of both is better to use each time?
Use mysql_pconnect() if the connection overhead is large. This is
usually the case if the database is off on a remote server somewhere in
lala land. Remote servers within your LAN don't us
Juanjo Pascual wrote:
> // Num of records each time
> $NUM_RECORDS = 10;
>
> if ($_GET["pag"] == "") {
>$ini = 0;
>$pag = 1;
> }
> else {
>$ini = ($pag - 1) * $NUM_RECORDS;
> }
>
> // Query to show
> $query_rsData = "SELECT * FROM table LIMIT " . $ini . ", " . $NUM_RECORDS;
> $rsData
How can i know which of both is better to use each time?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Links for the pages
---
First page: this_page.php?pag=1
Previous page: this_page?pag=
Next page: this_page?pag=
Last page: this_page?pag=
Rodrigo de Oliveira Costa escribió:
I have the following problem, I need to make a paging system to show
results from search on a Mys
I have the following problem, I need to make a paging system to show
results from search on a Mysql database. I found a class that
should do the job but couldn't figure it out how to use it. Does
anybody has an Idea of hos to do this? I thank in advance for any help
you guys can provide me.
R
Jochem Maas wrote:
[EMAIL PROTECTED] wrote:
var_dump gives
Company Director string(17)
Company Director string(16)
Why would they be different?
probably because there is either:
1. white space in the value in your data source
2. white space being outputted along side the value when creati
Hi all,
This may not be complex at all- maybe my head is just screwed up this
afternoon!
I am looping through arrays all at one time for the following-
$filter_subject
$filter_body
$filter_email
$filter_subject_like
$filter_body_like
$filter_email_like
Examples of the following could be-
$f
After you do your first insert, do:
$insertedid = mysql_insert_id();
That will give you the autoincrement ID from the last INSERT you did. Note,
this doesn't retrieve the last autoincrement ID from any insert, just the last
one for thta specific mysql connection. So you don't have to worry ab
Ross wrote:
> This does not work although when I echo out the strings they are exactly the
> same. Strange!
try using var_dump($compare1, $compare2);
>
>
> "Ross" <[EMAIL PROTECTED]> wrote in message news:...
>> if (isset($_POST['Submit'])) {
>> //echo "post equals".$_POST['x']." corect
>
Rafael wrote:
A single "=" it's an assignment, not a comparison; and though it
sometimes work, you shouldn't compare strings with "==", but using
string functions, such as strcmp()... or similar_text(), etc.
This is PHP, not C. Operators such as == support strings for a reason,
peopl
[EMAIL PROTECTED] wrote:
> var_dump gives
>
> Company Director string(17)
>
> Company Director string(16)
>
> Why would they be different?
probably because there is either:
1. white space in the value in your data source
2. white space being outputted along side the value when creating a form
Soted it was an extra whitespace character being added to the posted answer.
The var_dump function highlighted it! nice Work Jochem. No idea where it
campe from though!
R.
- Original Message -
From: "Jochem Maas" <[EMAIL PROTECTED]>
To: "Ross" <[EMAIL PROTECTED]>
Cc:
Sent: Tuesday, J
var_dump gives
Company Director string(17)
Company Director string(16)
Why would they be different? Seems like they have add some extra whitespace?
R.
- Original Message -
From: "Jochem Maas" <[EMAIL PROTECTED]>
To: "Ross" <[EMAIL PROTECTED]>
Cc:
Sent: Tuesday, June 20, 2006 3:57 PM
At 8:47 AM +0600 6/20/06, Prathaban Mookiah wrote:
>I have run into a tricky situation and need some help to work my way through
>the problem. I use MySQL.
>
>I accept some data from the user and insert them into two tables.
>
>1. I insert part of the data into the first table. I do not specify the
This does not work although when I echo out the strings they are exactly the
same. Strange!
"Ross" <[EMAIL PROTECTED]> wrote in message news:...
> if (isset($_POST['Submit'])) {
> //echo "post equals".$_POST['x']." corect
> is".$correct_answers[$page-1];
> $compare1 = $_POST['x'];
> echo "p
At 12:43 PM +0100 6/20/06, Ross wrote:
>I have a quiz where the ansers are held in a array called $correct answers.
>When I compare the string
>
>if ($_REQUEST['x']= $correct_answers[$page-1]) {
>
>
>
>with a double == the answer is always correct with the single = it is always
>wrong.
>
>when I e
if (isset($_POST['Submit'])) {
//echo "post equals".$_POST['x']." corect is".$correct_answers[$page-1];
$compare1 = $_POST['x'];
echo "page is".$page;
$compare2 = $correct_answers[($page-1)];
echo "compare1 is ".$compare1;
echo "";
echo "compare2 is ".$compare2;
if (strcmp($compare1, $compare2
At 4:19 AM -0500 6/20/06, Rob W. wrote:
>- Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]>
>To: "Rob W." <[EMAIL PROTECTED]>
>Cc:
>Sent: Tuesday, June 20, 2006 4:13 AM
>Subject: Re: [PHP] Still trying to figure this out...
>
>
>snip
>
Ahhh crap -- does this mean none of us get
At 11:43 AM +0200 6/20/06, Jochem Maas wrote:
>
>
>a, whether you or anyone else *wants* my opinion is irrelevant.
>b, I'm quite sure there are a couple of people here that appreciate at least
>*some* of my input on this list.
You can count me into that "couple of people" group.
I've always found
= is the assignment operator. It is not a comparison. == is the weak
equality comparator. === is the strong equality comparator.
On Tuesday 20 June 2006 06:43, Ross wrote:
> I have a quiz where the ansers are held in a array called $correct answers.
> When I compare the string
>
> if ($_REQUE
suresh kumar schrieb:
Hi,
I am facing one problem in my project.i want to restrict more than one
user login in the same account .
Is there any functions available to check r we can implement using session.
Nothing specialized than that.
Barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance f
Or make your own, might be easier to do.
On 6/20/06, suresh kumar <[EMAIL PROTECTED]> wrote:
Hi,
I am facing one problem in my project.i want to restrict more than one user
login in the same account .Is there any functions available to check r we can
implement using session.
(inline)
Ross wrote:
I have a quiz where the ansers are held in a array called $correct answers.
When I compare the string
if ($_REQUEST['x']= $correct_answers[$page-1]) {
with a double == the answer is always correct with the single = it is always
wrong.
A single "=" it's an assignment,
suresh kumar wrote:
> Hi,
> I am facing one problem in my project.i want to restrict more than one
> user login in the same account .Is there any functions available to check r
> we can implement using session.
probably.
>
Hi,
I am facing one problem in my project.i want to restrict more than one
user login in the same account .Is there any functions available to check r we
can implement using session.
A.suresh
I have a quiz where the ansers are held in a array called $correct answers.
When I compare the string
if ($_REQUEST['x']= $correct_answers[$page-1]) {
with a double == the answer is always correct with the single = it is always
wrong.
when I echo out the posted answer and the value from the
Rob W. wrote:
>
...
>
> Dont complain about people asking for help when that is what this list
> is for.
I wasn't complaining Rob, merely trying to point out that
'help' != 'do my work for me'
>
>>
>>> that's why this list is here,
>>
>> really, could you please quote your support contract n
- Original Message -
From: "Jochem Maas" <[EMAIL PROTECTED]>
To: "Rob W." <[EMAIL PROTECTED]>
Cc:
Sent: Tuesday, June 20, 2006 4:13 AM
Subject: Re: [PHP] Still trying to figure this out...
Rob W. wrote:
Ya know, after working on this for 2 days straight, I have tried my own
so wh
Rob W. wrote:
> Ya know, after working on this for 2 days straight, I have tried my own
so what.
> work. I never said I was an expert at php,
neither did I.
> that's why this list is here,
really, could you please quote your support contract number.
> so the next time you critisize someone,
Yes, I do have it setup right to display my errors, the reason why I wasnt
getting any input is because when the array was matched to range(1,24) and
the other array had nothing in it, I was either getting a list of numbers 1
though 24 or nothing at all.
- Rob
- Original Message -
Fr
Rob W. wrote:
Ya know, after working on this for 2 days straight, I have tried my
own work. I never said I was an expert at php, that's why this list is
here, so the next time you critisize someone, keep it to your self
cause no one cares to hear about it. If you dont wanna help, then stfu.
J
Ya know, after working on this for 2 days straight, I have tried my own
work. I never said I was an expert at php, that's why this list is here, so
the next time you critisize someone, keep it to your self cause no one cares
to hear about it. If you dont wanna help, then stfu.
- Original
Rob W. wrote:
> OMG Chris, Thankyou very much. That is exactally what I needed. If you
> wish for me to pay you some amount, I will be very happy to. Please send
> me a private email where I can paypal you. If not, Thank you again very
> much for the help.
just do us all a favor and only come back
Hi all,
I am using PEAR:XML_Serializer to unserializer our customer xml file.
However in some customer xml file , there are some value in xml which
are not unicode , for example as shown below:
I need to amended the value above to be empty.
Anyone have any suggestion how to do this ?
Than
- Original Message -
From: "Richard Lynch" <[EMAIL PROTECTED]>
On Sun, June 18, 2006 2:19 am, Satyam wrote:
- Original Message -
From: "Rory Browne" <[EMAIL PROTECTED]>
Good code won't be vulnerable to register_globals either, but having
register_globals on is a security probl
70 matches
Mail list logo