This would certainly work, but I got a suggestion for using that i think will be a much cleaner solution.
Thanks!
- Original Message -
From: "Philip Hallstrom" <[EMAIL PROTECTED]>
To: "Jason Bell" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
x27;t need to worry about needing to determine
which variables exist.
- Original Message -
From: "Kevin Stone" <[EMAIL PROTECTED]>
To: "Jason Bell" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, April 11, 2002 3:44 PM
Subject: Re: [PHP] Variabl
are there wildcard characters for variables?
Lets say that I have a varable that always starts with $user but then has the 2 digit
user id attached to the end, so it could be $user12 or $user28
is there a way to grab these? sort of like in unix standards, where I could use user??
or user* ?
Actually, it sort of works for other browsers. It just isn't as cool the
window that is opened on netscape is just a normal bordered popup window,
with no toolbars.
- Original Message -
From: "Gaylen Fraley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 20, 2002 6
you can find a fairly decent PHP extension for ultra dev at the below link.
http://www.interakt.ro
oops... meant to send this to the list
- Original Message -
From: "Jason Bell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 17, 2002 10:27 AM
Subject: Re: [PHP] Class Function Issue
> Thanks for the tip. I tried that... I passed $HTTP_SESS
Hi! I'm building a class, and am trying to include an authorization function the
code works when used outside of the class, but when I put it inside the class, for
some reason my session variables won't get set. Am I attempting the impossible, or am
I missing something that I need to make
In your database, make the ID column AUTO_INCREMENT, and then simply don't
specify a value for it when you insert.
- Original Message -
From: "will hives" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 24, 2002 11:43 AM
Subject: [PHP] Increment help..please
> please
Just as DL Neil implied, your variables are outside the scope of the
function. set them global within your function.
See: http://www.php.net/manual/en/language.variables.scope.php
- Original Message -
From: "Tj Corley" <[EMAIL PROTECTED]>
To: "DL Neil" <[EMAIL PROTECTED]>
Cc: <[EMAIL PR
It basically comes down to speed. While there is nothing "Technicaly" wrong
with storing the images in the database, accessing the images will become
slower as the database gets larger, than if the files were stored on the
filesystem. Whether or not this degredation of performance is acceptable or
The PHP code is parsed and interpreted at the server level, and then returns
only the output to the browser. It is not possible to view PHP code via
"view source".
- Original Message -
From: "Phil Schwarzmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 16, 2002 1
as far as I know, PHP can't do that itself, however. if you had a
commandline utility that did the BIOS read for you, you should be able to
have PHP exec() out to it
- Original Message -
From: "Police Trainee" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Thursday, Janu
go take a look at some of the script archive pages like
http://www.hotscripts.com
I'm sure someone out there has made this already
- Original Message -
From: "Michael O'Neal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 09, 2002 2:56 PM
Subject: [PHP] Party/R
you might be better off triggering a back-end script to do that. the
script would have to have root privilegf es. I'm not sure if you can "become
root" within PHP, but if you trigger a shell script or perl script or
something, it can be set SUID to root or something please note that my
su
with PHP? is there another way you can recommend to me, or a tool
already existing that I can try? Would curl enable me to do this easier?
Thanks!
Jason Bell
What if I want to pad a number with zeros in the other direction? I.E:
524 becomes 00524
- Original Message -
From: "Christian Dechery" <[EMAIL PROTECTED]>
To: "Kurth Bemis" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, September 25, 2001 9:41 AM
Subject: Re: [PHP] 2 dec
Nope. I get it even if php-general is the only address I'm emailing..
- Original Message -
From: "Sheridan Saint-Michel" <[EMAIL PROTECTED]>
To: "Jason Bell" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, September 21, 2001 11:24 AM
Su
Hmmm Well, the *ONLY* time I get it is when I send email to
php-general
"NoWayMan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hey I got that message in trying to remove my address from a spammer's
> list. But I'm not subscribed to the php mailing
Every time I send an email to the list, I get a bounce-back. Below are the details...
anyone else see this?
who is [EMAIL PROTECTED]?
Reporting-MTA: dns; mail.aaz-netmarketing.com
Arrival-Date: Fri, 21 Sep 2001 19:02:32 +0200 (CEST)
Final-Recipient: rfc822; [EMAIL PROTECTED]
Action: failed
Thanks Mathew, Jason and Joseph for the reply.
I never thought that having a large function could be a bad thing.
I'll keep your tips in mind when writing functions from now on. Fortunatly,
the function I was refering to that was 100 lines is a one time use
function. It's only used to setup the
Here is a question, just for fun:
What is the biggest function (In terms of line count) you have ever written?
I just finished one that is 100 lines long. That is by far my biggest It's a
script initialization function that sets up database connectivity, creates all tables
necessary for my
Not to mention, it's a PHP bootcamp, not an HTML Web Design bootcamp. What
do the aesthetics of the site have to do with the backend?
I've recieved many excellent tips from richard in the past. I'm sure he is
qualified to teach PHP.
- Original Message -
From: "Erik H. Mathy" <[EMAIL PROT
hey, maybe if you post this 10 more times, someone will answer
it...
This is a good list, if someone has an answer, you will probably get it. You
don't need to post the same question multiple times. All that does is annoy
the hell out of people.
- Original Message -
From: "Wee Chua" <
Felix,
Just to save you the headache that I encountered, the column that you plan
to store your IP address in needs to be an unsigned integer when using
INET_ATON and INET_NTOA
If it's not, all addresses stored will come out as 127.0.0.0 (I think that
was what it was...).
Also, these are MySQL
Thanks lance and David for the reply. :)
Yes, I suspected as much, *BUT* let me explain what I am trying to do:
I have a script I am writing that uses a MySQL backend. I'm including an
initial configuration interface via the webbrowser. During initial
configuration, the user provides parameters
What is the *SIMPLEST* way to test connectivity to a database? Shouldnt there be a
mysql_connection_test command or something? :)
-Jason
or, assuming PHP4 is in use, you can do it a little cleaner, and use a
foreach loop:
foreach ($array as $value) {
print $value;
}
if you wanted the key names, as well as the value, you could use this:
foreach ($array as $key => $value) {
print "$key of \$array = $value";
}
- Origi
Thanks. I suppose really need to download the docs to my machine. :)
- Original Message -
From: "Scott" <[EMAIL PROTECTED]>
To: "Jason Bell" <[EMAIL PROTECTED]>; "PHP Users"
<[EMAIL PROTECTED]>
Sent: Tuesday, September 18, 2001 4:34 PM
John, someone did reply to you alread. here let me snip from that
email
oOoOoOoOoOoO Gerard Samuel Said: oOoOoOoOoOoO
check to see if the field where the info is going into is long enough.
ie varchar(50). anything more than 50 get cut off.
> being diplayed on the succeeding web pag
is it just me, or is php.net down right now?
All of us? WoW! Well, if we win, how do we decide who gets to go?
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 18, 2001 8:06 AM
Subject: [PHP] ...::: Vacation on us! :::...
> You have been specially selected to qualify for the followi
include loads the entire file. I do something similar with my functions
(Keep them in a seperate file, and include them when needed) I will usually
have multiple function files, grouped by function...
for example, I have one file for error reporting functions, one file for
authentication function
try this, untested, on the fly type solution. :)
foreach ($array as $key => $value) {
if (strlen($value) > 0) {
$FirstWithValue = $key;
break;
}
}
Now, $FirstWithValue should hold the key of the first element, so you could
then use $array[$FirstWithValue]
if yo
Here is how I send email, please note the From, and X-Sender line:
$recipient .= "$recipient";
$subject = "$SubjectLine";
$message .= "$YourMessageHere";
$message .= "$More MessageHere";
$headers .= "From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>\n";
$headers .= "X-Sender: <[EMAIL PROTECTED]>\n";
$h
Out of curiosity, why do you avoid having functions generate HTML? Is this
just personal preference, or is there some performance or other reason?
-Jason
- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "speedboy" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sund
check out www.mrtg.org for a pre-packaged solution, otherwise check out the
SNMP functions of PHP.
http://www.php.net/manual/en/ref.snmp.php
in either case, you'll need to install the snmp support from your win2000
installation disk.
/* SED asked: */
> This
Thanks for the reply Kirk!
> > case logout:
> >session_unset();
> >session_destroy();
> >$AuthErr = "Session Terminated";
> >break;
> >
> >
> > What is happening, is after the user authenticates and logs
> > in, everything
> > looks good, but whenever the user follows any link, t
-
From: "Jason Bell" <[EMAIL PROTECTED]>
To: "PHP Users" <[EMAIL PROTECTED]>
Sent: Thursday, September 13, 2001 3:12 PM
Subject: [PHP] session_unset & session_destroy being called outside of
logic.
Hello all! I am switching a variable to check if a user
Hello all! I am switching a variable to check if a user is logging in or logging
out. If the value of the variable is logout, I want the user to logout, i.e:
case logout:
session_unset();
session_destroy();
$AuthErr = "Session Terminated";
break;
What is happening, is after the u
PHP does not know what the user has selected in the first drop down.
You can either reload the page with the new value once the user has selected
the value for the first drop down list, and go from there, or use
Javascript.
- Original Message -
From: "Jared Mashburn" <[EMAIL PROTECTED]>
I want to add I have seen bindec() , and I think it's a cruel cruel joke
for it to only work with 31 bits, given that ip4 addresses are 32 bits. :}
- Original Message -
From: "Jason Bell" <[EMAIL PROTECTED]>
To: "PHP Users" <[EMAIL PROTECTED]>
ideas, thoughts or comments?
Thanks!
-Jason Bell
I believe I do what you are attempting to do, in pure PHP using a switch
statement and variables. It works, (check www.northpointless.org to see it
in action) but keep in mind my site is in early developement, so the menu
options aren't quite fleshed out at this time.:
function menu ($pos, $sub =
PHP Is server side. The form data, until it is submitted is client side.
If you need to manipulate the form data before processing it (i.e for
validation, etc) you can either build that logic into your processing code,
or have the form call an intermediate set of code that does what you need to
d
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
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
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
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
ok! I've been trying to figure this out, and I'm completely stumped! I've started from
scratch with a test script, here is my code:
Testing";
print $PHPSESSID;
print "\$sess_name is: $sess_name\$sess_auth is: $sess_auth";
if ($go) {
print "Go was initiated";
$sess_name = "BillyBob";
};
if (ses
IE has "Friendly Error Messages" so on a normal 404 response, IE would show
it's own error message, and not the one from the server. The Documented way
around this is to ensure that your 404 document is larger than 512 bytes.
http://www.zdnet.com/products/stories/reviews/0,4161,2779295-3,00.html
Explorer does support 404 documents. You just have to make sure the
document is bigger than 512 bytes.
- Original Message -
From: "Enrique Vadillo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 2:36 PM
Subject: Re: [PHP] Re: run a s
You could always add an include() for every page under the /go directory.
Simplest way that I can think of.
- Original Message -
From: "Enrique Vadillo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 12:09 PM
Subject: [PHP] execute a script on access to a
t on the sessions? Anyone have experience with
sessions on a clustered server?
- Original Message -
From: "Warren Vail" <[EMAIL PROTECTED]>
To: "Jason Bell" <[EMAIL PROTECTED]>; "PHP Users"
<[EMAIL PROTECTED]>
Sent: Wednesday, September 05, 2001
hin functions, but that
shouldn't effect anything. I always make sure to call global for each variable before
I use itany ideas?
Thanks in advance!
Jason Bell
I recently moved all of my domains to www.prohosters.com and have been
nothing but pleased with them.
They offer unlimited (within reason):
space (their plans list disk quotas but they will be the first to tell
you that they ignore them)
pop3 accounts
MySQL Databases
Domain Names.
Have you tried storing the mysqldump output to a string and then using PHP
to open a file, dump the string into the file, and then close the file?
Might work that way...
- Original Message -
From: "Tony Frasketi" <[EMAIL PROTECTED]>
To: "Sam Masiello" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROT
the unix command to see where an executable is, is which. Example: "which
mysqldump"
- Original Message -
From: "Tony Frasketi" <[EMAIL PROTECTED]>
To: "Sam Masiello" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, September 04, 2001 11:53 AM
Subject: Re: [PHP] Newbie Question:
at your unix prompt, (assuming you are running apache) enter the command
"ps -ef |grep httpd"
you should see the httpd (apache) process, and who owns it. Typicly this is
the user "nobody". Your file needs to be owned by the user that owns the
httpd process.
- Jason Bell
--
who owns the file to begin with? your account? a web server typically runs
as a low access account, such as "nobody" on Unix. So, what is probably
happening is that you don't have permissions to chmod the file. Doesn't have
anything to do with your PHP configuration.
Jason
do yourself a favor... create a file, call it something like test.php and
add the following to it's contents:
/* begin test.php */
/* End test.php */
then, open this page with your browser. if PHP is working, you should see a
lot of configuration and version information, and the PHP logo etc.
All you should need to do is echo "$beer's taste is great";
don't use the braces.
-Jbell
- Original Message -
From: "Nikola Veber" <[EMAIL PROTECTED]>
To: "php forum" <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 9:38 AM
Subject: [PHP] help again
> I am having big troubles here. I
if you are within a function, try doing this first:
global $PHP_SELF;
- Original Message -
From: "John Meyer" <[EMAIL PROTECTED]>
To: "Alexander Skwar" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, August 29, 2001 4:15 PM
Subject: Re: [PHP] Posting to oneself
At 12:07 AM 8/
als, the page keeps $PHP_AUTH_USER and $PHP_AUTH_PW,
and won't allow another login attempt until the browser is closed. Is there another
way to effectively "unset" the variables?
Thanks,
Jason Bell
Ok, I'm trying to seperate my php from my html the method I've been
trying to use is like so:
$html = fread(fopen("htmlpage.html", "r"), filesize("htmlpage.html"));
print $html;
This works perfectly fine, except if I want to use a variable
lets say that my htmlpage.html includes the f
I personally use www.phpwebhosting.com and they are "OK". I don't think I
would put anything mission critical on their servers. Why do I say this? I
usually spend all day long with an SSH session open, running VI to edit my
site... several times throughout the day, my session will freeze... if I t
Thanks! I changed my code to the following and it plugged that hole. :)
if (!$PHPSESSID) {
$sess_auth = "";
session_register('sess_auth');
}
- Original Message -
From: "Sascha Schumann" <[EM
this:
if ($HTTP_SESSION_VARS["sess_auth"] > 2) { print "News
Editor"; };
which works, however, it can be bypassed if someone just enters the value in the url
like so:
http://secured.site.com/index.php?sess_auth=admin
is there any way around this using sessions? Is there a far more
oh wait.. I just realize my goof it is treating it like I want to
divide image by pjpeg. LMAO
*sigh* I guess I should just go home while I'm ahead. haha
-Jason
- Original Message -
From: "Jason Bell" <[EMAIL PROTECTED]>
To: "PHP Users" <[EMA
Hello.
I'm trying to compare two strings, and performa function if the are the same. Easy
right? I thought so until I tried it...
$query = "select type from images where id=$id";
$result = mysql_query($query);
$type = mysql_result($result,0,"type");
print $type;
if (image/pjpeg == $type) {
er way to do anything I have done, feel
free to add your 2 cents I'm certainly open to it. :)
Jason Bell
Compressed:26785
- Original Message -
From: "Jason Bell" <[EMAIL PROTECTED]>
To: "Sheridan Saint-Michel" <[EMAIL PROTECTED]>; "php-general"
<[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 12:02 PM
Subject: Re: [PHP] Fw: Data fr
Friday, July 20, 2001 12:44 PM
Subject: RE: [PHP] inserting free-form text with quotes to mysql
> Dude! I already said that wasn't working :)
>
> MG
>
> >= Original Message From "Jason Bell" <[EMAIL PROTECTED]> =
> >$newstring = addslashes($
$newstring = addslashes($oldstring);
then, use $newstring for everything should work.
- Original Message -
From: "garman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 20, 2001 11:57 AM
Subject: [PHP] inserting free-form text with quotes to mysql
> I'm creating a
Also, to add to this, it's worth noting that the opposite of DESC is ASC
as in Descending and Ascending order
- Original Message -
From: "Steve Werby" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, July 20, 2001 9:55 AM
Subject: Re:
What's wrong with using "ORDER BY" in your sql statement?
- Original Message -
From: "Erich Kolb" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 20, 2001 9:32 AM
Subject: [PHP] PHP & MySQL
> When you query a MySQL Database, how do you set the order alphabetically?
>
>
the function unlink() will delete your old file...
http://www.php.net/manual/en/function.unlink.php
- Original Message -
From: "Brad R. C." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 19, 2001 3:01 PM
Subject: [PHP] Image Submission into a Database & Updating
> Ok..
I have a file that I include at the beginning of every .php file it
contains the following code, and works perfectly:
session_start();
if (!$PHPSESSID) {
session_register('sess_uid');
session_register('sess_acl');
session_register('sess_fn
Forget PHP for a second. Can you connect to that server normally, using
a MySQL Client?
- Original Message -
From: "Moise Bertrand TACHAGO" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 1:55 PM
Subject: [PHP] Connexion to MySQL
> Hi,
>
> Please can anyon
remove yourself. :)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
- Original Message -
From: "danny brown" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 12:25 PM
Subject: [PHP] remove me from php list
> thanks
>
>
> --
> PHP General Mailing List (htt
de
> actually makes the file bigger)
>
> Let me know if that helps
> Sheridan
>
> - Original Message -
> From: Jason Bell <[EMAIL PROTECTED]>
> To: PHP Users <[EMAIL PROTECTED]>
> Sent: Wednesday, July 18, 2001 11:51 AM
> Subject: [PHP] Fw: Data from
oopsie.
- Original Message -
From: "Danielle Forestier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 10:02 AM
Subject: [PHP] RE: bill
>
>
> Mr. Tejano:
>
> Aetna/Box 60578/LA, CA 90060-00578
> 457-74-9048/02 Warren Vail
> Group 8--40-010-2
>
> Thank
Ok, never got a reply yesterday, so I figured I'd resend this. can this even be
done?
__
How can I pull my data from my SQL db, and store it as a string so that it can be
used? Specificly, I'm working with images.
When the images are stored in the database,
how are you trying to use PHP to output the html?
AFAIK, there shouldn't be any difference between:
HTML document:
PHP document: print "";
You should note however that within the PHP print statement, you should to
refrain from the use of quotation marks... if you must quote something, us
try looking here:
http://www.php.net/manual/en/function.mktime.php
then here:
http://www.php.net/manual/en/function.date.php
-JB
- Original Message -
From: "John Holcomb" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, July 17, 2001 12:53 PM
Subject:
Oops.. forgot to CC the group..
- Original Message -
From: "Jason Bell" <[EMAIL PROTECTED]>
To: "Yassel Omar Izquierdo Souchay" <[EMAIL PROTECTED]>
Sent: Tuesday, July 17, 2001 12:42 PM
Subject: Re: [PHP] php- something that i don't underst
your query needs to be an actual query, such as a select statement...
- Original Message -
From: "Yassel Omar Izquierdo Souchay" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 17, 2001 1:28 PM
Subject: [PHP] PHP- something i don't undestand
> Hi
> I'm having
> trou
How can I pull my data from my SQL db, and store it as a string so that it can be
used? Specificly, I'm working with images.
When the images are stored in the database, the only pre-processing that is done is:
$img = addslashes(fread(fopen($userfile, "r"), filesize($userfile)));
(* note: $user
$PHP_SELF returns the filename with the full path. from there, you can use
split to split the string wherever a / occurs, then call count, to get the
total number of values in the array, decrememnt the count by 1 (Arrays begin
at 0) then, set a variable to store just the filename, like so:
$fullp
You need to open the file before you can actually write to it
try this:
$fp = fopen($file, "w");
fwrite($fp, $articletext);
fclose($fp);
- Original Message -
From: "sunny AT wde" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Sunday, July 15, 2001 10:27 AM
Subject: [PHP]
A quick search on the web found that you have to output some javascript to
handle that
take a look at http://www.idocs.com/tags/forms/index_famsupp_142.html
(Caveat: I only found the information by going to google and searching on
"html image reset button" I have not studied it, or tried it.
od.
any help at all would be very appreciated,
Jason Bell
91 matches
Mail list logo