Hi!
Well I would like to expire a page after you move away
from that page and the user should not be able to hit
the browser's back button and see the contents. I t
should show that the page has expired..
In ASp it is very easy to do that but in Php I am
looking all over and still can't find it
I know that this has been discussed before, but I cannot find the threads
so...
I have a function that does a mysql_query and want to break if the SQL query
didn't return any rows in $result.
empty(), isset() will not work, for obvious reasons.
Can anyone suggest an alternative?
$sql="select r
ah! thanks Moody.
silly jaxon, kicks are for trids.
cheers,
j
> -Original Message-
> From: Moody [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 10, 2001 1:01 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: passing args to function?
>
>
> > I'm having a bit of a hard time passing
Just use:
if (!$result){
code here
}
Jeff
> -Original Message-
> From: Andrew [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 10, 2001 1:34 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] test for empty $result??
>
>
> I know that this has been discussed before, but I cannot find the
thansk, but $result here is a Resource ID, and will be present even if the
result set associated with it is null.
best,
a
> -Original Message-
> From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 10, 2001 1:43 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: R
Then you can use:
if (mysql_num_rows($result) == 0) {
stuff here
}
This will check the number of rows returned from your query. If zero,
then do somethingmodify as you need.
HTH
Sam Masiello
Software Quality Assurance Engineer
Synacor
(716) 853-1362 X289
[EMAIL PROTECTED]
cool! thanks Sam and Jeff, for your responses!
best,
a
> -Original Message-
> From: Sam Masiello [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 10, 2001 1:48 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [PHP] test for empty $result??
>
>
>
> Then you can use:
>
PHP is probably compiled as a module.. if you want to be able to compile php
to use on command line you need to compile a second version (yes you can
have two) without all the apache configure options (ie only things like
mysql as and when needed)
- Original Message -
From: "ReDucTor" <[E
> Then you can use:
> if (mysql_num_rows($result) == 0) {
> stuff here
> }
> This will check the number of rows returned from your query. If zero,
> then do somethingmodify as you need.
What I generally do is this:
if(( !$result ) || ( mysql_errno() > 0 )) {
// error code here
}
OR
It's in the manual here:
http://www.php.net/manual/en/function.header.php
It gives this solution
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always
modified
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
Is there a way to round a number to the next whole number?
Example:
Before: 1.86758
After: 2
Thank you,
http://www.php.net/manual/en/function.ceil.php
- Original Message -
From: "Brandon Orther" <[EMAIL PROTECTED]>
To: "PHP User Group" <[EMAIL PROTECTED]>
Sent: Monday, September 10, 2001 2:19 PM
Subject: [PHP] Rounding a number up
> Is there a way to round a number to the next whole numb
Yeah, we narrowed it down to the cluster as causing the problem friday
night. My host is working to figure out a solution. They have a few ideas,
but haven't tested them yet.
session files get saved in /tmp by default, correct? Is there a way to have
them saved somewhere that would propogate to
This is a forwarded message
From: Badger <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Monday, September 10, 2001, 12:23:54 AM
Subject: [PHP] mail() ERROR - WHY, WHY, WHY
===8<==Original message text===
Hello ,
I drowing here and need a life-ring! I have a site relyin
Hmm.. I dont think I agree with you on that. First the code works perfect,
second its just using two list() rather then one, otherwise its exactly the
same thing as you say would work, which is what makes me think its a two
dimensional array.
Ken
_lallous wrote in message <[EMAIL PROTECTED]>...
Hi,
I was wondering how does one create a PHP script that can verify a
database for the login ID and password and then allow that person to
access a particular page.
I am not looking for extreme details here , but I just want to get a
general idea.
I can understand how to make a script to verif
Does anyone have GD with GIF support? Can you send it to me? Thanks
Joseph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PRO
I'm trying to make a query that will number it's own output rows. e.g. when
listing all the entries in a table that are related to a specific invoice,
there will be a column with a monotonically increasing integer value (1-x
where x is the number of matching entries).
I know I can easily do this
> session files get saved in /tmp by default, correct? Is
> there a way to have
> them saved somewhere that would propogate to all the servers
> in the cluster?
Warning! The following is from me, a non-gearhead.
1. We use a load balancer which is able to set a cookie on the first page
request
Sveiki, php-general,
I got this message:
Warning: SAFE MODE Restriction in effect. The script whose uid is 505 is not allowed
to access /tmp/phpwGxNPJ owned by uid 0 in /home/sveikinimai.lt/send/owncard.php on
line 46
Where could be that I'm making a mistake...
__
Thanks for the input Kirk!
Unfortunately, I don't have the ability modify my php.ini (virtual hosting).
Also, if I saved the session data in the database, I'd have to perform a
database query to get it at the beginning of each page. That's probably not
good for performance. :/
option #1 intere
We use a Big-IP controller from F5:
http://www.f5.com/f5products/bigip/index.html
Kirk
> -Original Message-
> From: Jason Bell [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 10, 2001 1:33 PM
> To: PHP Users
> Subject: Re: [PHP] Reprise of dissapearing session variables
>
>
> Than
On my site I have a page that takes input into a MySQL database
(though this isn't a db question).
Each entry has a category and a subcategory entry, which should come
from predefined lists and are therefore instituted as pull-down
lists. The category list is in a PHP array which feeds a SELE
See if this does what you are shooting for:
select tableName.*,if(@count>=1,@count:=@count+1,@count:=1) as inc, from
tableName;
Keep in mind that @count will keep it's value until the thread is closed, so
if for some reason you have
to do the above twice in one thread throw in a statement like:
Check out http://www.phpbuilder.com... I'm sure I've seen this covered
there...
-philip
On Tue, 11 Sep 2001 [EMAIL PROTECTED] wrote:
> Hi,
>
> I was wondering how does one create a PHP script that can verify a
> database for the login ID and password and then allow that person to
> access a par
Hi,
I have a variable containing a date in the form of "12/03/01". I wish to display it
as:
December 03, 2001.
Is there a built in PHP method for doing this or am I on my own and have to write by
own functions (which I can do).
Thanks,
Don
I'm writting a class in PHP that has the following syntax
ID = $fld->ID;
$this->name = $fld->name;
$this->lastname = $fld->lastname;
$this->username = $fld->username;
$this->password = $fld->password;
return true;
}
else {
return false;
} #end if
mysql_free_re
One of the annotations to the docs for session functions notes that if
you want to set a session variable inside a function, you have to call
session_start() BEFORE to use your global $varname statement. But
there's more to it than that.
After some very annoying trial and error, I disovered that
Well, I played with this a little more and it seems to be acting oddly when
you first
call this select unless you set the variable first. So if the below doesn't
work try
actually doing this
$query="set @count=NULL; select
tableName.*,if(@count,@count:=@count+1,@count:=1) as inc, from tableName"
I have a configuration file that I use to store several variables and
would like to provide a web-based interface to update this form. I'm
having some trouble replacing part of the file while leaving the rest of
it intact.
An example of the config file is:
$eventInfo[1][1] = "First Event Title"
On Mon, 10 Sep 2001 14:15:36 -0700, Kurt Lieber wrote:
>I have a configuration file that I use to store several variables
and
>would like to provide a web-based interface to update this form.
I'm
>having some trouble replacing part of the file while leaving the
>rest of
>it intact.
>
>An example
agreed, except it's for a client who doesn't have database access at
their ISP and doesn't wish to pay more to get database access. So, I'm
stuck using a text file for now.
--kurt
> -Original Message-
> From: Mark [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 10, 2001 2:17 PM
>
It works
http://domain.dot.com/loop.php";>
thanks for your time, this solved my problem.
Not only I am new to PHP I am also new to HTML
where can I find a list with all "meta" tags?
kostis.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additio
how much are they paying for their hosting? I mean seriously you can
get a PHP enabled host that offers MySQL database for next to nothing these
days.
But, apart from that
you could read the file into an array, making each line an element within
the array. Modify what you need to modif
Is it possible to compile PHP 4 under Apache 2.0 or Tomcat 4.0 as a
standalone server?
Nael Mohammad
Neomar, Inc.
[EMAIL PROTECTED]
"When Wireless Means Business"
CONFIDENTIALITY NOTICE: This e-mail may contain confidential information
that is legally privileged. Do not read this e-mail if you
Hi all,
What will be the way to convert binary information into a string which
will get into an SQL query for MySQL? I tried stripcslashes but I got
stucked with it. Any help?
Thanks in advance.
Sean C. McCarthy
SCI, S.L. (www.sci-spain.com)
--
PHP General Mailing List (http:/
try addslashes instead. You might have better luck.
- Original Message -
From: "Sean C. McCarthy" <[EMAIL PROTECTED]>
To: "PHP General List" <[EMAIL PROTECTED]>
Sent: Monday, September 10, 2001 2:42 PM
Subject: [PHP] Stripslashes question.
> Hi all,
>
> What will be the way to conver
So sprach »Sean C. McCarthy« am 2001-09-10 um 22:42:51 +0100 :
> Hi all,
>
> What will be the way to convert binary information into a string which
> will get into an SQL query for MySQL? I tried stripcslashes but I got
> stucked with it. Any help?
Wrong direction :) addslashes($binary) will en
Hi,
Didn't help. I tried it before that is why I tried with addcslashes.
What I have done so far is :
I have cmp'ed the file before adding slashes and after and it seems that
it is eating up the \. Like Pñ\#as renders as Pñ#as after
stripingslashes but in the DB is Pñ\\#as. As far as I know it
I am looking for something like this as well. We are not looking at
developing our own interface but maybe going with something like eGrail or
Vignette? I'm not too familiar with the pros and cons of these. Which heavy
duty content management system is best from a PHP-friendly standpoint?
Than
PHP has some encryption mechanisms in it - but by that time you've
sent the data to the server. The other respondents are correct
though - you should be using an SSL connection to encrypt the data
between the user and your server.
On a site that I do I use SSL to keep the data secure between
I've seen one very heavy-duty example of a completely web-based site
development tool. This was done in ASP, VB and SQL Server (I think)
but could be done with open source tools. However, they've put many
people-years into the project. Every site resides on the ASP's
(using the other meanin
Hello all.
This is just another reminder for anyone who may have missed
it that we have another PHP training course coming up very soon.
October 1-5, 2001, in Ann Arbor, Michigan, Tap Internet will be
offering a PHP training course. The course will feature material
aimed at beginners to interme
Hi,
With most of my scripts, when I am about to write something, I have it in my
head on how to do it exactly.. But with only 1 login per user at anytime, I
havent found any good ways to do it,
All I can think of is to set a mysql field called ³logged_in² to ³1² or ³0²
if logged in or not, but
HI
You can put the header function anywhere in the php code as long
as the logic sends it as the very first output for the page in html.
Conditional redirects are no problem.
>[EMAIL PROTECTED] (George Pitcher) writes:
>
>> Andrew,
>>
>> I am in a similar position witha Lasso site, which
Hi,
I'd like to execute a php script which does *not always* display HTML
everytime a file is not found.
IE requires that a custom errmsg be over 512 bytes in order to
display it instead of the internal one, my ErrorDocument script will
look for any 'not found' file somewhere else (in blob recor
I'm writing a little script to make a stem plot (to make my AP STAT class
easier). Currently, my stem plot is stored in an array. Here is what the
output of print_r($stem); looks like:
Array
(
[39] => 7
[40] => 1 1 4 8 9
[41] => 2 3 8 8 9
[42] => 0 2 3 5 7
[43] => 0 0 1
The following might help you in your quest. You may already be aware of
them and perhaps they don't fit your bill but anyway, here it goes.
I think phpwebsite is worth a look.
http://phpwebsite.appstate.edu/
http://www.postnuke.org/
and have a look through here:
http://www.hotscripts.com/PHP
you said you added some headers, how about padding the html out with
but I'm not sure what you are doing here, so that may not apply/work :)
Andrew
- Original Message -
From: "Enrique Vadillo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 11, 2001 1:56 AM
Subject
On Tue, 11 Sep 2001 10:23, Evan Nemerson wrote:
> I'm writing a little script to make a stem plot (to make my AP STAT
> class easier). Currently, my stem plot is stored in an array. Here is
> what the output of print_r($stem); looks like:
>
> Array
> (
> [39] => 7
> [40] => 1 1 4 8 9
>
On Tue, 11 Sep 2001 06:07, Don wrote:
> Hi,
>
> I have a variable containing a date in the form of "12/03/01". I wish
> to display it as:
>
> December 03, 2001.
>
> Is there a built in PHP method for doing this or am I on my own and
> have to write by own functions (which I can do).
>
> Thanks,
Below is a function I found in the manual or somewhere on php.net. I tried
to find it to provide a link so the author would get some credit. Sorry but
no luck. Anyway, this is a handy little function when you are trying to
figure out the contents of an array.
-kevin
function array_tree($array
Hi there:
We have this functionality built into our core framework
with our custom session handling. The basic premise is that you don't
store a
1/0 in a 'logged in' flag, but store the session key with the username.
When someone logs in, assign their session key to that username. The
previ
On Tue, 11 Sep 2001 00:02, Robert Trembath wrote:
> Hello everyone,
>
> Ran into a problem trying to get this to work. I have multiple names in
> a mysql field (DCD_Access) that contains "name1, name2, name3, name4"
> and I want read this information as an array so I can use these values
> to popu
G'day Jason
>> On the hosting provider, HTTPS connections don't work. But,
>> I'm told the command-line version of curl does work.
>
> That'd probably be because they didn't install the HTTPS-able
> version of cURL. Check out curl.haxx.se for more info.
No, testing shows that their cURL binary
On Tue, 11 Sep 2001, Daniel Baldoni wrote:
> G'day Jason
>
> >> On the hosting provider, HTTPS connections don't work. But,
> >> I'm told the command-line version of curl does work.
> >
> > That'd probably be because they didn't install the HTTPS-able
> > version of cURL. Check out curl.haxx.se
On 9/10/2001 10:08 PM this was written:
> Some people have reported problems with cURL and PHP v4.0.6
> (regarding SSL, although I haven't seen them, and some people don't have
> problems).
> Upgrade to a recent snapshot (or latest CVS) of cURL and everything
> should be fine...
I had cU
It depends on what you want to achieve, and you ISP.
If you can achieve everything you want with htaccess, then it is pretty
simple, and a good option -- no db's, no PHP. BUT it may be complex to
add new users at your ISP.
On my site (perhaps not the most secure site in the world!!!), I use a
s
Hi all,
I'm currrently developing a dynamic, user-added content site.
The thing is, content can be added and edited my TWO people..
the original writer, and the editor.
So, my problem is, if the editor/user makes an edit to content
whilst the other is also attempting to do so, one of them will
I'm doing the following:
test.php -
-- functions.php -
";
function setNoCacheHeaders( ) {
static $headersNotSet = TRUE;
if ( $headersNotSet ) {
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");// Date in the
past
header("Last-Modified: " . gmdate("
On Tue, 11 Sep 2001, Justin French wrote:
> I'm currrently developing a dynamic, user-added content site. The
> thing is, content can be added and edited my TWO people.. the
> original writer, and the editor.
Just put a timestamp field into the table, which will automatically track
the last upd
I am having the following problem.
I have a database that is setup as follows
CREATE TABLE test (
id tinyint(4) NOT NULL auto_increment,
text text NOT NULL ,
PRIMARY KEY (id)
) TYPE=MyISAM;
I have a page after a form that confirms all data to be entered the html is
as follows
text=\"test
On Tue, 11 Sep 2001 14:20, Lance Rochelle wrote:
> I am having the following problem.
> I have a database that is setup as follows
>
> CREATE TABLE test (
> id tinyint(4) NOT NULL auto_increment,
> text text NOT NULL ,
> PRIMARY KEY (id)
> ) TYPE=MyISAM;
>
> I have a page after a form that
Further information:
The page is navigated to via a previous page using a "Location: /test.php"
header. The problem occurs when I first navigate to the page. If I then
do a refresh from the browser, the problem disappears.
I also did further testing where I put the following type of code betw
i've figured out post works
- Original Message -
From: "Tom Carter" <[EMAIL PROTECTED]>
To: "ReDucTor" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, September 11, 2001 4:01 AM
Subject: Re: [PHP] HTTP POST..
> PHP is probably compiled as a module.. if you want to be able to
It seems to me that one of the problems with PHP is that you have to
include code in your HTML pages. Even with the cleanest design, you
end up with HTML that looks like this:
Hello, . Your last login was .
This is ok, but it seems to me that java taglibs provide a more
elegant way to do th
Try the current 4.0.7 release candidates. There were some define()
related issues in prior versions. Also, in PHP 4 you don't need those
defines to protect from multiple inclusion. You can simply use
include_once
-Rasmus
On Mon, 10 Sep 2001, Doug Farmer wrote:
>
> I'm doing the following:
>
This is a forwarded message
From: Badger <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Monday, September 10, 2001, 11:34:45 AM
Subject: [PHP] Ramesus HELP ! Fwd: [PHP] mail() ERROR - WHY, WHY, WHY
===8<==Original message text===
This is a forwarded message
From: Badger <
On 2001 September? 10 ,Monday 18:56, Thomas Watson wrote:
>
> session_start();
> session_register("test");
> $test = "something";
>
> function foo() {
> print($HTTP_SESSION_VARS["test"] . "\n");
> }
>
> foo();
> print($HTTP_SESSION_VARS["test"] . "\n");
>
> ?>
>
> Click here
>
Hey,
Don't bitch about my grammar, I was in a hurry when writing this
script...
Bad2da / efnet #php
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: den 10 september 2001 17:50
To: [EMAIL PROTECTED]
Subject: [PHP] Code Red Catcher
Hi again, Everyone:
I didn
I've got PHP running under 3 environments (sort of).
LinuxPPC(Mac) with Apache and MySQL
NT with IIS4 and Lasso/Filemaker (not quite working yet)
NT with Apache and MySQL.
Installation was very easy.
George P in Edinburgh
- Original Message -
From: "nayco" <[EMAIL PROTECTED]>
To: <[EMAI
I'm attempting to write a script to download files from a ftp server.
Basically what will need to be done is this. The website will have a
searchable database and once the selected items are found will have a
download link. From this I would like to click on the download link and
sent that to
Thanks. I ran some further tests and came to the same conclusion. My test
showed that the constant was defined even though in theory it should be a
new request.
Since this is a production system, I don't want to go with a release
candidate. I'm going to do a switchover to "include_once".
"
be careful, i guess some Web-browsers will not accept it ( all the
syntax-checkers like Opera )
(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr
- Original Message -
From: Ken <[EMAIL PROTECTED]>
To: Steve Edberg <[EMAIL PROTECTED]>
Cc
Hi! friend,
I had one html form .
In that i had 5 inputs.
First option is a select box.
If the selected item is Mobile then only i want to display second and
third input boxes. Otherwise i want to hide those two options.
How can i endure that?
Please give the solution to this proble
101 - 175 of 175 matches
Mail list logo