Ok, here it goes
When I began developing in PHP a call to the imap_fetchstructure function on
an email with attachments created a 'parts' array that was indexed
numerically. Meaning I could say:
if (count($message-parts) 0)
for ($x = 0; $x count($message_parts); $x++)
// do some
[EMAIL PROTECTED] (Andy B) wrote in
news:[EMAIL PROTECTED]:
although that'll generally work, why not use
if(empty($name) || empty($comments))
{ dosomething(); }
--
---John Holmes...
because for some odd reason on any of the versions of php i am writing
for (4.0.6-4.1.3) it always
[EMAIL PROTECTED] (Frank Tudor) wrote in
news:[EMAIL PROTECTED]:
Hi folks,
Sorry for the inturruption.
I'm looking for a part time sysadmin in the DFW area.
Just out of curiosity, where the hell is DFW? I gather it's not near
Ridgehaven.
--
PHP General Mailing List
After uploading the picture, so the program should first upload the picture,
then
open it, cut it in like 6 pieces and save all the pieces and remove the
original uploaded file.
regards
patrick
- Edwin - [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
Hi,
On Thu, 25 Mar 2004
On 25 March 2004 20:17, Chris Thomas wrote:
I am not sure if this was designed like this, or if its just
something im doing wrong.
Im posting some data to a processing page, where i handle it then use
Header('Location: other.php') to direct me to another page.
The problem that im running
On 24 March 2004 22:28, PHP Email List wrote:
And ? #2 are there any settings within PHP that would limit
my ability to
visually display the contents of a POST variable on a .rtf document as
opposed to being displayed on the browser?
Yes -- take a look at the variables_order directive
Hi!
I try to compile PHP 4.3.4 with curl support on Debian Woody 3.0.
I downloaded the http://curl.haxx.se/download/curl-7.11.1.tar.bz2, and
compiled it.
./configure was succesfull.
But make generate an error:
usr/src/install/php-4.3.4/ext/curl/curl.c: In function `curl_free_post':
Manuel Lemos wrote:
Hello,
On 03/25/2004 10:19 PM, Dr. Zoidberg wrote:
I'm creating registration service with this great form script for
creating forms within Smarty.
Question is how can I validate 'username' against allready registered
users in MySQL so that someone cannot register him self
David Robley wrote:
[EMAIL PROTECTED] (Frank Tudor) wrote in
news:[EMAIL PROTECTED]:
Hi folks,
Sorry for the inturruption.
I'm looking for a part time sysadmin in the DFW area.
Just out of curiosity, where the hell is DFW? I gather it's not near
Ridgehaven.
I'm going to guess DFW is just
-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 6:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Ereg problems
On Thu, 25 Mar 2004 18:31:02 -0500, Jeff McKeon
[EMAIL PROTECTED]
wrote:
Having some problems with ereg()
Hello, the problem that I have is that I need to decompress archives zip under php.
that for this one is used libreria that is due to install it in the servant but the
problem which I have is that I cannot install in that servant. If somebody knows a
way different to decompress a file please
Hi, I am looking for some information about the way of saving the result of
my php script (html table) with .XLS (ms excel) format. Do you know where
could I get info about this?
Thanks,
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hey,
Im trying to use sprintf to format a number and left pad it with spaces, but
it doesnt want to add the spaces
I can pad it with anyother char using sprintf(%'_8.2f, $val) which will
left-pad the number with underscores
Has anyone had any luck padding with spaces??
or is there a better way
[snip]
Hi, I am looking for some information about the way of saving the result
of my php script (html table) with .XLS (ms excel) format. Do you know
where could I get info about this? Thanks,
[/snip]
Take a look at the write excel class, there is a php version of it,
however most of the
Dear All,
Except for --with-mssql options ( configure command ) , which any
other options ( configure commands ) must be compiled with php also,
then the php will be good for working with MS-SQL ?
BTW, --with-mssql is better than --with-sybase ?
Thank for your help !
Edward.
--
PHP General
Dear All,
There is a sample that can't to insert any data ( via variable ) in
MS-SQL :
insert.php:
form action=save.php method=post
table border=0 align=center
input type=text size=20 name=name maxlength=8 value=? echo
$GBName ?br
Jobinput type=text size=16 name=jobbr
Subjectinput type=text
How would I check if a variable has special characters in it like [EMAIL PROTECTED]
etc ?
and give an error if it contains one of them.
Hi,
I need to do some text file manipulation of a text file from an html
interface. I have a file with multiple lines where each line has 2 fields
each (a mac address and an associated vlan). Here's an example of rht text
file:
/tmp/TEST:
a1b2.c3d4.e5cc VLAN3
I recently upgraded to apache 2.0 from 1.23.x on my server. Previously,
I had sessions working using the database to store session information.
I recently noticed that this is no longer working as it did. The
sessions are still working, however, the session information is not
being transfered via
--- Christopher Ditty [EMAIL PROTECTED] wrote:
I recently upgraded to apache 2.0 from 1.23.x on my server.
1.3.x you mean? :-)
The sessions are still working, however, the session information is
not being transfered via the url.
[snip]
session.use_trans_sid = 0
There's your answer. Hope
Chris Mach wrote:
How would I check if a variable has special characters in it like [EMAIL PROTECTED] etc ?
and give an error if it contains one of them.
if(preg_match('/[^a-z0-9]/i',$value))
{ echo special characters present!; }
--
---John Holmes...
Amazon Wishlist:
Jon wrote:
Hi, I am looking for some information about the way of saving the result of
my php script (html table) with .XLS (ms excel) format. Do you know where
could I get info about this?
Thanks,
http://pear.php.net/package/Spreadsheet_Excel_Writer
--
paperCrane Justin Patrin
--
PHP General
php-general Digest 26 Mar 2004 17:09:53 - Issue 2669
Topics (messages 181542 through 181565):
Re: Methods for creating HTML with PHP
181542 by: electroteque
Imap functions (imap_fetchstructure)
181543 by: Daryl Meese
Re: an if statement
181544 by: David Robley
Re:
Hello
I need data from a Microsoft Access database; however my hosting does not
allow ODBC connections with php; so I was wondering if there is a way to
import the access database to Mysql by a process in the server (like for
example someone uploads the database thru a form, and after the
Thanks Chris. I just compared the trans_sid on the dev box and it is
set to 1. I'll make that change and report in. Many thanks. Owe you
another beer if that was it. ;)
Chris
Chris Shiflett [EMAIL PROTECTED] 03/26/04 10:41AM
--- Christopher Ditty [EMAIL PROTECTED] wrote:
I recently
I am trying to get a script to work that will protect individual files,
not just a directory. The script I am using is this -
?
if($auth == yes)
{
$file = downloads/2004_February_PB_File1.pdf;
$len = filesize($file);
header(Cache-Control: no-store, no-cache, must-revalidate); // HTTP/1.1
Do you have register_globals on?
If not ayou have to get the POST information manually.
ie.. $job = $_POST['job']
Also are you sure that you are connecting to the database successfully?
add:
or die('could not connect')
to the end of your mssql_pconnect and mssql_select_db statements.
So your
is it better overall to write a custom file wrapper (write my own log functions) or
use the error_log/syslog that php already gives??
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
$str = INSERT INTO staff (name,job,subject)
1 2 3
VALUES('$name','$job','$date','$subject',);
1 2 - 3
-- Rob
--
Is there an easier way to do
isset($variable) AND $variable != NULL
? I use this alot in my if statements, and I was wondering if there's an
easier way to do it, maybe with a single function? Oh and another
question... how does if ($variable) work? When does it evaluate true?
--
Marcjon
--
hi.
ok, so i've always been under the impression that count()ing during the
expression of a loop was much inefficient when compared to count()ing
just before the loop expression.
GOOD:
?php
$the_array_cnt = count($the_array);
for($i = 0; $i $the_array_cnt; $i++)
{
...
}
?
BAD:
if(!empty($variable))
On Fri, 26 Mar 2004, Marcjon Louwersheimer wrote:
Is there an easier way to do
isset($variable) AND $variable != NULL
? I use this alot in my if statements, and I was wondering if there's an
easier way to do it, maybe with a single function? Oh and another
question...
I have this query to select the date from my table...
SELECT DATE_FORMAT(date1, '%W %M %Y') FROM table
How do I know what name mysql_fetch_array assigned to the date_format ?
It would be position 0 in the array, or in your query after the date
format function you could put AS blah and then it would come out as
blah.
On Fri, 2004-03-26 at 13:50, Chris Mach wrote:
I have this query to select the date from my table...
SELECT DATE_FORMAT(date1, '%W %M %Y') FROM table
From: Adam Voigt [EMAIL PROTECTED]
On Fri, 2004-03-26 at 13:50, Chris Mach wrote:
I have this query to select the date from my table...
SELECT DATE_FORMAT(date1, '%W %M %Y') FROM table
How do I know what name mysql_fetch_array assigned to the date_format ?
It would be position 0 in
On Fri, 2004-03-26 at 13:46, Rasmus Lerdorf wrote:
if(!empty($variable))
This will return false positives for cases where the variable has not
been set to null but HAS been set to the empty string or to a 0? This
isn't really the same as the OP requested. However, isset() also returns
false for
On Fri, 26 Mar 2004 10:40:43 -0800, Marcjon Louwersheimer
[EMAIL PROTECTED] said:
Is there an easier way to do
isset($variable) AND $variable != NULL
? I use this alot in my if statements, and I was wondering if there's an
easier way to do it, maybe with a single function? Oh and another
just save as an csv-file (comma seperated values)
Jon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi, I am looking for some information about the way of saving the result
of
my php script (html table) with .XLS (ms excel) format. Do you know where
could I get info about this?
-Original Message-
From: Jason Giangrande [mailto:[EMAIL PROTECTED]
I'm looking for an easy way to write all my HTML using PHP.
Jason,
Sorry this is late and not even sure if you found your answer to this
question that you ask, however I think in the end it's going to be up to you
on
From: Andy B [EMAIL PROTECTED]
is it better overall to write a custom file
wrapper (write my own log functions)
or use the error_log/syslog that php already gives??
Define better.
Which one suits your needs? Obviously, if error_log does what you need it to
do, then use it. Why write
Not sure why I am not able to get this to work, but to make my stuff
easier to configure for different environments I am trying to re-code
some of my stuff to work with options from an array.
$cfg['hostname'] = www.server.com; // Server domain or ip address
$cfg['username'] = username;
Hello,
I am attempting to connect to a mssql db so I have the php_mssql.dll in my
extensions folder and have uncommented it from my php.ini file yet still get
an error that it can't find the module when apache starts. Does I need to
add it somewhere in my apache conf file?
Thanks,
Eddie
[snip]
$cfg['hostname'] = www.server.com; // Server domain or ip address
$cfg['username'] = username;// Database user name
$cfg['password'] = password;// Database password
$cfg['bugemail'] = [EMAIL PROTECTED];
The do something like this:
function database_connection() {
Jay Blanchard wrote:
[snip]
$cfg['hostname'] = www.server.com; // Server domain or ip address
$cfg['username'] = username;// Database user name
$cfg['password'] = password;// Database password
$cfg['bugemail'] = [EMAIL PROTECTED];
The do something like this:
function
$cfg['hostname'] = www.server.com; // Server domain or ip address
$cfg['username'] = username;// Database user name
$cfg['password'] = password;// Database password
$cfg['bugemail'] = [EMAIL PROTECTED];
Then do something like this:
function database_connection() {
So something like this?
function database_connection() {
global = $cfg['hostname'],$cfg['username'],$cfg['password'];
@mysql_connect($cfg['hostname'],$cfg['username'],$cfg['password']);
@mysql_select_database($cfg['database']); }
Or could I do an entire array like so...
function
Geir Pedersen - Activio AS mailto:[EMAIL PROTECTED]
on Friday, March 26, 2004 2:05 PM said:
1) You have to declare $cfg as a global variable in your
data_connection() function. PHP differs from C with respect to how
you access global variables from within functions. Read about
Let me rephrase it,
i got a login page, once logged in you you got the session
$_SESSION['in'] = true;
i want to be able to count the number of people that are logged in atm,
so when they logout with either logout button or close the window, i want to
then decrese the number.
In asp, you just
Jas [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
So something like this?
function database_connection() {
global = $cfg['hostname'],$cfg['username'],$cfg['password'];
global = $cfg;
From that page that was linked in the previous post:
?php
$a = 1;
$b = 2;
function Sum()
{
After uploading the picture, so the program should first upload the picture,
then
open it, cut it in like 6 pieces and save all the pieces and remove the
original uploaded file.
regards
patrick
- Edwin - [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
Hi,
On Thu, 25 Mar 2004
Patrik Fomin wrote:
Let me rephrase it,
i got a login page, once logged in you you got the session
$_SESSION['in'] = true;
i want to be able to count the number of people that are logged in atm,
so when they logout with either logout button or close the window, i want to
then decrese the number.
Define better.
1. check the file size. if it is larger than a certain size then rename the
current log and roll over to a new filename
2. if something fatal happens during normal program use shutdown the
program/website section and display a page that says unavaliable or
something of that sort...
how do i determine if a session has been destroyed/created ?
patrick
John W. Holmes [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
Patrik Fomin wrote:
Let me rephrase it,
i got a login page, once logged in you you got the session
$_SESSION['in'] = true;
i want to be
Rob Adams wrote:
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
$str = INSERT INTO staff (name,job,subject)
1 2 3
VALUES('$name','$job','$date','$subject',);
1 2 -
Hi,
Saturday, March 27, 2004, 4:50:27 AM, you wrote:
CM I have this query to select the date from my table...
CM SELECT DATE_FORMAT(date1, '%W %M %Y') FROM table
CM How do I know what name mysql_fetch_array assigned to the date_format ?
SELECT DATE_FORMAT(date1, '%W %M %Y') AS date_formatted
Hi,
Saturday, March 27, 2004, 4:45:38 AM, you wrote:
CWP hi.
CWP ok, so i've always been under the impression that count()ing during the
CWP expression of a loop was much inefficient when compared to count()ing
CWP just before the loop expression.
CWP GOOD:
CWP ?php
CWP $the_array_cnt =
Hi,
A bit of a weird problem, am just curious if this can be done...
I have a file called config.inc.php which has a require_once in it for
lang_a.php and
lang_b.php
config.inc.php is being included by a.php and b.php
presently config.inc.php is doing a require_once for both lang_a and lang_b,
Hi,
Saturday, March 27, 2004, 1:31:33 AM, you wrote:
CT Hey,
CT Im trying to use sprintf to format a number and left pad it with spaces, but
CT it doesnt want to add the spaces
CT I can pad it with anyother char using sprintf(%'_8.2f, $val) which will
CT left-pad the number with underscores
PHP Development Team is proud to announce the release of PHP 4.3.5. This is
primarily a bug fix release, without any new features or additions.PHP 4.3.5
is by far the most stable release of PHP to date and it is recommended that
all users upgrade to this release whenever possible.
The major fixes
On Fri, Mar 26, 2004 at 08:55:52AM -0500, Ilia Alshanetsky wrote:
PHP Development Team is proud to announce the release of PHP 4.3.5. This is
primarily a bug fix release, without any new features or additions.PHP 4.3.5
is by far the most stable release of PHP to date and it is recommended that
Hi folks,
thanks for another great php-release.
Are there any important changes since the last RC?
TIA,
thomas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
* Thus wrote Jeff McKeon ([EMAIL PROTECTED]):
preg_match_all('($-?[0-9]+\.[0-9]+)', $string, $found);
print_r($found);
That produces:
Array ( [0] = Array ( ) ) 0 , Array
Sorry that should be:
preg_match_all('/(\$-?[0-9]+\.[0-9]+)/', $string, $found);
Curt
--
I used to
[EMAIL PROTECTED] (Ryan A) wrote in
news:[EMAIL PROTECTED]:
Hi,
A bit of a weird problem, am just curious if this can be done...
I have a file called config.inc.php which has a require_once in it for
lang_a.php and
lang_b.php
config.inc.php is being included by a.php and b.php
Hey y'all, I'm having problems trying to get the
MySql_Query() function to return the resource ID when using a $string as the
argument to pass to it. It returns when I hard code the argument but not the
string. Any ideas? here is what the function looks like:
function GetVals() {
$db =
[EMAIL PROTECTED] (Gimic) wrote in
news:[EMAIL PROTECTED]:
Hey y'all, I'm having problems trying to get the
MySql_Query() function to return the resource ID when using a $string
as the argument to pass to it. It returns when I hard code the
argument but not the string. Any ideas? here is
Gimic wrote:
Hey y'all, I'm having problems trying to get the
MySql_Query() function to return the resource ID when using a $string as the
argument to pass to it. It returns when I hard code the argument but not the
string. Any ideas? here is what the function looks like:
function GetVals() {
Jas wrote:
Not sure why I am not able to get this to work, but to make my stuff
easier to configure for different environments I am trying to re-code
some of my stuff to work with options from an array.
$cfg['hostname'] = www.server.com; // Server domain or ip address
$cfg['username'] =
The entire script looks like this:
?php
if ($_POST[Subject] != NULL) {
echo results for . $_POST[Subject];
$subject = $_POST[Subject];
$qry = (select * from . $subject);
$sqlQry = (string) $qry;
GetVals();
}
function GetVals() {
$db = mysql_connect(localhost, root);
68 matches
Mail list logo