, which
would require a u/p stored in mysql, preferably in md5 format. I know I'll
have to do a lot of customization to get it to integrate into my site, but
I'm looking for a solid script that I need to tweak the least. Any
suggestions?
Thanks,
Chad Day
--
PHP General Mailing List (http
I'm trying to get weather channel information without using their form to
submit the zip code .. the url format is :
http://oap.weather.com/fcgi-bin/oap/generate_magnet?loc_id=$ZIPcode=689861;
destination=$ZIP
so I tried:
$weatherfile =
On my website there are a couple places where people can sign up ..
The querys after the sign up process look like
$blahblah = query(insert firstname lastname) values (blah blah blah)
$userid = mysql_insert_id($blahblah);
$insertintoothertable = query(userid, blah blah blah) etc.
it then uses
This is with PHP 4.2 and register_globals off.
I am setting cookies and starting a session in the following fashion:
setcookie(EMAILADDR, $row[EMAIL], time()+2592000, '/', .$dn);
where $dn = mydomain.com
I want the cookies accessible sitewide .. at www.mydomain.com, mydomain.com,
Following up from Friday.. no replies over the weekend.. can anyone help?
Thanks,
Chad
-Original Message-
From: Chad Day [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 07, 2003 3:02 PM
To: php general
Subject: [PHP] setcookie() in various browsers..
This is with PHP 4.2
if (!isset($startlimit)) {
$startlimit = 0;
}
$endlimit = $startlimit + 10;
$yourquery = your query data LIMIT $startlimit, $endlimit
that should give you enough insight on how to work it.
Chad
-Original Message-
From: Daniel Page [mailto:[EMAIL PROTECTED]]
Sent: Friday,
I'm struggling with array_multisort, was hoping someone could give me some
help.
I have a multidim array, such as:
$myarray[0][FIRSTNAME] = JOE
$myarray[1][FIRSTNAME] = TIM
$myarray[2][FIRSTNAME] = BOB
$myarray[0][LASTNAME] = SMITH
$myarray[1][LASTNAME] = BROWN
$myarray[2][LASTNAME] = JONES
Is it possible to use array_sum to add up values in multidimensional arrays?
I have an array like:
$array[0][VALUE] = 10;
$array[1][VALUE] = 8;
$array[2][VALUE] = 5;
$array[0][OTHERVALUE] = 20;
$array[1][OTHERVALUE] = 15;
$array[2][OTHERVALUE] = 9;
Thanks,
Chad
--
PHP General Mailing List
I want to give my users the ability to submit a URL to a database, then when
they pull up their page, their photo is included .. what I'm worried about
is them pointing the link to some malicious code or something..
Obviously I can validate the file extension (.gif or .jpg) .. and I'm going
to
I'm googling around for template tutorials and such after seeing a link to
the Smarty template engine .. can anyone point me to any particularly good
ones? I've always been going with the 'one-file' approach .. which I think
it's time I changed.
Thanks,
Chad
--
PHP General Mailing List
Just wondering what people are using/recommend out there.. I'm going to be
getting a merchant account and let people purchase services through my
website on a secure server, all in PHP. What concerns me is this archived
post I came across:
?
I use PayPal. Does not require a merchant account. PHP payment interface
and interaction is easy
to implement. Via HTML in your webpage, you pass to PayPal the URL of the
PHP script to be executed
when a payment is received.
- Original Message -
From: Chad Day [EMAIL PROTECTED]
To: php
I was trying to find a script to do round robin pairings for a sports
schedule generator.. I was able to come across one in Perl, and am in the
process of trying to convert it to PHP, but since my perl knowledge is a bit
(well, a lot) lacking, I was hoping someone could help..
Perl script:
You can't have any text output to the browser before a redirect. Make sure
you have nothing abouve line 58 echoing out text (specifically whatever is
in line 2, judging by your error) .. I believe I've had the problem when
I've included a file where the 1st line was blank, so you may want to
-
From: Chad Day [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 30, 2002 10:57 AM
To: php general
Subject: [PHP] Round robin script revisited..
I was trying to find a script to do round robin pairings for a sports
schedule generator.. I was able to come across one in Perl, and am in the
process
, $last_team);
if ($even) {
array_push($teamarray, $last_team_save);
}
Hope this helps anyone else who needs it.
Chad
-Original Message-
From: Chad Day [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 30, 2002 2:03 PM
To: php general
Subject: RE: [PHP] Round robin
far in some cases with
ceil).
Perhaps this function I found is just not the right way to go about it, but
if anyone has any more insight, it's greatly appreciated.
Chad
-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 27, 2002 2:48 AM
To: Chad Day
I found this function in the list archives while searching on how to find
the number of a weekday (say, Tuesdays) between 2 dates..
function weekdaysBetween ($timestamp1, $timestamp2, $weekday)
{
return floor(intval(($timestamp2 - $timestamp1) / 86400) / 7)
+ ((date('w',
Not sure if this is possible, and I haven't turned up what I'm looking for
in my searches yet..
I am running PHP on a FreeBSD box .. I need to create an Access database,
fill it in with some data, and have a client download it (as the software
the client is using only imports mdb files). Is this
:30 PM
To: Chad Day; php general
Subject: RE: [PHP] Cookie handling, NS 4.x?
--- Chad Day [EMAIL PROTECTED] wrote:
I'm not sure how this would matter since the cookie is
never set at all.. it's not an issue of it reading the
cookie, as it can't read what is never set. I'll give
it a shot when I
. :(
Chad
-Original Message-
From: Jaime Bozza [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 9:07 AM
To: 'Chad Day'
Cc: 'php general'
Subject: RE: [PHP] Cookie handling, NS 4.x?
Hello,
By any chance, is your website named http://domain.com or is it
http://www.domain.com
, 2002 9:33 AM
To: 'Chad Day'
Cc: 'php general'
Subject: RE: [PHP] Cookie handling, NS 4.x?
The original cookie specifications required that the domain in the
cookie has at least 2 (or 3 for domains not in the primary tlds) periods
in it. (So as to stop someone from using .com, .edu, etc...)
So
, and I can continue using Header: calls ..
hmm.
Thanks for all the help, Jaime and Chris, much appreciated.
Chad
-Original Message-
From: Jaime Bozza [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 10:22 AM
To: 'Chad Day'
Cc: 'php general'
Subject: RE: [PHP] Cookie handling, NS 4
I am having a fairly confusing problem with setcookie() in NS 4.x.
My script:
nscookie.php:
setcookie(NSUSERNAME, 'cday', time()+2592000, '/', .mydomain.com);
Header(Location: nscookie2.php);
exit();
nscookie2.php:
echo $_COOKIE[NSUSERNAME];
In IE (all versions I have tested), this works
, December 09, 2002 4:31 PM
To: Chad Day; php general
Subject: Re: [PHP] Cookie handling, NS 4.x?
--- Chad Day [EMAIL PROTECTED] wrote:
I am having a fairly confusing problem with setcookie()
in NS 4.x.
My script:
nscookie.php:
setcookie(NSUSERNAME, 'cday', time()+2592000, '/',
.mydomain.com
I'm not sure why this isn't working, been banging my head at it for a couple
hours now.
I have a file (index.php), which calls a function that draws the header to
my page.
Inside that function (site_header), is an include to a file (menu.php) which
draws dynamic javascript menus based on
cookie
Has anyone written any sort of pairing algorithm for a round robin sports
schedule, or something similar? I couldn't find anything in the archives
surprisingly, and I'm looking around google and not turning up much except
some PDFs and white papers addressing the mathmatical complications of it.
12:19 PM
To: Chad Day
Subject: Re: [PHP] Pairing algorithm?
Hi
Never Seen it in php. There are many variants, mostly depending on your
needs.
Do you have the algorithm you want in pseudo code?
Op maandag 12 augustus 2002 16:24, schreef Chad Day:
Has anyone written any sort of pairing
I think something is wrong with the way I am calling ldap_modify, but I'm
not sure exactly what, from the scripts and tutorials I've been looking
at/experimenting with:
$ds=ldap_connect(online-leagues.com);
if ($ds) {
$r=ldap_bind($ds, 'username', 'password');
/ldapform.php on line 31
Chad
-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 01, 2002 9:41 AM
To: Chad Day
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] ldap_modify parameters?
I think your problem is that you are passing the output of
ldap_get_entries
Simple build, no real complicated configure options
(--with-mysql, --with-apxs2..) ..
During make:
php_functions.c:93: syntax error
*** Error code 1
Stop in /usr/local/php-4.2.2/sapi/apache2filter.
etc
etc
Any idea what the problem would be? I googled around for a little and heard
there
working. :\
Chad
-Original Message-
From: Tech Support [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 25, 2002 2:49 PM
To: Chad Day
Subject: Re: [PHP] FreeBSD 4.6 / PHP 4.2.2 / Apache 2.0.39 install
trouble
Without seeing exactly what steps you took in building both apache and php
it would
I asked something similar a little while ago, but didn't do a good job
clarifying.
What I'm looking to do is when a user logs in, I start up the session.. I
then have the registered session var to verify they are authenticated as
they move throughout the site.
Now, when they close the browser
Anyone? Can someone at least point me to some web article for
recommendations? I saw some examples where a password variable was stored,
but is that really safe (as long as I MD5 it first?)
Chad
-Original Message-
From: Chad Day [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 16, 2002
I am a little confused about storing stuff in cookies/sessions and how to
prevent spoofing of them.
A user logs in, his e-mail address or user id and password(md5'ed) is
checked against my database.
Assuming it matches, I then set a cookie with the users id + email.
What is to stop someone
Ok.. what I have is a database of first names and last names, and some other
columns that don't matter here.
A form is presented to a user, lets them enter a bunch of names, attributes
of the person, etc.
After submission, each record is checked against the current database to see
if the name
I'm trying to get data from my MySQL database into Excel using PHP. I know
and I am doing it right now by generating a CSV file, but is there any way I
can do formatting, like make certain cells bold, etc etc? Is there a list
of codes somewhere I can use to put before my field output to make a
John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 11:47 AM
To: Martin Lucas; 'Chad Day'; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP to Excel?
The layout on that site is so annoying. Yeah, it looks pretty, but it's
annoying. It's PHP2Excel BiffWriter that your looking
I'm looking for PHP/MySQL based mailing list software for a project I'm
doing.. I plan on hosting a bunch of virtual domains and having to set up
mailing lists for all of them, and I don't want to go installing a new copy
of the software for each virtual domain. The rest of the site is in PHP
php.ini didn't exist before apparently on this server I'm on.. or rather, it
was a 0 byte file.
Thanks, Rasmus.
Chad
-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 02, 2002 2:58 PM
To: Chad Day
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Problems
reads:
'./configure' '--with-mysql' '--with-apxs'
but I know I did
./configure --with-mysql=/usr/local --with-apxs=/mypathtoapxs etc etc ..
Still really confused..
Chad
-Original Message-
From: Chad Day [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 02, 2002 2:52 PM
To: Rasmus Lerdorf
Cc
I'm trying to read in a 1x1 pixel file and display it, basically to assist
in setting 3rd party cookies (our other affiliated sites that don't follow
under the same domain.. it's really sloppily set up, but thats another
story).. The problem I have is the script is just hanging, sits there and
-
From: karthik [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 08, 2001 1:08 AM
To: Chad Day
Subject: Re: [PHP] Session problem
Hi,
Have u tried $HTTP_SESSION_VARS[NAME] ?
Try it. I am sure it will work.
Karthik
- Original Message -
From: Chad Day [EMAIL PROTECTED]
To: mike cullerton
To: [EMAIL PROTECTED]
Cc: 'Chad Day'
Subject: RE: [PHP] Session problem
On Wednesday, August 08, 2001 at 9:16 AM, Chad Day said:
I wish it did.
Still the same problem.
?php
session_start();
global $count;
session_register (count);
$count++;
?
Hello visitor, you have seen this page ?php
,
Bjorn Van Simaeys
www.bvsenterprises.com
--- Chad Day [EMAIL PROTECTED] wrote:
Nope. Same problem. I'm seriously thinking there's
a bug in the version of
PHP I am running at this point, but I searched
php.net and found no mention
of anything ..
Chad
-Original Message-
From
Still not working. My script is -exactly- as you have it below, and I
believe I've tried that before.
(begins pulling out hair)
Chad
-Original Message-
From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 08, 2001 2:31 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP]
Message-
From: Chad Day [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 08, 2001 2:36 PM
To: Johnson, Kirk; [EMAIL PROTECTED]
Subject: RE: [PHP] Session problem
Still not working. My script is -exactly- as you have it below, and I
believe I've tried that before.
(begins pulling out hair
I tried this, I still have the same problem. Is this a bug in the version
of PHP I am running?
Chad
-Original Message-
From: mike cullerton [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 06, 2001 4:58 PM
To: Chad Day; [EMAIL PROTECTED]
Subject: Re: [PHP] Session problem
i would try
forkani [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 07, 2001 9:37 AM
To: Chad Day
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Session problem
oh i forgot!!!
you have to put this at the beginning of your page
?php
session_start();
?
indeed it's not working properly,
first of all please make sur
PHP 4.0.2 ..
I have a very basic script, gets the user's name, registers it, then
displays Welcome, $NAME. $NAME is the session registered name.
If I constantly reload that page that says Welcome, sometimes $NAME appears,
sometimes not. Completely random. It just loses track of the
Here's a function I use on a text field..
function activateUrls( $s ) {
$o = '';
while ($s != '') {
$url = '';
$temp = split('://', $s, 2);
if (count($temp)1) { # '://' found; now extract schema
$s = $temp[1];
$temp2 = split('[^[:alpha:]]', strrev($temp[0]), 2);
I have a chunk of code in a webpage that works like this, to rotate some
ads.. :
if ($row = mysql_fetch_array($getads)) {
do {
$POS = $row[LASTPOS];
$ID = $row[ID];
$POS++;
if ($POS
I have to use addslashes on a string of mine so I can use it in a javascript
function, so that when a link is clicked, a html textarea box is populated
with that string.
The problem I have is that if there are line breaks in the string, the
br's seem to get created when addslashes is run on the
I'm trying to pull a string from a database to use in a javascript
function.. but it's doing line breaks on me, which in turn messes up the
javascript.
The string in the mysql db is like:
kjdsakjadkbrskjdksbrbrkjkdfjdfkjfd
When I pull it out, it becomes:
kjdsakjadk
br
skjdks
br
br
kjkdfjdfkjfd
]);
$OVERLIBBED = str_replace(chr(13), , $RESPONSE);
$OVERLIBBED = str_replace(chr(10), , $OVERLIBBED);
is what worked for me ..
Thanks all,
Chad
-Original Message-
From: Steve Edberg [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 06, 2001 4:29 PM
To: Chad Day; [EMAIL PROTECTED
PROTECTED],
[EMAIL PROTECTED] (Chad Day) wrote:
$BLAH = round($BLAH, 2);
Spits out a wrong parameter error. I've tried quotes around the variable,
the parameter, and any combinations, but it still pukes on me. Why can't
I
specify a precision?
According to the manual, the second parameter is only
I'm trying a simple round in php4 and having problems .. rounding to 2
decimal places..
$BLAH = round($BLAH, 2);
Spits out a wrong parameter error. I've tried quotes around the variable,
the parameter, and any combinations, but it still pukes on me. Why can't I
specify a precision?
Thanks,
I'm submitting a form to a search page that performs different searches
based on what engine was selected. One of these searches is restricted, and
runs a function that checks for a cookie. If the user has no cookie, they
are redirected to a login page.
I've used echo tests to make sure the
all the header() calls. Hitting a
header() does not end execution of the script, so without the exit() the
last header() that gets called is the one that actually occurs.
Kirk
-Original Message-
From: Chad Day [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 9:13 AM
To: Php
I'm trying to write a script to ftp the contents of one directory structure
onto another server.. I'm having problems recursing the directories, either
it a) doesn't do it or b) gets stuck in a loop.
Here's the function I'm having the problem with..
function recurseUp()
{
global
I'm horrible at regex's, maybe someone can help me out.
What I'm trying to do is parse a string in the format: number-number-number
(ex. 1-23123-312039128)
I need to pull that second number, regardless of length
This code returns nothing:
$part = ereg("([0-9]{1})-([0-9])-", $f, $regs);
but
What I'm trying to do is specify a URL in a form, and then take that URL,
put its contents into a variable, and mail it out in an e-mail message with
the body of the message being that URL. I haven't gotten anywhere so far,
just getting blank messages for the body.. can anyone point me in the
Various things, but I finally hit upon something that worked. Thanks
anyway.
Chad
-Original Message-
From: Rodney J. Woodruff [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 11, 2001 5:03 PM
To: Chad Day
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Including a URL for mailing..
What
Your momma pays full commission!
(sorry, couldn't resist)
As far as hacking is concerned, I wouldn't know my arse from my elbow :)
James
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact
64 matches
Mail list logo