I am planning a script that will send mail to all my clients
(potentially up to 1, even more clients)... I figured I can loop a
mailer script for every client (I don't want to have more than one email
address per message in the recipient field).
Any special advise or pages I could view for h
How do I get the ASCII value of a character increment it by one...
and convert back to a character.
For example:
I want to grab a char such as "C" and increment it to "D" ???
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
y($Query, $Link)
or die ("SL3-".mysql_errno().": ".mysql_error());
$Num_rows = mysql_num_rows($Results);
if ($Num_rows==1) {
$ImgType = mysql_result($Results,0,ImgType);
$ImgData = mysql_result($Results,0,ThmData);
header("Content-Type: " . $ImgType);
ec
I have this really cool script that grabs image data stored in a mysql
bin field and echo's the data into an image file.
01: /* QUERY DB AND LOAD IMAGE DATA */
02: /* must get values for ImgType and ThmData */
03: $Results = mysql_query($Query, $Link)
04: or die ("SL3-".mysql_errno().": "
The manual shows that you can use switches with numeric values but is it
also possible to use strings? Is this possible? If not, what can I
do? Just a bunch of if statements?
";
break;
case Fred Flinstone:
echo "Yabba Dabba Do";
break;
default:
echo "Do not
Also consider:
header("Cache-Control: public");
header("Cache-Control: max-age=" . $this->allowcache_expire * 60);
This will allow to set the expiration of the cached file on the on the clients
browser. The Cache Expire time is in minutes and can be found (and changed)
in the php.ini file. Sea
Doing some research I found that session cache paramemters may be set in
PHP.INI or overridden by inserting the following header() lines into the
php for the page you want to cache on the clients browser.
Allow Cache Expire time is set in php.ini in minutes. Search php.ini for
key word cache and
Yes, I would prefer using the back button and go to the page in the clients
cache but I think you are right, I may have place a back button on the page
that actually resubmits the query paramemters for me.
Finally found something that ASP pages can do better than PHP... but only one
thing. :)
Ed
Page 1 is a list of people's names (queried by State).
Page 2 is each person's profile.
When I hit the back button on Page 2 it tells me it has to requery the
List on Page 1 (apparently not stored in the client's browser cache).
Is there anyway to make it use the cached copy instead of requeuryi
$Str = apple,orange,cyanide,bananna
$Arr = split(",",$Str);
How do I remove the unwanted value from the array?
(in this example, Cyanide ($Arr[2]) from the Fruit array)???
Thanks.
array_splice()???
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
Fo
Hey all,
I am using the Zhang session method from
http://www.phpbuilder.com/columns/ying2602.php3 and it works great
with a mysql database.
Does anyone out there know how to tell if a session is expired using
this method? The Read Session function is:
\\
forgot to add, operating on Red Hat 7.1
Phantom wrote:
> Hello to my php friends!
>
> I am trying to compile PHP with: ---enable-trans-sid
>
> But when i test out pages, the only time a real session is propagated
> between pages is when i included the in the URL's (
Hello to my php friends!
I am trying to compile PHP with: ---enable-trans-sid
But when i test out pages, the only time a real session is propagated
between pages is when i included the in the URL's (AND THIS
WORKS GREAT!!!).
BUT, If I remove that PHP sniplet, the session restarts on every PH
How do I remove the slashes from mysql_escape_string when I pull the
string back out of the DB and want to display it?
--
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 administrato
Anyway to reverse the effect of htmlspecialchars?
Reason: to send an email message where " is shown as " and not
" LOL
Thanks.
--
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 a
I would like to format numbers to be a fixed width.
I want all numbers to be 2 characters in width to the left of the
decimal point.
1 should be 01
2 should be 02
3 should be 03
How can I do this?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
Fo
I am passing a string and making sure all the characters in that string
are valid.
Example:
For a persons age I am using:
if (!preg_match("/^[0-9]+$/", $Age)) echo "Please Enter numeric value
for age".
But how would I include the following characters as permissible in preg
match
~!@#$%^&*()
I am passing a string and making sure all the characters in that string
are valid.
Example:
For a persons age I am using:
if (!preg_match("/^[0-9]+$/", $Age)) echo "Enter numeric value for age".
But how would I include the following characters as permissible in preg
match
~!@#$%^&*()-=_+,.?
What would be an easy what to format a date value into month day year??
I want to specially display a date stored in mysql in date format
-MM-DD
The manual says: string date (string format, int [timestamp])
I tried $FormattedDate = date("F y, Y",${StoredDate})
1999-04-15 spit out December 3
I solicit information from a text field and save the data in mysql to be
pulled out later and displayed as text on a webpage.
However, Carrage Returns in the text field do not appear in the webpage
text.
With ereg_replace() I can replace the Carriage Returns with "\n", so
what is this the ch
before this step (so before
mysql_escape_string and addslashes (if I were using that)), so for some reason
it appears the data error problem occurs before it reaches this script. Maybe
it gets tainted on submission time to investigate more.
Phantom wrote:
> I am starting to wonder if
gs ?
>
> Gareth
>
> -Original Message-
> From: Michael Hall [mailto:[EMAIL PROTECTED]]
> Sent: 07 December 2001 14:08
> To: phantom
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Uploaded Image display problems
>
> I can't help you with the problem described be
With thanks to you who have helped me, I have constructed a PHP script
that allows the client to upload an image (jpg or gif) that is stored in
a MySQL Blob field.
And I have a PHP script that will pull the binary data out of the MySQL
database and display the upload image for the client.
THE PR
I have successfully placed images (jpg,gif,png) into a MySQL database
BLOB field, now I want to be able to pull the data out and diplay it.
based on tutorial at
http://www.zdnet.com/devhead/stories/articles/0,4413,2644827,00.html
after Querying the DB I have the following lines:
$ImgFile = mysq
I want to store the image binary data in a MySQL Blob field. So I
created a simple form that prompted the client for an image file that
would be uploaded to the server.
The server takes the file and gets the following data, assuming ImgFile
is the name of the uploaded image.
$ImgTitle = $HTTP
I am trying to set my session data to be stored in MySQL so I am using
session_set_save_handler() which sets the six user-level session storage
functions (which I have already defined).
Will session_set_save_handler automatically run the appropiate storage
function when required (like when i say
I am trying to set up a session setup that saves session data to a mysql
database.
I have gone into php.ini and set session.save_handler to user.
I call the following include file up using
session_set_save_handler("open", "close", "read", "write", "destroy",
"gc");
(of course I have labeled eac
What is a << Warning: Invalid preceding regular expression >> mean when
running a page?
Output ---
Warning: Invalid preceding regular expression in /ereg.php on line 4
PHP Page Source -
<%
function invalid_string($string,$valid) {
for ($i
Anyone know a good PHP function or script to scan a string for Valid
Characters to make sure something that is not allow is not included in a
form?
$Name = "#@@##@!#!@" would not be a valid alphabetical name, how do I
scan for that in PHP? Thanks.
--
PHP General Mailing List (http://www.php.n
Is there any inherit danger or taboos against changing the value of a
variable from an integer to a string?
example:
if ($Msg==1) $Msg = "You have foobar'ed your entire server.";
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additio
", "tylenol", "ford");
> > $swap = array ("pepsi", "advil", "chevrolet");
> > for ($i = 0; $i < count ($forbid); $i++) {
> > $str = eregi_replace($forbid[$i],$swap[$i],$str);
> > }
> > }
>
&
function scan_string(&$str) {
$forbid = array ("coke", "tylenol", "ford");
$swap = array ("pepsi", "advil", "chevrolet");
for ($i = 0; $i < count ($forbid); $i++) {
eregi_replace($forbid[$i],$swap[$i],$str);
}
}
I run this script, and I know the array's load up and the fo
New to this, trying to insert record into DB
$Query = "INSERT INTO table_name (Obj,Descrip) VALUES (keyboard,Device
to pound on when frustrated.)";
$Results = mysql_query($Query)
or die ("Query FAILED");
I keep getting Failed Query messages here, any idea why? PHP/MySQL
manuals do not have
I am trying to set up a redirect scirpt that in ASP was
response.redirect(escape("newpage.asp")).
I tried in PHP >> header("location: newpage.php")
but all i got was an error message saying that my header content had
already been sent. This PHP script was above the html script.
Am I doing some
I am uploading .Jpegs and GIFS but they end up being all messed up when
I try to view them after a file transfer.
However, txt file transfers work ok. Someone told me this is because
images need to be transfered as binary files, not ascii files (like
txt).
Is this true, and if so, how do I corr
Must have been a missing semi-colon it works now. Thanks.
<%
echo $Action;
if ($Action == "Submit")
{ echo " Process form"; }
else
{ echo " Do Nothing"; }
%>
Cc Zona wrote:
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTE
Bear with me, new to PHP and got a beginner's questions
How do I run an if statement and the if statement compares a String?
IN ASP (yes I Know, ASP is evil) I would have wrote
if (String(Request("Action"))=="Submit")
do this
In PHP I have tried
if ($Action == "Submit") but I get a par
37 matches
Mail list logo