I have a form and I don't want to insert recording with blank value.
I put:
if ($lastname=) {
$insert=no
}
if ($insert=no){
do not insert;
else
insert;
}
my probleme is in some case $lastname= is true and other case is false.
I tried with $lastname= but no change. how can I check if
see if isset() works for you
-Original Message-
From: Leo [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 6:42 PM
To: php.net
Subject: [PHP] checking
I have a form and I don't want to insert recording with blank value.
I put:
if ($lastname=) {
$insert=no
}
if ($insert=no){
Hi
I have a working PHP build on my webserver, but it seems it was compiled
without support for gd or pdflib and a couple of others.
Since rebuilding PHP requires a rebuild of apache as well, I really
don't want to go that route unless 100% essential.
So, is there a way I can add these libs now
Thanks, this one seems to be the easiest. Shouldn't be too difficult for
me to modify so the barcode gets displayed alone on a new page so the
person can just hit the print button on his browser...
Anil Kumar K. wrote:
Also: http://www.mribti.com/barcode/
On Thu, 27 Jun 2002, Peter wrote:
dl() is your friend here - well it works fine on the win version at least...
:)
-Original Message-
From: PHPCoder [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 28, 2002 5:03 PM
To: php-general
Subject: [PHP] Adding GD libraries after compile
Hi
I have a working PHP build on my
try empty()
if(empty($lastname))
{
$badvalue = 1;
}
if(empty($firstname))
{
$badvalue = 1;
}
if(!$badvalue)
{
// insert
}
I'd really advise using 1/0 or TRUE/FALSE instead of yes/no for values like
$insert, because the if statements are a lot quicker to
On Friday 28 June 2002 15:03, PHPCoder wrote:
Hi
I have a working PHP build on my webserver, but it seems it was compiled
without support for gd or pdflib and a couple of others.
Since rebuilding PHP requires a rebuild of apache as well, I really
don't want to go that route unless 100%
I have assembled a rich text html editor for the web and the code returned
can be quite horrid.
When pasteing from word (as our client wants to), the code returned looks
something like this:
TABLE style=BORDER-RIGHT: medium none; BORDER-TOP: medium none;
BORDER-LEFT: medium none; BORDER-BOTTOM:
I've just done a little reading on dl(), and it would appear that I can
dynamically load the GD lib at run time.
Although it isn't really clear to me exactly how this is done, given that I
have the gd-1.8.4 directory in my doc root (although I haven't compiled it
as yet).
Quote the manual:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi all
I'm setting up a site for a client and his host refuses to create (or
allow me to) a directory outside of the http root.
How might I make an 'includes' dir inside the http root and stop users
being able to browse it?
Many thanks
- --
Nick
On Friday 28 June 2002 16:25, Nick Wilson wrote:
Hi all
I'm setting up a site for a client and his host refuses to create (or
allow me to) a directory outside of the http root.
How might I make an 'includes' dir inside the http root and stop users
being able to browse it?
If using Apache,
and using IIS use windows security
-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: 28 June 2002 9:31 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] securing an 'includes' dir
On Friday 28 June 2002 16:25, Nick Wilson wrote:
Hi all
I'm setting up a site for
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Jason Wong declared
If using Apache, you would set a directive to deny all access to that
directory.
Gotcha. Can you domonstrate?
Cheers...
- --
Nick Wilson // www.explodingnet.com
-BEGIN PGP SIGNATURE-
Version:
Assuming you have Apache/Unix (don't know about any other set-ups), I do the
following.
1. Name all included files .inc I do this for many reasons, but mainly to
help me know which are executables, and which are includes. It also helps
with step 3.
2. I always keep them in a separate dir to
hi all,
I'm registering if people are logged in. The login page is situated in the mainFrame.
Now in my leftFrame I want to put the status (i.e. you are logged in as .)
When people are succesfully logged in I register their name as
session_register('session_loginname');
I then refresh the
1. Name all included files .inc I do this for many reasons, but mainly
to help me know which are executables, and which are includes. It also
helps with step 3.
Just for an added layer of security (incase step 3 isnt effective due to
mis-configuration or what have you), name them .inc.php
have a look to the function xml_set_object in the doc:
http://www.php.net/manual/en/function.xml-set-object.php
-Original Message-
From: Christof Rath [mailto:[EMAIL PROTECTED]]
Sent: jeudi 27 juin 2002 23:19
To: [EMAIL PROTECTED]
Subject: [PHP] OOP and xml_set_element_handler
Are you passing the session ID around in the URL, or in cookies?
Justin French
on 28/06/02 6:28 PM, Wilbert Enserink ([EMAIL PROTECTED]) wrote:
hi all,
I'm registering if people are logged in. The login page is situated in the
mainFrame.
Now in my leftFrame I want to put the status
On Friday 28 June 2002 16:40, Nick Wilson wrote:
* and then Jason Wong declared
If using Apache, you would set a directive to deny all access to that
directory.
Gotcha. Can you domonstrate?
Directory /path/to/directory/to/deny/access
Deny from All
/Directory
Remember this is
my bad. I edited to strip out some of the html and left that in there
by mistake.
the code works as i said, but only to write the first time ti loops,
and doesn't add in anything after.
sunny
--- Martin Towell [EMAIL PROTECTED] wrote:
Is this a direct copy of what you've got? If so, line 11
Hi!
Why fread() function do not read first two lines in a file?
I have a chrates.php file :
html
head
titleTitle here!/title
/head
body
?
if (isset($save)) {
// get contents of a file into a string
$filename = /var/www/html/data/rates.php;
$fd = fopen ($filename, r);
On Friday 28 June 2002 17:31, sunny AT wde wrote:
my bad. I edited to strip out some of the html and left that in there
by mistake.
the code works as i said, but only to write the first time ti loops,
and doesn't add in anything after.
I would suggest posting your full code. Unless it's
Hi,
Maybe it's already discussed here, but PHP is generating errors of undefined
constants. These constants are defined in my scripts. Als the superglobal
$_ENV is empty.
Can anyone tell what's wrong here?
I'm using a W2K server, with Apache 1.3.26 and PHP 4.2.1
Thanks in advance,
S.
Hi everybody,
I just encountered a very strange problem - I'm running Apache 2.0.36 +
PHP 4.2.1 - for couple months already. Yesterday I upgraded my system -
SuSE 7.3 to 8.0. Apache and PHP was left untoeched, but sessions stopped
working no files are saved to the temporary directory -
What is best:
1) calling n-times the function mail() [with n = numer of emails] or
2) calling 1 time mail() and use CC
?
Or it it is the same thing?
Thanks,
Evan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi all,
Just wondering if anyone came across this problem before:
When I print a document directly from my browser, it comes out with the
title on
the top right , page number of the top left, address on the bottom left and
date on the bottom right, Page Headers and Footers
Using IE I can set
hmmm, i'm not passing anything around, at least not on purpose.
Wilbert
- Original Message -
From: Justin French [EMAIL PROTECTED]
To: php [EMAIL PROTECTED]
Sent: Friday, June 28, 2002 11:14 AM
Subject: Re: [PHP] session vars and frames
Are you passing the session ID around in the
Neil M wrote:
problems compiling php-4.2.1 / solaris 2.6
--
[root@sunnsr02] 240 /tmp cd /export/php-4.2.1
[root@sunnsr02] 241 /export/php-4.2.1 make
Making all in Zend
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I.
I am on the newsgroups.
visit PHP.net look a little bit and you will find the link to the news
server.
Peter [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Does anyone else out there use Outlook Express to get the posts from this
newsgroup?
Yesterday a dialog
and this relates to PHP how...?
-Original Message-
From: Neal Dewing [mailto:[EMAIL PROTECTED]]
Sent: 28 June 2002 9:01 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Web Printing
Hi all,
Just wondering if anyone came across this problem before:
When I print a document directly
I want to search within a result from a query
A specific range (price)
For example.
I want to display only the articles that cost between 0-50
Can anyone help me out ?
Regards
Bård Tommy
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
what is the best way to increment a mySQL table cell?
is there a increment function or do I need to increment it in php?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
you can use:
UPDATE column SET column + 1 WHERE condition
JJ Harrison wrote:
what is the best way to increment a mySQL table cell?
is there a increment function or do I need to increment it in php?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Table fubar
ID, SomeNumber
1 456
2 123
3 3
4 4589
$query = UPDATE fubar SET SomeNumber = SomeNumber+1 WHERE ID = 2;
Result
Table fubar
ID, SomeNumber
1 456
2 124
3 3
4 4589
On Fri, 28 Jun 2002, JJ Harrison wrote:
-what is the best way to increment a mySQL
Yes, you are ruled out, unless you can convice your administrator to
include it.
Extensions are pure machine code, so if anybody could load his/her own
extension,
he/she could easily gain http server priviledges.
Justin French wrote:
I've just done a little reading on dl(), and it would
Thanks
Jj Harrison [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
what is the best way to increment a mySQL table cell?
is there a increment function or do I need to increment it in php?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Hello,
I wrote this function:
?php
function CleanUpHtml($var)
{
$var = preg_replace(!t(a|r|d)(.*?)style=\.*?\(.*?)!is, t$1$2$3,
$var);
$var = preg_replace(!table.*?!is, TABLE border=1
bordercolor='#66' cellpadding=3 cellspacing=0, $var);
$var = str_replace(p, , $var);
$var =
Actually, I just threw in this amendment:
function CleanUpHtml($var)
{
$var = preg_replace(!t(a|r|d)(.*?)style=\.*?\(.*?)!is, t$1$2$3,
$var);
$var = preg_replace(!table.*?!is, TABLE border=1
bordercolor='#66' cellpadding=3 cellspacing=0, $var);
$var = str_replace(p, , $var);
$var =
Here is my code:
$query = UPDATE poll_options SET votes + 1;
mysql_query($query);
All where conditions have were removed to try and fix the problem
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Not a problem, I can make some code modification. Sometime it is better to
do it now and not have so much headache later on when more features are
being added.
Scott
Kondwani Spike Mkandawire [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I forgot to point out
Not a problem! I can make some adjustment to the $user_detail['']
(session_id()) to make it work as $_SESSION[''].
Scott
Erik Price [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Wednesday, June 26, 2002, at 02:37 PM, Scott Fletcher wrote:
I didn't know
On Friday, June 28, 2002, at 04:25 AM, Nick Wilson wrote:
How might I make an 'includes' dir inside the http root and stop users
being able to browse it?
chmod go-rwx dirname
But this will probably stop the web server from reading the file.
Perhaps the administrators can provide a script
Jesper Brunholm [EMAIL PROTECTED] wrote:
Do you have any documentation on this? - I'm
getting quite used to read and hear the very
opposite.
i downloaded several docs on the net about slow
execution when classes are used, but sorry, i'm on a
public-shared computer now and can't reach these
On Thursday, June 27, 2002, at 04:41 AM, Leo wrote:
I have a form and I don't want to insert recording with blank value.
I put:
if ($lastname=) {
$insert=no
}
if ($insert=no){
do not insert;
else
insert;
}
my probleme is in some case $lastname= is true and other case is
On Thu, Jun 27, 2002 at 11:41:45AM +0300, Leo wrote:
if ($lastname=) {
Notice, you put = rather than == here and at the next if statement.
So, that'll throw things off. You may have been retyping this example,
but that's not a good idea because of typos. Always copy/paste or insert
the
The recent thread on security has prompted me to think about
security in a shared server environment. I want to see if my
understanding is correct ...
Let's say I am in a shared server environment the provider does
NOT have safe_mode turned on. In that case, it seems to me that
it is insecure
On Friday 28 June 2002 21:05, JJ Harrison wrote:
Please think of a more descriptive subject.
Here is my code:
$query = UPDATE poll_options SET votes + 1;
mysql_query($query);
All where conditions have were removed to try and fix the problem
How isn't it working?
--
Jason Wong -
On Friday 28 June 2002 19:15, Bård Tommy Nilsen wrote:
I want to search within a result from a query
Did you really mean that, or did you mean you want a query which returns
results within ...
A specific range (price)
? If the latter then ...
For example.
I want to display only the
On Friday 28 June 2002 19:13, Brian McGarvie wrote:
and this relates to PHP how...?
Don't tempt them, people _do_ come up with the most oblique of reasons why
their question is related to php.
--
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
On Friday, June 28, 2002, at 09:30 AM, Jonathan Rosenberg wrote:
Let's say I am in a shared server environment the provider does
NOT have safe_mode turned on. In that case, it seems to me that
it is insecure to keep secrets (e.g., DB passwords) in a PHP
file that is executed by the
On Friday 28 June 2002 18:59, Evan wrote:
What is best:
1) calling n-times the function mail() [with n = numer of emails] or
2) calling 1 time mail() and use CC
?
Or it it is the same thing?
1) will send mail out n times
2) will send mail out once, but everyone gets to see who the other
Have you tried:
$query = UPDATE poll_options SET votes = votes + 1;
*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*
-Original Message-
From: JJ Harrison [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 28, 2002 8:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP]
[snip]
He said...
Anyone ever worked with this function? I know its not PHP
related but im
sure someone came across the problem.
Ya'll said
and this relates to PHP how...?
Don't tempt them, people _do_ come up with the most oblique of reasons why
their question is related to php.
[/snip]
if ($lastname=) {
$insert=no
}
Even though you should use either empty() or isset(), you'd have a parse error if you
wrote that as:
if (=$lastname) {
$insert=no
}
It takes a little time to learn to write the test 'backwards' but if you do the php
parser will help and catch your
On Friday 28 June 2002 21:40, Jason Wong wrote:
On Friday 28 June 2002 18:59, Evan wrote:
What is best:
1) calling n-times the function mail() [with n = numer of emails] or
2) calling 1 time mail() and use CC
?
Or it it is the same thing?
1) will send mail out n times
2) will send
I have a website with .htaccess authenticate.
I want to get htaccess username and password and use them in .php page. Is this
possible?
mypage.php:
?
...
$user == htaccess user
$pwd == htaccess pass
?
Thanks for the reply. But changing the ground read permission of
the PHP files wouldn't help, either, would it? Because the other
users who have web sites can just create a PHP file that reads my
PHP files from one of their pages (which would be running in
group websecret).
Seems like this
I did pass on a link to hime from the M$ website with some VB Script that 'appears' to
do what is wantec.. whither it works or not is another matter :)
-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
Sent: 28 June 2002 2:45 PM
To: [EMAIL PROTECTED]
Subject: RE:
THANKS!!!
great help! :oP
Liljim [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Actually, I just threw in this amendment:
function CleanUpHtml($var)
{
$var = preg_replace(!t(a|r|d)(.*?)style=\.*?\(.*?)!is, t$1$2$3,
$var);
$var =
From: Jonathan Rosenberg [EMAIL PROTECTED]
Let's say I am in a shared server environment the provider does
NOT have safe_mode turned on. In that case, it seems to me that
it is insecure to keep secrets (e.g., DB passwords) in a PHP
file that is executed by the server.
I say this because
Thanks to Jason and ³Sp² for the tip on ³print_r². After all the books I¹ve read, and
all the
scrounging through the manual, I¹m amazed I missed that one. It¹s VERY helpful!
Thanks for your comments Dan. I¹ve actually spent quite some time trying to rework the
cart because
I agree that the
Don't tempt them, people _do_ come up with the most oblique of reasons why
their question is related to php.
According to the Discordian Law of Fives, their questions share with
PHP (and everything else) a relation to 5. So you always have that.
-Josh
--
PHP General Mailing List
I want to search within a result from a query
A specific range (price)
If that's what you really want, then you need to save the results of your
first query into a table that you can re-query at a later date. Run a cron
job to delete old tables.
If your query is:
SELECT * FROM main WHERE price
From: Jason Wong [EMAIL PROTECTED]
select * from table where price 0 AND price 50;
SELECT * FROM table WHERE price BETWEEN 0 AND 50;
Same thing, easier to read (assuming MySQL, don't know if it works on
others).
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To
This is a problem that affects many webhosts... the issue is more of trusting other
users who have shell access to the server in question... I have been trying to help a
hosting company address this issue, but short of dissallowing shell/ssh access their
is no way to stop another user logging
Thanks for the reply. But changing the ground read permission of
the PHP files wouldn't help, either, would it? Because the other
users who have web sites can just create a PHP file that reads my
PHP files from one of their pages (which would be running in
group websecret).
Seems like
Howdy Boys and Girls:
On Fri, Jun 28, 2002 at 03:26:01PM -0400, Mark McCulligh wrote:
I like Versign but the cost is very high.
I use Verisign through Wells Fargo. Signing up through WF gets a
reduced rate. $45/mo, $0.16/trans (incl auth fee). Discount rate
fluctuates depending on the
Dear Mr News:
On Fri, Jun 28, 2002 at 12:41:56PM -0700, news.php.net wrote:
I'd like to add all values for $purchase_price that are returned,
how do I do this?
$result = mysql_query(SELECT purchase_price FROM assets where
order_number='$order_number' ORDER BY $desc);
$total = 0;
Hi all.
I have a question about sessions
which is the best way to close a
session if one its opened for a certain user and then this user changes
to another computer? I guess that I could manage with session_start_time
and session_end_time fields in the DB, and tell the script to see if the
This sounds like the right track to me... the script has to finish
for the page to stop loading, yes? So exec(your_other_script );
and be done with it, yes?
I have never heard of someone wanting to do this, but you might want
to look into methods of executing shell commands in the background,
On 28 Jun 2002 at 17:54, Jonathan Rosenberg wrote:
-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
Subject: Re: [PHP] Keeping Secrets in PHP Files
With shell access, you can't see each others
files. This is where the permissions come into
play,
You really can't do anything besides saying that after X minutes, well,
you were idle, so restart your session. Once you send them the page, you
don't know if they are reading it or have left the table. All you can do
is decide on the next request whether too much time has passed.
As for the new
have look at www.yaga.com
- Original Message -
From: Analysis Solutions [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Friday, June 28, 2002 10:12 PM
Subject: Re: [PHP] PHP with online cedit card processing
Howdy Boys and Girls:
On Fri, Jun 28, 2002 at 03:26:01PM -0400,
Got it but... What happens if someone else grabs the computer that my
user was sitting at 2 minutes before, leaving the window opened and
after he grabs the new machine open a new session... isn't PHP capable
of determining that the same user is trying to open a 2nd session no
matter what the
You don't have any way of telling if the user switched. You just receive
a request for a web page and the browser sends any cookies it has.
If the user even decides to log in as themselves, you can see if a
cookie/session was sent and delete that cookie/session before you let
the other person
75 matches
Mail list logo