If you want the [ to be escaped in the regex you have to double-escape
it:
$x = \ \[; (sorry, the two \ should be together without a space but my
stupid mail-app converts the string thinking it's an network address)
so $x will contain \[ as you want ( the first backslash escapes the
second).
As far as I can see (notice: I'm not a regex-king ;) the regex seems
correct
to me. The only thing I'm wondering about is the /^ (second last line
of
the citation). Together with your expression in the array it results in
preg_match(/\/!\[CDATA\[/, ...)
I'm wondering if that (/![CDATA...) is
$headers .= Cc: [EMAIL PROTECTED]\r\n;
$headers .= Bcc: [EMAIL PROTECTED]\r\n;
$headers['User']='bankem';
$headers['Password']='narayana';
/* and now mail it */
mail($to, $subject, $message, $headers);
?
Warning: Server Error in c:\www/email1.php on line 45
You do not need to
Inserting data from a textarea or something?
If so, have a look at http://www.php.net/nl2br - probably what you're after.
Cheers
Jon
-Original Message-
From: Rodney Davis [mailto:[EMAIL PROTECTED]]
Sent: 07 January 2002 17:47
To: [EMAIL PROTECTED]
Subject: [PHP] carriage returns
If you need to POST a form, but include some variables, you can use hidden
fields.
form action=script.php method=post
input type=hidden name=a value=foo
input type=hidden name=b value=bar
input name=c
/form
Assuming someone now enters baz into the input called c, your POST data
is
Hi,
If I use die or exit() it break execution of php script but also
browswer stop parsing html code. How to avoid this?
Use proper error handling instead of die()?
Let's face it, die() is for when your script needs to, well, die
Cheers
Jon
--
PHP General Mailing List
Well, 1st Jan 1970 is the start of the Unix epoch (i.e. what you'd get for
doing a date() on a timestamp of 0). Seeing as 31st Dec 1969 is fairly close
to this, it's worth checking that header.php exists and that your stat()
call isn't returning null or a negative.
if (file_exists (header.php))
You probably have a better chance if you include
(a) some code
(b) an error message
(c) a description of your environment
Cheers
Jon
-Original Message-
From: Thomas [mailto:[EMAIL PROTECTED]]
Sent: 07 December 2001 11:01
To: [EMAIL PROTECTED]
Subject: [PHP] Re: semaphores not
Hi! I'm trying to make dynamically related select boxes
(e.g. i have a 'State' select box, which, when i select
an item in it, it automatically refreshes the select box
'Cities' containing a list of cities in that particular
chosen state)
Good article on this at Zend:
Yes it is.
A good place to start is with the manual (http://www.php.net/mail), where
you will find an explanation of how to do it.
Cheers
Jon
-Original Message-
From: Gregory Jon Welling/Parts Trading Inc. [mailto:[EMAIL PROTECTED]]
Sent: 05 December 2001 11:07
To: [EMAIL PROTECTED]
Anyways, if any PHP people here are--god forbid--actually using MySQL as
their database, I would GREATLY appreciate any help in this matter. I've
thoroughly read the mysqldump chapter in the docs, and gone through
several tutorials, but have found nothing on actually restoring a
database
have you tried it with a
PERL-style shebang line at the top of your scripts? Give something like:
#!/usr/bin/php -q
On a WinNT/IIS box? I'll try, but never read anything like this...
Ah yes, good point :-)
Your path may be more like c:\progra~1\php\php.exe -q
I don't even know
Scope problem?
Try this:
function Output_Entries() {
global $DB_PATH, $DSN;
// rest of function
}
Cheers
Jon
-Original Message-
From: mweb [mailto:[EMAIL PROTECTED]]
Sent: 04 December 2001 12:28
To: [EMAIL PROTECTED]
Subject: [PHP] URGENT: IIS server now OK, but MS access DB not
Basically I want to be able to test that the db is running and if it isn't
then I want to 'run' it. Platform is NT, server is IIS4
It's a database, right? So surely it should be running as an NT service, in
which case it should be set to start automatically when the computer starts.
Your
Aha, I understand :-)
Have you looked at exec() and passthru()?
Start with http://www.php.net/manual/en/ref.exec.php, there are some notes
relating to Windows there...
Cheers
Jon
-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED]]
Sent: 04 December 2001 16:51
To: Jon
http://www.tuxedo.org/~esr/jargon/html/entry/foo.html
HTH
Jon
-Original Message-
From: Christoph Starkmann [mailto:[EMAIL PROTECTED]]
Sent: 29 November 2001 14:54
To: '[EMAIL PROTECTED]'
Subject: [PHP] foo-bar
BTW...
Can anybody tell me where the words
foo and bar
come from?
I use the latter style, because otherwise my syntax highlighting doesn't
kick in.
$filename = this $varname that; # $filename is in blue, the
rest is in green
$filename = this. $varname. that; # $filename and $varname are in
blue, the rest is in green
I've done it so much now
You could look into the nl2br() function, which converts \n -style newlines
(entered in TEXTAREAs) into HTML brs.
http://www.php.net/nl2br
HTH
Jon
-Original Message-
From: Tim Thorburn [mailto:[EMAIL PROTECTED]]
Sent: 26 November 2001 07:32
To: [EMAIL PROTECTED]
Subject: RE: [PHP]
You've already sent something to the browser... the line that starts with
HTMLHEAD...
Move that below the authentication code and all should be well.
HTH
Jon
-Original Message-
From: Per Waagen [mailto:[EMAIL PROTECTED]]
Sent: 22 November 2001 10:20
To: [EMAIL PROTECTED]
Subject:
PHPmyAdmin can export to .csv, which can be read into Excel with no
troubles.
Get it at http://www.phpwizard.net/projects/phpMyAdmin/
HTH
Jon
-Original Message-
From: Stanley [mailto:[EMAIL PROTECTED]]
Sent: 21 November 2001 10:34
To: [EMAIL PROTECTED]
Subject: [PHP] mysql export to
It's in the $HTTP_REFERER variable (speeling mistake intentional)
Be warned, though - not every browser supplies this in every circumstance.
Cheers
Jon
-Original Message-
From: Brandon Orther [mailto:[EMAIL PROTECTED]]
Sent: 15 November 2001 17:55
To: 'PHP User Group'
Subject: [PHP]
how did you plan on running php from cron?
Well, this works for me:
0 3 * * * lynx -dump http://mysite.com/mypage.php /dev/null
HTH
Jon
**
'The information included in this Email is of a confidential nature and is
Change your CDATA so it contains amp; instead of
HTH
Jon
-Original Message-
From: bill [mailto:[EMAIL PROTECTED]]
Sent: 12 November 2001 15:51
To: [EMAIL PROTECTED]
Subject: [PHP] parsing XML data with ampersands ()
When parsing XML data, the CDATA sometimes contains an ampersand
Yep. Design your own form, and feed the data from that to $PHP_AUTH_USER and
$PHP_AUTH_PW. Don't send the header() for the 403.
Cheers
Jon
-Original Message-
From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]]
Sent: 01 November 2001 17:18
To: [EMAIL PROTECTED]
Subject: [PHP] Is there a
if (!isset ($PHP_AUTH_USER)) {
header (Location: http://mydomain.com/mypage;);
}
would probably do the trick
Cheers
Jon
-Original Message-
From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]]
Sent: 01 November 2001 17:51
To: Jon Haworth; [EMAIL PROTECTED]
Subject: RE: [PHP
I'd be interested to see an example of an address that will not work
Which MTA are you using? On which OS? More info!
(obPeeve): Please don't post in HTML.
Cheers
Jon
-Original Message-
From: Matthew Luchak [mailto:[EMAIL PROTECTED]]
Sent: 31 October 2001 16:04
To: Php-General
Well hey, if mail() won't send to those addresses, what's wrong with us
testing them? :-)
ahem
Can you send to those addresses from a regular email client? If so, can you
do it from the command line with your MTA?
jon@maya~$ sendmail [EMAIL PROTECTED]
hello there
.
Cheers
Jon
-Original
Start your document with
?xml version=1.0?
Sorry, couldn't resist it :-)
http://www.w3.org/XML/ isn't a bad place to find out about it, but if you
find them a bit dry or you're in need of a nice tutorial then you'd better
get yourself over to http://hotwired.lycos.com/webmonkey/authoring/xml/
It's very simple - at the top of every page, have a routine that opens a
text file, reads the number inside it into a variable, adds one, and writes
it back out again. If the text file doesn't exist, create it.
Psuedocode:
if (file exists) {
open file for reading;
read contents into
You can find this code all over the web, an example of it can be seen at
most search engines on the Add a URL page :-)
What are you trying to do?
Cheers
Jon
-Original Message-
From: Krushna Kumar R [mailto:[EMAIL PROTECTED]]
Sent: 24 September 2001 15:08
To: [EMAIL PROTECTED]
Subject:
The name of that concept is a variable.
index.php?pg=1 means call index.php and set the variable $pg to 1
Cheers
Jon
-Original Message-
From: LRW [mailto:[EMAIL PROTECTED]]
Sent: 19 September 2001 21:04
To: [EMAIL PROTECTED]
Subject: Re: [PHP] preventing an include() from taking over?
A better version would be:
if (getenv(HTTP_X_FORWARDED_FOR)) {
$ip=getenv(HTTP_X_FORWARDED_FOR);
} else {
$ip=getenv(REMOTE_ADDR);
}
This checks for proxy forwarding as well, if you just use REMOTE_ADDR you
might end up with a proxy, not the real IP.
Cheers
Jon
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Getting IP address
On Wednesday 19 September 2001 13:13, Jon Haworth wrote:
A better version would be:
if (getenv(HTTP_X_FORWARDED_FOR)) {
$ip=getenv(HTTP_X_FORWARDED_FOR);
} else {
$ip=getenv(REMOTE_ADDR);
}
This checks for proxy
Why not just do
$today = date(j/m);
?
Cheers
Jon
-Original Message-
From: Daniel Alsén [mailto:[EMAIL PROTECTED]]
Sent: 19 September 2001 12:55
To: php
Subject: [PHP] Combining strings?
Hi,
i was trying to figure this out myself. But since the php-manual is down...
I want to
Well,
form action=?php echo $PHP_SELF; ? method=get
always works fine for me.
Note that you should use action instead of target, and the semicolon
after $PHP_SELF should be inside the ? not outside of it... might be one of
these two errors causing the problem (although I can't think why)
So echo a br as well.
echo $os. br; //this will do the trick
Cheers
Jon
-Original Message-
From: Johan Vikerskog (EMP) [mailto:[EMAIL PROTECTED]]
Sent: 06 September 2001 12:24
To: '_lallous'; [EMAIL PROTECTED]
Subject: RE: [PHP] Re: Question.
ok i have this:
?php
include
Without .htaccess you have two options:
1. Does your host offer a control panel? Mine has one where I can add
password protection to any directory I wish - worth checking out.
2. require() a php file at the top of every page in that directory that does
this:
if (user is allowed here) {
Can you send mail from the command line?
If you're running sendmail:
$ sendmail [EMAIL PROTECTED]
this is a test
.
If that goes through OK then I'd have a look at your script for bugs. If it
doesn't I'd have a look at your sendmail.cf :-)
Cheers
Jon
-Original Message-
From: Moise
If you run Apache you might want to look into the ab program, it's in the
apache/bin directory IIRC.
HTH
Jon
-Original Message-
From: Andrew Brampton [mailto:[EMAIL PROTECTED]]
Sent: 04 September 2001 16:48
To: [EMAIL PROTECTED]
Subject: [PHP] Load testing
Hi,
I'm looking for a app
Hi Nikola,
You need to add your PHP code to your HTML. I'm sure Dreamweaver allows you
to edit the HTML directly, but I don't know how I'm afraid. To check
everything's up and running, open Notepad (should be under
StartProgramsAccessories) and paste this in:
---start---
html
head
titleTest
1) can anyone refer me please to a public, postable MySQL newsgroup?
i've found a few MySQL newsgroups, but none of them allows posting. it
would be great if you could also tell me the name of the (public)
newsgroup server hosting the group.
Not sure, but a hunt around on
Won't sending a 401 header do the trick?
?php
header(WWW-Authenticate: Basic realm='my realm');
header(HTTP/1.0 401 Unauthorized);
?
Not sure, but worth a try.
Cheers
Jon
-Original Message-
From: Boris [mailto:[EMAIL PROTECTED]]
Sent: 31 August 2001 13:08
To: [EMAIL PROTECTED]
The @ suppresses any warning/error messages that are produced - hence the
complaints when it's taken out :-)
Cheers
Jon
-Original Message-
From: Erols [mailto:[EMAIL PROTECTED]]
Sent: 31 August 2001 01:06
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Syntax question.
Sorry for my
Couple of other tips for you.
1. SELECT * is bad unless you really need every field. If you don't, specify
which ones you want - the query will perform better.
$s = SELECT * FROM News; // bad
$s = SELECT NewsHeadline, NewsTeaser FROM News; // better
2. You appear to be connecting to your
PHP Hypertext Preprocessor (yes, it's recursive)
HTH
Jon
-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: 28 August 2001 11:38
To: Php-General
Subject: [PHP] What does PHP stand for?
It just crossed my mind: I don't know what PHP stands for...so anyone? :)
Yup, try qmail: www.qmail.org
You need to adjust the setting in your php.ini as well.
HTH
Jon
-Original Message-
From: Juraj Hasko [mailto:[EMAIL PROTECTED]]
Sent: 24 August 2001 14:19
To: [EMAIL PROTECTED]
Subject: [PHP] PHP sendmail
Hi,
I would like to know if PHP on *nix system
I was looking thru the mysql functions, and there doesn't seem to be one
that gives you the amount of time a query takes. Is there anyway to get
this information (since it gives it to you when you type queries
directly into the mysql shell client)? A script of mine is starting to
get
You can use the SQL keyword LIKE for this. Have a look at the MySQL docs
for full info, but the idea is you'd do something like:
$query = SELECT * FROM table WHERE question LIKE '%. $search_phrase. %';
HTH
Jon
-Original Message-
From: Wolfgang Schneider [mailto:[EMAIL PROTECTED]]
Sent:
I think you need to assign it to a variable and then echo that:
$dnsquery = exec(dnsquery -h domain.net);
echo $dnsquery;
HTH
Jon
-Original Message-
From: J.Mueller, pro.vider.de GmbH [mailto:[EMAIL PROTECTED]]
Sent: 17 August 2001 09:29
To: '[EMAIL PROTECTED]'
Subject: [PHP] Dnsquery
I think you need to assign it to a variable and then echo that:
$dnsquery = exec(dnsquery -h domain.net);
echo $dnsquery;
This is from the manual:
exec() executes the given command, however it does not output
anything
Use system instead.
Well, don't trust everything you read :-)
These
I think Jan meant that when PHP spits out Error in line x, it has a br
in there which causes the page to be invalid.
My question would be why are you trying to validate pages with errors in
anyway?
Cheers
Jon
-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: 17
The best way to do this, which is conveniently also the easiest, is to do it
within your SQL query.
$table = tablename;
$field = fieldname;
$query = select * from $table order by $field;
or, for descending sort:
$query = select * from $table order by $field desc;
HTH
Jon
-Original
Apache can be set up to parse whatever files you like as .php (you could
have .paul if you like...) - presumably your host has enabled this. If you
have access to .htaccess files (or the main server config, httpd.conf), you
can set this up on any Apache server with the line
AddType
Well, any text editor will do. Here are some links:
file://c:\windows\notepad.exe
http://www.editplus.com
http://www.ultraedit.com
Enjoy
HTH
Jon
-Original Message-
From: Kyle Smith [mailto:[EMAIL PROTECTED]]
Sent: 01 August 2001 20:09
To: [EMAIL PROTECTED]
Subject: [PHP] PHP EDITOR 4
if ($post = 1 $Age = ) {echo NO;}
else {echo YES;}
Now here is what happens. On a first time view of the page it outputs
'NO' (Good). If I dont enter anything in the age field and submit the
form it outputs 'NO' (Good). If I enter a value into the age field and
submit, it outputs
Don't bother.
Whatever you do (and it's usually a naff Javascript, search
javascript.internet.com or equivalents for examples), people can get round
it. You are wasting your time trying to stop this. If someone really wants
your content they can
- write it down
- take screenshots
- use a safe
What about something like:
?php
$sql_bands = SELECT Link FROM Table WHERE Category='band';
$sql_sites = SELECT Link FROM Table WHERE Category='site';
$sql_other = SELECT Link FROM Table WHERE Category='other';
$query_bands = mysql_query($sql_bands);
$query_sites = mysql_query($sql_sites);
GlacierHello,
I need to zip multiple files into 1 zip file for download.
Which function do I use to accomplish this?
Thanks!
http://www.php.net/exec
HTH
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
You've already checked the php.net site before asking this, I take it.
Oh wait... http://www.php.net/manual/en/ref.session.php
Maybe not :-)
Cheers
Jon
-Original Message-
From: Gabriele Biondo [mailto:[EMAIL PROTECTED]]
Sent: 30 July 2001 12:25
To: PHP
Subject: [PHP] Need for dox...
// Connect to MySQL
mysql_connect( 'localhost', 'balaji', 'pingpong' )
or die ( 'Unable to connect to server.' );
...and you'll be changing your password right about now, I suppose :-)
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail:
Try $HTTP_REFERER instead of $HTTP_REFERRER (yes, I know it's spelt wrong,
but try it :-)
Cheers
Jon
-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: 26 July 2001 14:53
To: '[EMAIL PROTECTED]'
Subject: [PHP] HTTP_REFERRER Problem
Here is the code I am trying to
Yes it is - have a look at www.php.net/exec to see how you can run commands
from your PHP scripts.
HTH
Jon
-Original Message-
From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2001 12:55
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP] php
Hi,
Is it possible
On which OS? For example, on a Linux box, I imagine you could do something
like
exec(mv old.directory.name new.directory.name);
Cheers
Jon
-Original Message-
From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2001 15:07
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject:
Yes, I would have thought this would do it:
if (strstr($file, /usr/local/apache/htdocs/) {
show_source($file);
} else {
echo File must be in /usr/local/apache/htdocs!;
}
Modify as appropriate.
Have I missed anything, or will this do the trick?
Cheers
Jon
-Original
$fromaddress = [EMAIL PROTECTED];
mail($toaddress, $subject, $mailcontent, $fromaddress);
Should probably be:
$fromaddress = From: [EMAIL PROTECTED];
mail($toaddress, $subject, $mailcontent, $fromaddress);
Splitting hairs a bit, a more accurate name for $fromadress would be
$headers - in the
I think perhaps a bit more detail is needed :-)
What's the error, can we see your code, what database are you using, etc.
Cheers
Jon
-Original Message-
From: akhil chugh [mailto:[EMAIL PROTECTED]]
Sent: 19 June 2001 05:30
To: [EMAIL PROTECTED]
Subject: [PHP] php bug reporting
Dear
May 2001 21:28
To: [EMAIL PROTECTED]
Subject: Re: [PHP] MySQL Select
why not just simply it more
while ($r = mysql_fetch_array($result))
{
// do your thing here
}
--
Chris Lee
[EMAIL PROTECTED]
Jon Haworth [EMAIL PROTECTED] wrote in message
67DF9B67CEFAD4119E4200D0B720FA3F53FA57
PHP 4 Bible (Converse/Park, IDG Books) has a chapter on OO programming that
contains sample code for an entire DB layer...
Failing that you can knock your own up really easily, using include() to
stick it in whatever script you fancy.
HTH
Jon
-Original Message-
From: Erich Reimberg
Something like:
if ($array_result = mysql_fetch_array($result)) {
do {
// do your thing here
} while ($array_result = mysql_fetch_array($result));
}
HTH
Jon
-Original Message-
From: Jamie Thompson [mailto:[EMAIL PROTECTED]]
Sent: 23 May 2001 14:33
To:
I thought MySQL already supported transactions, but only for Berkeley table
types...
http://www.mysql.com/doc/C/O/COMMIT.html
Cheers
Jon
-Original Message-
From: George E. Papadakis [mailto:[EMAIL PROTECTED]]
Sent: 23 May 2001 15:17
To: Hassan Arteaga; Php (E-mail)
Subject: Re: [PHP]
form
input name=foo tabindex=1
input name=bar tabindex=2
/form
HTH
Jon
-Original Message-
From: Tarrant Costelloe [mailto:[EMAIL PROTECTED]]
Sent: 22 May 2001 16:14
To: Php (E-mail)
Subject: [PHP] Tab ordereing
What's the syntax for defining the tab order on a input
http://www.php.net/manual/en/function.strstr.php
if (strstr (i like beer, beer)) {
// it's in there
} else {
// it's not
}
-Original Message-
From: Sandeep Hundal [mailto:[EMAIL PROTECTED]]
Sent: 21 May 2001 11:39
To: Php (E-mail)
Subject: [PHP] checking to see if part of a variable
Two things:
1. You might want to read the Zend article on chained selectors:
http://www.zend.com/zend/tut/drop-down.php
2. If it's a site to do with cars, it's marques, not marks.
Cheers
Jon
-Original Message-
From: Felipe Moreno [mailto:[EMAIL PROTECTED]]
Sent: 18 May 2001 15:10
To:
any joy on this list, you could try asking on a more
general list like evolt.org's thelist or wdvl.com's wdvltalk.
HTH
Jon
-Original Message-
From: Felipe Moreno [mailto:[EMAIL PROTECTED]]
Sent: 18 May 2001 17:12
To: Jon Haworth; [EMAIL PROTECTED]
Subject: RES: [PHP] REMOTE SCRIPTING
guess
Maybe the new host has a different compile setup for PHP, one that includes
a function named array_push(). Try renaming yours (push_array(), perhaps?)
and seeing if it works then.
/guess
HTH
Jon
-Original Message-
From: Theo Richel [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2001
Well, br / is the XHTML-compliant version of br.
In XHTML (the current W3C recommendation for web pages), you *have* to
explicitly close all tags (i.e. you have to use things like /p). Single
tags - br, hr, img, etc - have to be closed as well, and that's how
you do it.
br /
hr width=80% /
img
Well, it's not immediately obvious whether your date is in i, j, or f,
so let's pretend it's in date :-)
Try this:
while($amyrow = mysql_fetch_array($aresult))
{
echo /tdtdfont face=verdana size=1;
echo $amyrow[i];
echo /tdtdfont face=verdana size=1;
But he IS the webmaster
Cheers
Jon
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 08 May 2001 17:14
To: [EMAIL PROTECTED]; Kelly Meeks; '[EMAIL PROTECTED]'
Subject: Re: [PHP] OT question..
On Tue, May 08, 2001 at 06:10:18PM +0200, Christian Reiniger
I think the best way to handle this is not to care what it looks like in the
database. Store your dates as UNIX timestamps, and then they are easy to do
calculations on and/or convert to any date format you like for displaying in
your pages.
Read up on date() and mktime() for more info (there
] Date Time Formatting ??
Here is what I am trying to do, but I get the wrong date:
$t_data_array[1]=date(m/d/y,mysql_result($db_result,$db_record,'date'));
Then I simply print the value in the arraythis date instead of 05/08/01
comes
out 12/31/69
Thanks!
Jon Haworth wrote:
I think
Try this:
$Home = nl2br($Home); // nl2br converts newlines to brs
See http://www.php.net/nl2br for more info.
(Incidentally, I answered exactly the same question yesterday, in exactly
the same way. *Please* check the list archives/last few days postings/manual
before posting this sort of
Change the max_execution_time setting in your php.ini file.
You can also do it on a per-script basis but I can't remember how OTOH - a
search on the manual should find it though.
HTH
Jon
-Original Message-
From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
Sent: 03 May 2001 11:48
To:
Try this:
?php
$textfield = nl2br($textfield);
echo $textfield;
?
For more info, have a look at http://www.php.net/nl2br.
HTH
Jon
-Original Message-
From: Stampe, Lars [mailto:[EMAIL PROTECTED]]
Sent: 03 May 2001 13:35
To: [EMAIL PROTECTED]
Subject: RE: [PHP] textarea -- what happens
Wotcha Tris :-)
Try this:
mt_srand((double)microtime()*100);
$my_random_number = mt_rand(1, 20);
HTH
Jon
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 02 May 2001 12:07
To: [EMAIL PROTECTED]
Subject: [PHP] Random number generation...
Hi there,
A
The manual also says:
mt_rand -- Generate a better random value
I've been using mt_rand() over rand() every time - is there any reason not
to?
Cheers
Jon
-Original Message-
From: elias [mailto:[EMAIL PROTECTED]]
Sent: 03 May 2001 00:05
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Random
Try http://members.evolt.org/
HTH
Jon
-Original Message-
From: Manesh [mailto:[EMAIL PROTECTED]]
Sent: 27 April 2001 13:35
To: Manesh; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] RE: What is this??
I need a free web server that gives me 1 Myslq accound and php hoasting! if
Superb tutorial on Zend:
http://www.zend.com/zend/tut/authentication.php
HTH
Jon
-Original Message-
From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]]
Sent: 26 April 2001 13:03
To: [EMAIL PROTECTED]
Subject: [PHP] HTTP authentication for username password
How can I use the HTTP
quote src=bottom of every email
To unsubscribe, e-mail: [EMAIL PROTECTED]
/quote
HTH
Jon
-Original Message-
From: Walgamotte, David [mailto:[EMAIL PROTECTED]]
Sent: 24 April 2001 14:45
To: [EMAIL PROTECTED]
Subject: [PHP] How do I unsubscribe from this list
I would have thought you could use it as a CGI, if you can't get it running
as a module.
These manual pages look like they might be of use to you:
http://www.php.net/manual/en/install.netscape-enterprise.php
http://www.php.net/manual/en/install.hpux.php
Cheers
Jon
-Original Message-
/tmp is the directory used on Unix systems to store session info. On a
windows box you will need to change it to something like c:\temp or
c:\apache\sessions. IIRC it's in your php.ini file, not httpd.conf.
HTH
Jon
-Original Message-
From: Alexis Antonakis [mailto:[EMAIL PROTECTED]]
Yes, we know, you've told us three times now.
-Original Message-
From: Jeffrey Greer [mailto:[EMAIL PROTECTED]]
Sent: 10 April 2001 17:45
To: [EMAIL PROTECTED]
Subject: [PHP] __ $8/mo php hosting on 24/7, OC3+ web server ___
Hello,
I am offering php hosting with features at a price
Try this:
form name="myEditForm" action="edit.phtml?number=?php echo $exedit; ?"
method="post" onsubmit="return validate()"
This should display ?number correctly (I take it that's the problem).
You may also need to use "return validate();" or "javascript: return
validate();", not too sure
Your custom 404 is probably less than 512 bytes. This causes IE to display
its own inbuilt error page (don't ask me why :-) Push it over that and all
should be well.
HTH
Jon
-Original Message-
From: Andy Woolley [mailto:[EMAIL PROTECTED]]
Sent: 09 April 2001 18:00
To: [EMAIL PROTECTED]
Mike,
You could investigate the functions strstr (www.php.net/strstr) and stristr
(www.php.net/stristr), it sounds like they're what you're after.
HTH
Jon
-Original Message-
From: Mike [mailto:[EMAIL PROTECTED]]
Sent: 06 April 2001 15:42
To: [EMAIL PROTECTED]
Subject: [PHP] String in
But members.evolt.org does, along with MySQL, Cold Fusion, and a heap of
other goodies.
HTH
Jon
-Original Message-
From: Joe Stump [mailto:[EMAIL PROTECTED]]
Sent: 06 April 2001 17:03
I'm not sure about Freeserve, but I don't think that Geocities supports PHP
on their webpages (at
The comparison operator is ==. = means "assign". Try:
if ($num == 0) {
foo(bar, baz);
}
AFAIK what your code means is "assign 0 to $num and then, if that worked,
print the error message."
HTH
Jon
-Original Message-
From: Jeff Oien [mailto:[EMAIL PROTECTED]]
Sent: 06 April
What about:
$sql = "SELECT something FROM table";
$result = mysql_query($sql) or die ("Query failed!");
do_something(); //the query has succeeded if we get to this line
HTH
Jon
-Original Message-
From: Jordan Elver [mailto:[EMAIL PROTECTED]]
Sent: 29 March 2001 12:00
To: PHP Database
Whenever you're working on a server that only parses .php as PHP files, you
should use .php.
Whenever you're working on a server that only parses .phtml as PHP files,
you should use .phtml.
If you run your own server, or your server parses both .php and .phtml, you
can use either.
HTH
Jon
Head on over to http://members.evolt.org/ and have a look at what the
wonderful folks over there are offering.
HTH
Jon
-Original Message-
From: PIS Alaiddin Tayeh [mailto:[EMAIL PROTECTED]]
Sent: 22 March 2001 13:23
To: [EMAIL PROTECTED]
Subject: [PHP] Free Web Space
Is there any
You could have a check for the HTTP_REFERER variable, if it doesn't contain
"application.php", chances are they didn't come from that page.
There might be a neater way to do it, but I don't know it :-)
HTH
Jon
-Original Message-
From: Good Fella [mailto:[EMAIL PROTECTED]]
Sent: 22
201 - 300 of 341 matches
Mail list logo