put something in your script like
if($_SESSION['authed'] == true)
$user = new User($_SESSION['userId']);
or something similar.
Jason
Jed R. Brubaker [EMAIL PROTECTED] wrote:
Hi all! I could use some perspective on a project that I am currently
working on.
I am trying to utilize
in, but then the database calls would still have to be made on
each page.
Thanks for the idea - any others?
Jason Davidson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
put something in your script like
if($_SESSION['authed'] == true)
$user = new User($_SESSION['userId
post some code please.
Jason
Brad Ciszewski [EMAIL PROTECTED] wrote:
I am having troubles with a script im trying to write. I was wondering
if anyone could help me. The script needs to upload 2 files to a
directory, and have a field for a name, which will then figure out the
URLs of the
i think for the ease of use, 1 db call per page is minimal, especially
sinse we are talking about some small fields here. THe db is local to
the webserver, so really, whats the problem.
Jason
Ed Lazor [EMAIL PROTECTED] wrote:
-Original Message-
I don't know - is it?
I would
Im sure you should be returning a value in your constructor at all?? Ill
check the manual, but i dont think ive ever seen a constructor return
anything, doesnt sound right.. Let me check.
Jason
Jed R. Brubaker [EMAIL PROTECTED] wrote:
Hi all. As the subject suggests, I am using PHP4 and am
Yup, i typo'd .. should have read, Im not sure you should be returning a
value..
Jason
Matthew Weier O'Phinney [EMAIL PROTECTED] wrote:
* Jason Davidson [EMAIL PROTECTED]:
Im sure you should be returning a value in your constructor at all?? Ill
check the manual, but i dont think ive
Yup, confused me...
what is it for?
J
Dave Carrera [EMAIL PROTECTED] wrote:
Hi List,
I have a qty posted via a form field, lets say 46.
In my mysql table I have two rows which I want to reduce their qty fields.
1 row has a qty of say 13 and the second has a qty of 50, making 63 in
which has a qty value
Keep going til $newval = 0 exit.
Probably wont work as I have it laid out here but I think the basic logic
is ok.
Hers goes :-)
Dave Carrera
--
UK Web Hosting @ http://www.ephgroup.com
-Original Message-
From: Jason Davidson [mailto:[EMAIL
whats the error, are there any matching fields for the columns
eventetail.event and event.id?
Jason
Karl-Heinz Schulz [EMAIL PROTECTED] wrote:
Why does this query not work?
It should only show the eventdetails for the shown event.
Not like asp's application() there isnt. You can use phps $_SESSION
var, which is similar to asps Session(). I dont think php runs the
same asp, in order for asp's application vars to work, you would think
that asp must be running in some state continuously, and i dont think
php does that. I
Im not so sure asp is completely stateless is it. The application var
will hold a var as long as the server is running, for any visitor. The
var doesnt need to be set each page load either..
eg. Application(counter).. you can add to the counter on any page, by
any visitor, at any time, and it
Im reading up a little on it, from the msdn site, make your ASP pages
stateless if possible, relying on Session or Application variables for
transient state only Interesting, but not conculsive. ASP sucks
anyways..
Bottom line, PHP is definately stateless, and there is no Application()
woohoo indexes kick a$$.. at the expense of mem though :)
J
Ed Lazor [EMAIL PROTECTED] wrote:
I added more indexes. The 20 minute report just took 40 seconds *grin*
Thanks Everyone,
Ed
-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED]
Sent: Tuesday,
if you have /var/www/html/ defined as documentroot, as you mentioend
then outside is anything outside the directory html/ so /var/www/php/
could hold all your php files, and be outside the docroot.
JAson
Aaron Todd [EMAIL PROTECTED] wrote:
When you say outside of the webroot do you mean.
what is it that you need... for it to calculate the fields...
just get the value of the fields with..
document.FORMNAME.FIELDNAME.value
make sure your dealing with integers for doing the math, the value will
be a string initially.. use parseInt or parseDouble or something ..
Jason
Aris
Does IE even support PNG transparncy properly anyways??? maybe thats the
issue here?
Jason
Kevin [EMAIL PROTECTED] wrote:
Hi,
I am having PHP Version 4.3.4 with GD 2.0.15 compatible and PNG support
enabled.
My problem with the following code is that the image produced be this code
is
I would use IN, or even BETWEEN if there exists such a function...
Jay's example is much cleaner and readable.
Jason
Jay Blanchard [EMAIL PROTECTED] wrote:
[snip]
Tis SQL
SELECT value
FROM element_values
WHERE user = $user_id
AND(element=48
OR element=52
OR and so on)
your only getting one row beucase your only pulling one row from the
array. You need to loop thru the rows to grab them all.
Jason
Brian Tully [EMAIL PROTECTED] wrote:
on 8/6/04 12:28 PM, Jay Blanchard at [EMAIL PROTECTED]
wrote:
[snip]
Tis SQL
SELECT value
FROM
Most of the Verify MEssage emails i get come from tgpnexus.com .. they
are most certainly not from the spoofed address they claim.
Jason
Chris [EMAIL PROTECTED] wrote:
Josh Acecool M wrote:
I've requested that you do not contact me again.
http://www.acecoolco.com/legal.php
you could remove all br tags, \n \r chars from the string. use
$string = str_replace(array('\r','\n','br'), '', $string);
or something similar
Jason
Jed R. Brubaker [EMAIL PROTECTED] wrote:
Hey all! Glad you are here.
I have a question that is confusing me a bit. I am trying to output a
you could use css too now that i think of it.. wrap your stirng in some
div tag or somehting and use white-space: nowrap; or something like
that.
Jason
[EMAIL PROTECTED] wrote:
Jed R. Brubaker wrote:
Hey all! Glad you are here.
I have a question that is confusing me a bit. I am trying
I created a simpleAuth script that handles authentication, then sets up
a session, there is a method that i called requireAuth(); i call this
method on any page i want restricted to the members, it checks the for
the valid sessoin, and also checks the time of login, and calls my
destoy method if
Unless student is set somewhere else that wont work.. you need the form
to submit before the text field 'student' sets a var named student.
One way to do such, without all the window formating is to just submit
the form to the page you want. and target=_new in the form tag.
other than that,
Its possible norton firewall OR your browser is altering the headers.
how are you redirecting, norton may not allow for some kind of
redirects either. Try turning norton off, and visiting the page :)
Jason
Shaun [EMAIL PROTECTED] wrote:
Hi,
I seem to have problems redirecting pages
is it possbile $this-year isnt what you expect?
Jason
Jon Bertsch [EMAIL PROTECTED] wrote:
Hi all,
I have found a problem using the str_replace() function in PHP5. Over this
past weekend we switched our production server to php5.0.0 running on
apache 1.3.31 on SUSE9.1. Our
How about
print_r($_REQUEST);
Dan Phiffer [EMAIL PROTECTED] wrote:
Craig Donnelly wrote:
Show the code you are using...
I'm having the same problem. Here is a test script that prints Array()
regardless of what you enter and submit with the form:
-- test.php --
?php
Yup, i understand not in php 5, there was some large OO changes in php
5, which is why i asked about $this-year. Ive been using php 5 for the
last year, and havent had a problem with str_replace, and have used it a
fair amount for loading email templates.
So when you look at the source, the
My mistake on $this_year.
Jon Bertsch [EMAIL PROTECTED] wrote:
Jason,
This code is not using any OO the variable is $this_year not $this-year.
Running it under php5 on my dev box the string replace function works and
replaces the text as expected.
Jon Bertsch
--
PHP
you could loop thru the array, and using a nested loop, test each value
against all other values.. and keep ones that match in a new array.
But as mentioned, SQL would be easier.
Jason
Curt Zirzow [EMAIL PROTECTED] wrote:
* Thus wrote Adam Williams:
for example if I have an array:
You can check out how exceptions are handled in Java or C++ as well,
they all sorta work the same, you may find more complete docs for
them.
Jason
On 30 Jul 2004 14:58:59 -, Matthew Weier O'Phinney
[EMAIL PROTECTED] wrote:
I've done some reading on the ZE2 exception handling, but I'm not
http://ca3.php.net/manual/en/function.call-user-func.php ?
Jason
On Thu, 29 Jul 2004 17:11:50 -0500, Julio Sergio Santana
[EMAIL PROTECTED] wrote:
I need to record the names of functions, and then use them later.
Recently I found the following example within the on-line documentation:
?php
Hey, you can do what your looking for with phps gd comiled in. You
may need to add jpg, gif libs if you dont already have them. Check GD
on the php site, there are plenty of examples that cover exactly what
your looking for i think.
Jason
On Wed, 28 Jul 2004 08:05:52 -0700, Brian Dunning
I beleive there is some session timeout setting in php.ini .. search
for session or expire or timeout in that file.
Jason
On Wed, 28 Jul 2004 20:18:21 +0200, Jordi Canals [EMAIL PROTECTED] wrote:
Hi all,
I'm dealing with sessions in a project. Here people are editing some
documents
check the manual for list. It mentions using only numerical array
indices for list. There is a warning on it even i beleive.
Jason
On Wed, 28 Jul 2004 20:47:37 -0700, Daevid Vincent [EMAIL PROTECTED] wrote:
Linux. PHP5.
Why does this fail when using an array element, but using a variable
PROTECTED] wrote:
Thanks for that Jason
Any suggestions on how I would retrieve the next to last entry...? The last
time prior to this session that the user logged in...?
--
-
Michael Mason
Arras People
www.arraspeople.co.uk
-
Jason
Might be easier to use session vars to track whatever it is your tracking.
Jason
On Tue, 27 Jul 2004 11:11:31 -0400, Mike R [EMAIL PROTECTED] wrote:
Does anyone know if it is possible to pass a variable in the URL to the
return page when using paypal?
Meaning, when someone is done a
I would put a timelimit on the session, create a session var called
time, or loginTime or something, and compare it to time() with php,
give a leyway of an hour or something. This is a standard securty
measure to prevent people from leaving the pc with a session running
all day, and someone else
I would simply build the array more specifically, so that it doesnt
include things you dont want.
Jason
On Tue, 27 Jul 2004 16:20:02 -0500, Alex Hogan
[EMAIL PROTECTED] wrote:
Hi All,
I have a page where I'm collecting answers from a series of questions.
The questions are entered into the
i keep the string intact as well, for that exact reason, when you want
to edit dynamically, i dont want all sorts of html tags in my
textarea. So, the solution i found works, is to use the php funtion
nl2br(). use that when displaying the info in html., that way you dont
actually change the
if you mean remove the new line characters, then a str_replace('\n',
'', $textbody); should be sufficient. If thats not what you mean,
please clarify.
Jason
On Tue, 27 Jul 2004 18:29:42 -0500, Raúl Castro [EMAIL PROTECTED] wrote:
Hello,
I have a form with a textarea field, I'm trying to
If you have a users table, you could add a field to it that contains
the last login datetime. and query that table for datetimes that are
less then your session timeout (if one exists). Of coarse, you would
have to update that table when a user logs in.
Jason
On Tue, 27 Jul 2004 19:55:49
Definately check out strtotime() function, way easier than adding up
the seconds of a timestamp, or breaking apart a getdate array.
Jason
On Wed, 28 Jul 2004 11:30:42 +0800, Louie Miranda [EMAIL PROTECTED] wrote:
I can't figure how could i add +7 more days on the DD (Day) value. My
problem is,
hey, just take the single quotes around the word logname out and you
should be ok.
Jason
On Mon, 26 Jul 2004 12:58:28 +0100, Harlequin
[EMAIL PROTECTED] wrote:
Could someone please help me with my syntax here...?
$MembersDataQry = SELECT * FROM MembersData
WHERE
?
Thanks, Michael
Jason Davidson [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
If there is no error, check the values of all the vars and array
ellements in your logic for the first method. Make sure its actually
getting to the point where it instantiates the new
as mentioned already, use a column in the table to order the query and
then use LIMIT to only to return one record. Best columns to use would
be an auto_increment or a datetime field type.
Jason
On Mon, 26 Jul 2004 18:27:25 +0100, Harlequin
[EMAIL PROTECTED] wrote:
I would like to retrieve
Hey, an alternative to your switch statement, is to have an
associative array with the full State names in it like this ...
$states = array('MI'='Michigan'); and so forth.
then just uses it in your html.. $states['$state'];
Jason
On Mon, 26 Jul 2004 15:28:11 -0400, Tom Ray [Lists]
[EMAIL
Hey, keep trying, you can use php to generate JS to send to the
browser, its especially usefull for form validation as you said. Make
sure your JS is correct, and within script tags. Start with simple
JS, like, alert(i worked); then start adding one piece at a time
and constantly checking to
single quote 'y'
Jason
On Sun, 25 Jul 2004 11:05:23 -0400, Karl-Heinz Schulz
[EMAIL PROTECTED] wrote:
I have a simple question (not for me).
Why does this query does not work?
$links_query = mysql_query(select id, inserted, title, information,
international from links WHERE
If there is no error, check the values of all the vars and array
ellements in your logic for the first method. Make sure its actually
getting to the point where it instantiates the new object.
Jason
On Sun, 25 Jul 2004 19:36:44 +0200, Michael Ochs [EMAIL PROTECTED] wrote:
Hi,
I try to load
print out all the values of the vars your comparing often youll
find one of them is not what your expecting
Jason
On Sat, 24 Jul 2004 11:05:06 -0500, Robb Kerr
[EMAIL PROTECTED] wrote:
What's wrong with this syntax. I just can't see my mistake.
if ($vBkgrndImage == AnswerPage) {
if
OR is also bitwise is it not?
Jason
On Sat, 24 Jul 2004 21:23:13 +0400, Stan F [EMAIL PROTECTED] wrote:
Operations OR and || have different execution priorities. I'd prefer || as
it's more important so not so many parentheses needed to ensure the order
of interpretation is exactly what u
whats in UserId var.. any spaces or nonword chars.. if so, quote it.
Jason
On Sat, 24 Jul 2004 19:49:04 +0100, Harlequin
[EMAIL PROTECTED] wrote:
I've been working on a query to retrieve a user's data based on their UserID
that is stored in a variable $_SESSION['logname'] which underneath I
Sorry, let me clearify.. unless UserId is an integer, quote it !!
jason
On Sat, 24 Jul 2004 12:03:54 -0700, Jason Davidson
[EMAIL PROTECTED] wrote:
whats in UserId var.. any spaces or nonword chars.. if so, quote it.
Jason
On Sat, 24 Jul 2004 19:49:04 +0100, Harlequin
[EMAIL
ah right.. :)
Jason
On Sat, 24 Jul 2004 19:50:17 +, Curt Zirzow
[EMAIL PROTECTED] wrote:
* Thus wrote Jason Davidson:
OR is also bitwise is it not?
No, | is bitwise
Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about
It may be a matter of opinion, but i beleive this is a poor method of
doing what your doing. I would get my values thru $_REQUEST and use
addslashes to escape what needs to be escaped, and i would write my
SQL query with full column listing and string values in quotes. eg..
INSERT INTO table
You can either hard code the associations, with something like a
swtich statement, or i suppose loop thru one array, adding a key value
pair of the numbers = background images. Or, you could create a
table called Backgrounds, give them an id which you store in the
existing field of your db, and
Gosse [EMAIL PROTECTED] wrote:
snip
Jason Davidson wrote:
Oh, it was a one time error, strange, youve never had this error
before, and this definately is the php.ini file your using, ie, there
isnt another somewhere thats getting used?
/snip
Quothe the terminal:
[EMAIL PROTECTED
Youll find knowing both languages will be handy in development. Im
not a huge fan of having to program in perl, however, at times, its
far easier to use perl than any other language. An example of that,
would be to create a small server client program that possibly parses
or extrapolates data
Why not just use some javascript to put the new value right into the
drop down, provided the db query went thru sucessfully, this shouldnt
be an issue right. on the popup window, after you insert the new
record, get the last inserted id, use php then to generate some JS
that will push that new
they are 2 seperate languages, completely. I dont beleive the 2
languages have any relation to eachother, possibly you can relate the
2 as serverside scripting languages.. but.. its still a stretch :)
see www.perl.org or php.net for history of the two.
Jason
On Wed, 21 Jul 2004 12:35:46 +0530,
Has anyone every wrote script too send a message to any of the popular
messenger services, i see there is a perl module for jabber, however,
im more interested in using php to send to .. msn, or yahoo, and
jabber of coarse :)
Jason
--
PHP General Mailing List (http://www.php.net/)
To
hey cool, thanks for the info
Jason
On Wed, 21 Jul 2004 18:15:12 -0300, Manuel Lemos [EMAIL PROTECTED] wrote:
Hello,
On 07/21/2004 04:00 PM, Jason Davidson wrote:
Has anyone every wrote script too send a message to any of the popular
messenger services, i see there is a perl module
you can set designmode on a iframe to make it editable if you like,
you can use javascript to use commands from the browser on the iframe
even. And textarea may have a value attribute, however the element is
meant to tag its displayed value from between the open and close tags.
Jason
On Tue, 20
PHP is serverside right, you dont need to patch or plugin Internet
Explorer.. you need to make sure apache and php are running properly
and together. Be sure your apache configuration has the appropriuate
directives, and that you either have a compiling in module, or a cgi
version running. check
php will evaluate vars in single quotes provided they are double
quoted outside them. The quoting in the query appears valid, i would
suggest debugging the sql firstly. (which i beleive was mentioned
already)
Jason
On Mon, 19 Jul 2004 12:20:33 -0400, Brent Baisley [EMAIL PROTECTED] wrote:
I
If you instantiate a child class, the parent class constructor is not
called, is there a reason for this? anyone know of plans to change
this at all,
the obvious workaround is to call the parents constructor inside the
childs constructor, but this seems kinda strange.
Jason
--
PHP General
joel boonstra [EMAIL PROTECTED] wrote:
On Tue, Mar 16, 2004 at 02:35:57PM +0200, Tommi Virtanen wrote:
How I can calculate following:
I have table:
id(int) start_date(date)end_date(date)
001 2004-03-10 2004-03-12
002
Check the manual to be sure, but it appears that you have the arguments
for the mail function in the wrong order .
mail(to, subject, msg, headers) ... i beleive is the correct order.
Jason
Will [EMAIL PROTECTED] wrote:
Hello All,
I am having a problem with sending a reply from a form. It
http://ca.php.net/manual/en/function.session-start.php
=?iso-8859-1?Q?Alberto_Garc=EDa_G=F3mez?= [EMAIL PROTECTED]
wrote:
Friends:
I need a good example to create a session and navigate an entire site with this
sessions. Also I need that sessions handle a three variables.
what is the code your using to try and retrieve the var.. are you using
$_REQUEST['equipment'];
jason
Martin S [EMAIL PROTECTED] wrote:
I have this in equip-lend-index.php and want to pass the variable
$equipment back to the same page:
PRINTtd valign=\top\Equipment: form
I think he meant.. the carrot after the delimiter
which means NOT.. like /[^a]/ means match anything thats not an 'a'
Jason
Justin Patrin [EMAIL PROTECTED] wrote:
Mike Mapsnac wrote:
Hello
I found this function online and want to understand how it works.
I don't understand /^ and
read about phps mysql_fetch_assoc in the manual.. this will explain what
your looking for.
http://ca.php.net/manual/en/function.mysql-fetch-array.php
Jason
Elliot J. Balanza [EMAIL PROTECTED] wrote:
Yes ok but how do I store it?
with array() how?
vamp
Raditha Dissanayake [EMAIL
i supplied the wrong link, sorry.. this is the right one..
http://ca.php.net/manual/en/function.mysql-fetch-assoc.php
Jason
Jason Davidson [EMAIL PROTECTED] wrote:
read about phps mysql_fetch_assoc in the manual.. this will explain what
your looking for.
http://ca.php.net/manual/en
Hey, would anyone know offhand, if its faster to create a temp array,
fill it via loop, and then set a class property to that array, or to
simply fill the class property via loop..
to clearify.
would the following example be faster or slower had i simply done
$this-myArray[$i] = $i;
class
Im fully aware of diffrent ways of doing it, my question is, in the 2
ways i mentioned, which is more efficient. Ill take the question to
the internals list. Thanks for your responses.
Jason
Chris W. Parker [EMAIL PROTECTED] wrote:
Luis Mirabal mailto:[EMAIL PROTECTED]
on Wednesday,
or just read the manual at mysql.com ..
Jay Blanchard [EMAIL PROTECTED] wrote:
[snip]
I just can't find the forum for any mysql.
[/snip]
http://www.mysql.com/doc/en/Mailing-list.html
[snip]
anyways maybe someone run into this kind of problem, i'm saving in a db
records of company
VARCHAR limit is 255 :)
mysql.com has great documentation.
Jason
Vincent DUPONT [EMAIL PROTECTED] wrote:
are you using a 'Text' or a 'varchar' column type?
I guess the max size for varchars is 4000; text should be larger
vincent
-Original Message-
From: Ben Ramsey
Coarse, i see after i post that you are talking about MSSql.. and not
mysql.. i may have posted a little to quickly.. sorry.
Jason
Jason Davidson [EMAIL PROTECTED] wrote:
VARCHAR limit is 255 :)
mysql.com has great documentation.
Jason
Vincent DUPONT [EMAIL PROTECTED] wrote
Hey, tools i like using are.
nedit - main editor i use
vi - for quick or network edits
apache - webserver
ive tried some of the ide's and other editors like kate, quantra and
such, and i constantly fall back to Nedit, for its simplicity. My only
feature request for nedit, would be tabbed
I read that the varchar size for ms sql is 8000 limit.
i also read that someone having a problem with it getting truncated
fixed his problem by using convert(text, $value) in the sql statement..
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
I think your best bet is to only show product titles, and possibly a bit
of the summary or something in the catalogue, then have the user click
the product to view full information on it.
this takes 2 db calls, one to load the limited info of all products, and
one to load all info on one product.
could create an array to hold the same session?
This may not at all be what your looking for, but ive used something
similar to this when building a wizard class to handle storing states
in wizard steps.
like
$_SESSION['mySessions']['WindowOne'] = array($userid, $loginTime, $etc)
you can post to the internals list.. they will respond fast. they are
good that way. :)
Jason
Erdener Gonenc [EMAIL PROTECTED] wrote:
Do anyone know who should I contact to report that bug?
I've already dropped a note to forums at Zend...
Thanks
--
PHP General Mailing List
request floods and such are not the responsability of the programmer is
it? Sounds more like a sys admin problem? i could be wrong.
Jason
Martin Nicholls [EMAIL PROTECTED] wrote:
I know somebody who coded a PHP script that attempts to prevent post
flooding and some other potential security
I definately agree with Rasmus, seperation will only cuase migration to
the advanced list anyways, you need 'advanced' users helping the
'less-advanced' users. This is the purpose of the list.
Jason
Rasmus Lerdorf [EMAIL PROTECTED] wrote:
On Fri, 5 Mar 2004, Galen wrote:
From my
Sounds like you want to have more of a discussion list rather than help
list.. which is not a bad idea, regardless of expertise.
Jason
Galen [EMAIL PROTECTED] wrote:
Hello All,
You do make some excellent points. Maybe an advanced list isn't the
greatest idea. But at least listen to what
\r\n is good :)
J
Raditha Dissanayake [EMAIL PROTECTED] wrote:
It's an often overlooked fact that you can pass additional headers in
the fourth parameter. I do belive you should use \n and not \r\n
then your code will look like
mail([EMAIL PROTECTED], object, $message,
From:
my thoughts exactly...
seems odd that your are updating a single table multiple times like
that.
Jason
Chris W. Parker [EMAIL PROTECTED] wrote:
Cory Berry mailto:[EMAIL PROTECTED]
on Friday, March 05, 2004 11:29 AM said:
Hello, I'm having difficulty dynamically creating a variable
what are the apps?
[EMAIL PROTECTED] wrote:
Rasmus,
Thanks for the positive response. That said.
We are looking for a few select/skilled Web Developers for a few
apps/projects that we want to create. The apps are not trivial, and should
take a good team of 5-6 developers 3-4 months of
101 - 189 of 189 matches
Mail list logo