I kind of hinted in my earlier what is going on but:
$a = 1 $b = 0;
Is first silently evaluated as:
$a = (1 $b = 0);
thx your answer, just one more little thing...
So the right expression is tested which happens to be ($b = 0).
...why ($b = 0) is on the right side, not only $b.
Felho
http://www.phpclasses.org/mimemessage
Or you can try is, which is one of the best mailer class:
http://phpmailer.sourceforge.net/
Felho
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Curt Zirzow wrote:
And so on.. It's a kind of a template system... well... I need to
create a expression to get all the tags from the HTML with
preg_match_all() in order to have them in a array...
So your looking from something that starts with '{' and continues
while not a ')' ...
/{([^}]*?)}/
Brent Clements wrote:
Solved my own problem
Note to self, RTFM:
number_format is w hat I needed.
Or:
printf(%.2f, $var);
--
Bye, K http://www.ailis.de/~k/ (FidoNet: 2:240/2188.18)
[A735 47EC D87B 1F15 C1E9 53D3 AA03 6173 A723 E391]
(Finger [EMAIL PROTECTED] to get public key)
signature.asc
I have written a registration page in php and have a number of edit boxes
and drop-down lists. The lists are pulling data out of their respective
tables, whereas the edit boxes are just for saving data.
Now my main table where all my data is being saved is called Business. Onto
this I have a
From: Chris Shiflett [EMAIL PROTECTED]
To: Jason Wong [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, November 01, 2004 12:22 AM
Subject: Re: [PHP] Simple math failing - PHP Bug?
--- Jason Wong [EMAIL PROTECTED] wrote:
Most computer languages handling floating point calculations
just as
We have a chapter in the manual about this,
http://www.php.net/manual/en/language.types.float.php
This is also interesting:
http://docs.python.org/tut/node15.html
Kind Regards,
Aidan
Brian T. Allen [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi,
OK, I'm totally stumped by
\n will set the appropriate.
On Monday 01 November 2004 04:53, Greg Beaver wrote:
Hi all,
What's the standard line ending for Darwin? is it still the same as old
Mac, which I think was just \r? Or does it use \n like unix?
Greg
--
PHP General Mailing List (http://www.php.net/)
To
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 01 November 2004 06:31, Brian T. Allen wrote:
[]
When adding dollar amounts using only whole cents (and excluding the
limitation we've been discussing) you should always
Hi all,
I'm trying to create a little function that generates tabs dynamically
and am having no luck with the imagestring() function. I checked out
the documentation and even cut and pasted the example but it always
chokes the browser when the page containing an imagestring() line is
loaded.
I want to call a javascript function:
function error_popup() { newwin =
window.open(error_popup.php,sss,height=470,width=450) }
from within my php code.
How do I go about called this function?
Garth
[snip]
I want to call a javascript function:
function error_popup() { newwin =
window.open(error_popup.php,sss,height=470,width=450) }
from within my php code.
How do I go about called this function?
[/snip]
You have to echo or print out the javascript using PHP
--
PHP General Mailing List
Garth Hapgood - Strickland wrote:
I want to call a javascript function:
function error_popup() { newwin =
window.open(error_popup.php,sss,height=470,width=450) }
from within my php code.
How do I go about called this function?
Garth
You can't call JavaScript functions from within PHP. You can
by saying ?
echo error_popup();
or
print error_popup;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
You can't call JavaScript functions from within PHP. You can output the
JavaScript function to the browser.
PHP == Server Side
JavaScript == Client Side
Ok so what does this mean I should write..I don't understand what you mean
by Server Side/Client Side.
--
PHP General Mailing List
Garth Hapgood - Strickland wrote:
by saying ?
echo error_popup();
or
print error_popup;
As someone mentioned, you cannot call a javascript function from within
PHP. What is meant by client side/server side is this: PHP is processed
on the server before sending any content to the browser; that's
[snip]
Ok so what does this mean I should write..I don't understand what you
mean
by Server Side/Client Side.
[/snip]
Server side means that the server handles the processing. Client side
means that the interface device (in this case, a browser) handles the
processing. PHP is server side.
Thanx for your help, I am actually a web designer!
I dont think u understand 100%
I have a form and Im doing a check on submission to check whether there are
any blank field and if there are I want to call function.. error_popup();
does this make anymore sense to you. Now I understand that you
[snip]
I have a form and Im doing a check on submission to check whether there
are
any blank field and if there are I want to call function..
error_popup();
does this make anymore sense to you. Now I understand that you cant call
javascript from within php. wot would you recommend as an
Hello Garth,
Monday, November 1, 2004, 2:52:48 PM, you wrote:
GHS I have a form and Im doing a check on submission to check whether
GHS there are any blank field and if there are I want to call
GHS function.. error_popup(); does this make anymore sense to you.
Then keep it all within the
Jay Blanchard wrote:
[snip]
I have a form and Im doing a check on submission to check whether there
are
any blank field and if there are I want to call function..
error_popup();
does this make anymore sense to you. Now I understand that you cant call
javascript from within php. wot would you
Hello,
I have a problem regard to function
- dns_check_record
- dns_get_mx
Can you tell me why the PHP said the Call to undefined function?
and also
class Dog
{
function __construct()
{
}
}
the construct or descontruction are not working?
Thanks,
Bao
First of all, don't ask two questions in one message. Send two separate
messages. You're more likely to get better answers to both questions.
Bao Vu wrote:
I have a problem regard to function
- dns_check_record
- dns_get_mx
Can you tell me why the PHP said the Call to undefined function?
I want to allow people to upload images but I want to be able to put
limitations on it, such as allow only jpg and gif extensions and make sure
the image is no larger than 60x60. Is there any way to do this?
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Mon, 1 Nov 2004 07:44:13 -0800, bb9876 [EMAIL PROTECTED] wrote:
I want to allow people to upload images but I want to be able to put
limitations on it, such as allow only jpg and gif extensions
$_FILES['userfile']['type'] contains the mime type.
and make sure
the image is no larger than
yes, using the Glib for example...
you can set a MAX FILE SIZE for the images you upload, and check it
afterwards for size and format. After that you move the temporary files
to their destination folder...
check http://www.php.net/manual/en/features.file-upload.php and
On Mon, 2004-11-01 at 10:44, bb9876 wrote:
I want to allow people to upload images but I want to be able to put
limitations on it, such as allow only jpg and gif extensions and make sure
the image is no larger than 60x60. Is there any way to do this?
Thanks Christian(or chregu),
and thanks for the pointer to trang. I've not met that tool before.
Best regards. . . Dusty
Christian Stocker wrote:
snip
/snip
Aren't you missing any namespace declaration in your Schema File?
Yes I was - duh!!
snip
/snip
--
PHP General Mailing List
Seeing the page might help.
On Nov 1, 2004, at 2:52 AM, Garth Hapgood - Strickland wrote:
I have written a registration page in php and have a number of edit
boxes
and drop-down lists. The lists are pulling data out of their respective
tables, whereas the edit boxes are just for saving data.
Now
Can PHP work with Excel files as database ?
If not, how can I conver it to MySQL format and
reconvert it to Excel 'coz I need it to report it
in Excel format,
if you are on windows you could use a com object.
if you have access to perl, you could use
Thanks guys, these three things should solve the question. :)
Brian V Bonini [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Mon, 2004-11-01 at 10:44, bb9876 wrote:
I want to allow people to upload images but I want to be able to put
limitations on it, such as allow only jpg and
The idea is very simple. It just needs you to know the concepts.
On the form processing page whenever u find an error just print or echo this :
script type=text/javascript
err_popup();
/script
e.g. ? if( empty($_POST['firstName']) )
{
echo script type=\text/javascript\;
Is there an easier way to assign all post data from a form to session data?
Eg.,
$_SESSION['first_name'] = $_POST['first_name'];
$_SESSION['last_name'] = $_POST['last_name'];
$_SESSION['email'] = $_POST['email'];
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Erich Kolb wrote:
Is there an easier way to assign all post data from a form to session
data?
Eg.,
$_SESSION['first_name'] = $_POST['first_name'];
$_SESSION['last_name'] = $_POST['last_name'];
$_SESSION['email'] = $_POST['email'];
You could do this:
$_SESSION = array_merge($_SESSION,
Erich Kolb wrote:
Is there an easier way to assign all post data from a form to session data?
$_SESSION['first_name'] = $_POST['first_name'];
$_SESSION['last_name'] = $_POST['last_name'];
$_SESSION['email'] = $_POST['email'];
If a two-dimensional array is ok for you then the easiest way is this:
On Monday 01 November 2004 17:43, Erich Kolb wrote:
Is there an easier way to assign all post data from a form to session data?
Eg.,
$_SESSION['first_name'] = $_POST['first_name'];
$_SESSION['last_name'] = $_POST['last_name'];
$_SESSION['email'] = $_POST['email'];
Name your form elements
Erich Kolb wrote:
Is there an easier way to assign all post data from a form to session data?
Eg.,
$_SESSION['first_name'] = $_POST['first_name'];
$_SESSION['last_name'] = $_POST['last_name'];
$_SESSION['email'] = $_POST['email'];
Never pass in data from any external source without explicitly
Erich Kolb wrote:
Is there an easier way to assign all post data from a form to session data?
Eg.,
$_SESSION['first_name'] = $_POST['first_name'];
$_SESSION['last_name'] = $_POST['last_name'];
$_SESSION['email'] = $_POST['email'];
If you're not worried about checking the integrity of your data...
I've been trying for most of the day to generate a simple dynamic image
in my php script without any success. It seems obvious that something
isn't right with my php environment as even the simplest images (like a
rectangle) only yield the broken link icon. Does anyone know of any in
depth
[snip]
I've been trying for most of the day to generate a simple dynamic image
in my php script without any success. It seems obvious that something
isn't right with my php environment as even the simplest images (like a
rectangle) only yield the broken link icon. Does anyone know of any in
On Monday 01 November 2004 18:24, Ken Tozier wrote:
I've been trying for most of the day to generate a simple dynamic image
in my php script without any success. It seems obvious that something
isn't right with my php environment as even the simplest images (like a
rectangle) only yield the
Matt M. wrote:
Can PHP work with Excel files as database ?
If not, how can I conver it to MySQL format and
reconvert it to Excel 'coz I need it to report it
in Excel format,
if you are on windows you could use a com object.
if you have access to perl, you could use
I think the easiest way is to store your data in MySQL and then create a DSN
via MyODBC and connect to your spreadsheet.
Matt M. [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Can PHP work with Excel files as database ?
If not, how can I conver it to MySQL format and
reconvert it
One trick I use is invoke the dynamic image module directly (code the URL in
the address field of the browser), along with making sure that the
outputting of headers doesn't take place until just before the image output
command. This allows the browser to display any syntax errors and such.
Check if you have the GD (or if you are using ImageMagick) installed in the
first placenot all servers do and its not always enabled
After that, your might consider posting some code as there are many helpful
people on this list who will give you a hand if needed or point you to the
correct
snip
Enable FULL error reporting.
I tried this with error_reporting(E_ALL); and ran the script in
multiple browsers no errors reported.
Also ran phpinfo(); (as suggested by Jay Blanchard) which worked
without problem. The settings under GD were all enabled for the common
image types.
Anybody
?php
$im = imagecreate(100, 50)
or die(Cannot Initialize new GD image stream);
$back_color = imagecolorallocate($im, 255, 255, 255);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, A Simple Text String, $text_color);
Works fine for me, though the image needs to be lengthened some to get the whole
text in it.
Check your server settings...
Robert
Ken Tozier is quoted as saying on 11/1/2004 2:51 PM:
snip
Enable FULL error reporting.
I tried this with error_reporting(E_ALL); and ran the script in multiple
Thanks a million, this is exactly what I was looking for!
--
http://www.providenames.com
http://www.erichkolb.com
http://www.kolbsoft.com
http://www.phpquestions.com
John Nichel [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Erich Kolb wrote:
Is there an easier way to assign all
-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED]
Sent: Monday, 1 November 2004 3:46 p.m.
To: [EMAIL PROTECTED]
Subject: Re: [PHP] beginnind and end of the week
* Thus wrote Jerry Swanson:
I need to run a query using PHP/MYSQL. The query should be for a week.
So if today is
Hi,
I have a line of php that I don't really understand.
foreach($this-orders as $OrderID = $value) {
echo $OrderID.BR;
$OrderObject =$this-orders[$OrderID=$value];
echo $OrderObject-OrderID.--all the sameBR;
}
I know that $this-orders is an array of order objects.
the result i get
Victor C. wrote:
$OrderObject =$this-orders[$OrderID=$value];
This line is confusing. $OrderID=$value is either a typo or is just
plain wrong. It looks like what it's meant to say is:
$OrderObject = $this-orders[$OrderID];
But this will just set $OrderObject equal to $value, so you should
But why would the this line generate different OrderID on lines 1 and 3?
Ben Ramsey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Victor C. wrote:
$OrderObject =$this-orders[$OrderID=$value];
This line is confusing. $OrderID=$value is either a typo or is just
plain wrong. It
Ben Ramsey wrote:
Victor C. wrote:
$OrderObject =$this-orders[$OrderID=$value];
This line is confusing. $OrderID=$value is either a typo or is just
plain wrong. It looks like what it's meant to say is:
$OrderObject = $this-orders[$OrderID];
But this will just set $OrderObject equal to
I did a print_r(array_values)before calling the codes that had errors in
it.. the following content is contained in $this-orders;
Array ( [0] = order Object ( [UserObject] = user Object ( [UserID] =
E2401 [Pass] = [IsValid] = 1 [UserType] = AT [fonthtml] = [footerfile]
= resources/footer.php
Victor C. wrote:
I did a print_r(array_values)before calling the codes that had errors in
it.. the following content is contained in $this-orders;
Aaaghh. Can you give that to us in pre-formatted text, rather than
copying and pasting it from the browser. My eyes are going everywhere
trying
Hi Ben,
I tried your portion of code and find out what was wrong... Apparently I
used in adding order to the array and that was messing things up...
Everything is working now.
Thanks for all the help
Victor C. [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I did a
Thanks everyone for the help. I got it working now. Turns out at least
part of the problem was invisible characters from the cut past
example code I found on the php site.
Ken
On Nov 1, 2004, at 3:48 PM, Robert Sossomon wrote:
Works fine for me, though the image needs to be lengthened some to
Dear PHP-list,
Me and a small group of developers are thinking about making a Norwegian
free hosting service.
This service features PHP, MySQL and a lot of different services.
Everything we have sat up is ready - Cpanel handles making the most. When a
user is registered, we call by HTTP the
Hi.
Is there any GUI editors out there for php? if so does anybody know of a
good one that doesnt cost a ton of money??
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Andy B [EMAIL PROTECTED] skrev i melding
news:[EMAIL PROTECTED]
Hi.
Is there any GUI editors out there for php? if so does anybody know of a
good one that doesnt cost a ton of money??
There's a trial for Zend Studio at www.zend.com
Eric
--
PHP General Mailing List (http://www.php.net/)
Hello,
I have a login page .. the user types in user and pass
then the form gets posted to tiny_edit.php
tiny_edit.php checks user and pass then sets a cookie if auth is
successful. Then the original login page is included. The login page has
logic at the top to check for the auth cookie
Is it possible to use fonts on a system with php's image routines? The
GD supplied fonts look pretty crappy and if possible, I'd like to just
use fonts available on the system (I'm on a Mac) rather than
downloading a bunch of customized fonts exclusively for use with php's
image_xxx routines.
I like htmlkit; (it's free)
http://www.chami.com/html-kit/
Warren Vail
-Original Message-
From: Eric Bolikowski [mailto:[EMAIL PROTECTED]
Sent: Monday, November 01, 2004 2:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: GUI editor for php?
Andy B [EMAIL PROTECTED] skrev i melding
Hello Jason,
Monday, November 1, 2004, 10:34:16 PM, you wrote:
JD the login page is included ... the login page does not see the auth
JD cookie until the user refreshes their browser ... why is this happening?
Cookies (set via setcookie) are not available to you on the same page
as you set
How did you go to the page that included the login page, if you included it
in the tiny_edit.php (which is the routine that sets the cookie in the
browser, you need to cause the browser to send it back to you by doing a
redirect;
Header(Location: tiny_edit.php);
Exit;
When tiny_edit is entered
On Mon, 2004-11-01 at 16:08, Richard Davey wrote:
Hello Jason,
Monday, November 1, 2004, 10:34:16 PM, you wrote:
JD the login page is included ... the login page does not see the auth
JD cookie until the user refreshes their browser ... why is this happening?
Cookies (set via setcookie)
Greetings:
This is just a friendly reminder that if you are registered in the
United States to VOTE on November 2, 2004 (TOMORROW)
Need to know where you vote?
Please see the attached file (it is an image) that contains some information
--
PHP General Mailing List (http://www.php.net/)
Hello Ken,
Monday, November 1, 2004, 11:03:09 PM, you wrote:
KT Is it possible to use fonts on a system with php's image routines?
KT The GD supplied fonts look pretty crappy and if possible, I'd like
KT to just use fonts available on the system (I'm on a Mac) rather
KT than downloading a bunch
* Thus wrote Tim Owens:
// this weeks monday
$m = strtotime('this monday', $t);
// next weeks monday minus 1 second
$s = strtotime('next monday', $t) - 1;
echo date('r', $m), \n;
echo date('r', $s), \n
?
Now $m and $s contain the proper timestamps.
Curt
Hmm.
GH wrote:
Greetings:
This is just a friendly reminder that if you are registered in the
United States to VOTE on November 2, 2004 (TOMORROW)
Need to know where you vote?
Please see the attached file (it is an image) that contains some information
Do we care? Realy? Unlikely. Maybe you should
--- Greg Beaver [EMAIL PROTECTED] wrote:
Erich Kolb wrote:
Is there an easier way to assign all post data from a form to
session data?
Eg.,
$_SESSION['first_name'] = $_POST['first_name'];
$_SESSION['last_name'] = $_POST['last_name'];
$_SESSION['email'] = $_POST['email'];
On Mon, 2004-11-01 at 16:10, Vail, Warren wrote:
How did you go to the page that included the login page, if you
included it
in the tiny_edit.php (which is the routine that sets the cookie in the
browser, you need to cause the browser to send it back to you by doing
a
redirect;
On Mon, 2004-11-01 at 16:26, Brad Dameron wrote:
On Mon, 2004-11-01 at 15:17, Jason Davis wrote:
sc.php
?php
setCookie('data' , 'blah');
include 'gc.php';
?
gc.php
?php
print $_COOKIE['data'] . -here;
?
this is the out put of running sc.php
-here
why is
* Thus wrote Manuel Lemos:
Hello,
On 11/01/2004 03:58 AM, Kunal Aggarwal wrote:
I am using PHP 4.3.4 version.
Please tell how to unpload a mail function.
Error comes on executing mail function is
mail(): SMTP server response: 550 5.7.1 Unable to relay for
[EMAIL PROTECTED] in
Take php out of your address book and dont do this ever again
please.
* Thus wrote GH:
Greetings:
This is just a friendly reminder that if you are registered in the
United States to VOTE on November 2, 2004 (TOMORROW)
Need to know where you vote?
Please see the attached file (it
Hi,
Below is my code for a templating kind of script, it basically searches for
'tags' like this {movies 30} and replaces them, the problem is that if there
are 2 tags (eg: {movies 30}{movies 60}) it only replaces the first one...so
I tried using a preg_match_all...
I tried using a preg_match_all
From: Ryan A [EMAIL PROTECTED]
Below is my code for a templating kind of script, it basically searches for
'tags' like this {movies 30} and replaces them, the problem is that if there
are 2 tags (eg: {movies 30}{movies 60}) it only replaces the first one...so
I tried using a
From: Ryan A [EMAIL PROTECTED]
$content = str_replace($matches[$index][0],$value,$content);
If you are interested in seeing the whole script, just scroll down.
I'm not... but thanks. Did you read what I wrote? using preg_match twice and then
str_replace is a waste. Learn to use
-Original Message-
From: Victor C. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 02, 2004 3:06 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php array question
Hi,
I have a line of php that I don't really understand.
foreach($this-orders as $OrderID = $value) {
echo $OrderID.BR;
I
On Monday 01 November 2004 19:51, Ken Tozier wrote:
Enable FULL error reporting.
I tried this with error_reporting(E_ALL); and ran the script in
multiple browsers no errors reported.
Are you looking in the correct place for errors?
Also ran phpinfo(); (as suggested by Jay Blanchard) which
Hi,
After setting error_reporting to E_ALL.
You may need to set show_errors in php.ini
Use
error_reporting(E_ALL);
ini_set(show_errors,1);
Zareef ahmed
-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 02, 2004 4:11 PM
To: [EMAIL PROTECTED]
On November 1, 2004 17:19, Andy B wrote:
Hi.
Is there any GUI editors out there for php? if so does anybody know of a
good one that doesnt cost a ton of money??
Try taking a look at:
http://www.thelinuxconsultancy.co.uk/phpeditors/
--
Regards,
David Bevan
We could learn a lot from crayons:
Yes, I'm planning to work with MySQL, but the problem
accour from the first time, 'cause the source is in
Excel file, is MySQL able to read the CVS format ?,
and can you please show me some PHP script that make
outputs the contents of report to a CSV from MySQL ?
--- Ben Ramsey [EMAIL PROTECTED]
===
Please feel free to add more points and send
to the list.
===
1. If you have any queries/problems about PHP
try http://www.php.net/manual/en first. You
can download a copy and use it offline also.
Please also try
Hi there,
Look at the following code please. I have a mysql db setup and apache
running. I have the register_globals=OFF on the php.ini file. The code is
suppose to show all the jokes in the databse and give user to enter jokes.
The code works fine when when the register_globals=ON in the
Hi there,
Look at the following code please. I have a mysql db setup and apache
running. I have the register_globals=OFF on the php.ini file. The code is
suppose to show all the jokes in the databse and give user to enter jokes.
The code works fine when when the register_globals=ON in the
PHPDiscuss - PHP Newsgroups and mailing lists wrote:
Hi there,
Look at the following code please. I have a mysql db setup and apache
running. I have the register_globals=OFF on the php.ini file. The code is
suppose to show all the jokes in the databse and give user to enter jokes.
The code works
Try
if($_POST[insert])
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, November 01, 2004 5:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Cannot retrive the data ???
Hi there,
Look at the following code please. I have a mysql db setup and apache
89 matches
Mail list logo