I cannot seem to get this right. How can I produce yesterday?
$today = date(Y-m-d);
$yesterday = date(Y-m-) . date(d)-1;
$yesterday = date(Y-m-d)-1;
$yesterday = date(Y-m-.d-1);
I've been looking at the manual :) ...
Thanks,
John
--
PHP General Mailing List (http://www.php.net/)
To
$_POST['submitter'] has anything in it, and sometimes it's called
after they hit submit and it has something in it?
if (isset($_POST['submitter']) yes == $_POST['submitter']){
http://php.net/isset
--
John Taylor-Johnston
How can I get an integer value for mysql_affected_rows()? I get text:
n Database Transfer(s).
I would like to create my own error flag and exit; if the number of
affected rows is = 0.
The example for mysql-num-rows in the manual does not work. I have MySQL
- 4.1.12.
$num_rows =
Humour me. I knew how to do this. I want to parse $searchenquiry and see
if it contains searchenquiry=.
Good grief, sorry.
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jasper Bryant-Greene wrote:
John Taylor-Johnston wrote:
Humour me. I knew how to do this. I want to parse $searchenquiry and
see if it contains searchenquiry=.
$yourAnswer = ( strpos( $searchenquiry, 'searchenquiry=' ) !== false );
Thanks,
John
--
PHP General Mailing List (http
()*
http://ca.php.net/manual/en/function.strpos.php instead.
Rob Agar wrote:
heh. you perhaps remember the strstr function..? :)
Rob
-Original Message-
From: John Taylor-Johnston
[mailto:[EMAIL PROTECTED]
Sent: Friday, 30 September 2005 2:26 PM
To: php-general@lists.php.net
they want to store and then have a check out where
I'll header it all into a txt file.
session_name(ESLpostcard);
session_start();
session_register(yourname);
if (isset($HTTP_POST_VARS[yourname])) $yourname =
$HTTP_POST_VARS[yourname];
--
John Taylor-Johnston
$TrolleyContents is a string.
Basically what I want to accomplish here is if $TrolleyContents already
exists append $AddToTrolley to $TrolleyContents, if not register
$TrolleyContents.
Am I going about it right?
John
?php
#printcontents.php
session_name(CCLTrolley);
session_start();
if
Robert Cummings wrote:
On Sat, 2005-10-01 at 23:57, John Taylor-Johnston wrote:
$TrolleyContents is a string.
Basically what I want to accomplish here is if $TrolleyContents already
exists append $AddToTrolley to $TrolleyContents, if not register
$TrolleyContents.
Am I going about
'] ) == '' )
{
$_SESSION['TrolleyContents'] = $_POST['AddToTrolley'];
}
else
{
$_SESSION['TrolleyContents'] .= ','.$_POST['AddToTrolley'];
}
}
echo $_SESSION['TrolleyContents'];
phpinfo();
?
Robert Cummings wrote:
John Taylor-Johnston wrote:
Robert Cummings wrote:
Why is it outdated
Robert Cummings wrote:
?php
session_name( 'CCLTrolley' );
session_start();
// Initialize the trolley.
if( !isset( $_SESSION['TrolleyContents'] ) )
{
$_SESSION['TrolleyContents'] = array();
}
// Add new entry.
if( isset( $_POST['AddToTrolley'] ) )
{
Robert Cummings wrote:
And $_SESSION instead of session_register and always access your session
vars through $_SESSION.
I'm safe with PHP Version 4.1.2 ?
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Robert Cummings wrote:
To decrement the quantity of an item in the trolley:
?php
if( isset( $_SESSION['TrolleyContents'][$myData-RNum] ) )
{
$_SESSION['TrolleyContents'][$myData-RNum] -= 1;
if( $_SESSION['TrolleyContents'][$myData-RNum] = 0 )
{
unset(
Karl,
I cannot make promises, but I might have someone. If he answers me, I'll
let you know.
He got me started a few years ago. Excellent teacher, and author of
phpMyAdmin :-P
John
Karl James wrote:
Hello Team,
I was wondering if there is anyone that would like to teach
Me the language as
Robert Cummings wrote:
Is there a reason you're using a comma delimited string? I would
recommend using an array instead:
?php
session_name( 'CCLTrolley' );
session_start();
// Initialize the trolley.
if( !isset( $_SESSION['TrolleyContents'] ) )
{
$_SESSION['TrolleyContents'] = array();
}
Warning: Bad arguments to implode() in /var/.../printtrolley.php on
line 14
Array ( [TrolleyContents] = 1 3 4 4 5 6 )
I restarted Mozilla and tried again.
It's ok now.
Thanks for your time.
Array
(
[TrolleyContents] = Array
(
[16] = 16
[30] = 30
[47]
This is the old version I demonstrated. You should go with the later
version that sets the values to the quantity :)
I thought I had? Haven't I?
But this is the easiest shopping cart I have ever seen.
However, I still have not understood what you were doing with these
lines I commented out.
This is what you recommended.
Is there a reason you're using a comma delimited string? I would
recommend using an array instead:
?php
session_name( 'CCLTrolley' );
session_start();
// Initialize the trolley.
if( !isset( $_SESSION['TrolleyContents'] ) )
{
$_SESSION['TrolleyContents'] = array();
Excellent. Thanks. I think I follow what you have done. But to clarify,
and learn, what are you doing with -= ?
$trolley[$item] -= $quantity;
Likewise, i had not followed what you were doing with the lines I
commented out. They did not seem to work, and I succeeded in doing what
I wanted
after removing $quantity of $itembr /;
trolleyPrint();
if( $trolley[$item] 1 )
{
unset( $trolley[$item] );
echo Trolley after cleaning up empty entry for $itembr /;
trolleyPrint();
}
}
?
Cheers,
Rob.
--
John Taylor-Johnston
Robert Cummings wrote:
I took a look at your link and it appears to be working fine, though you
haven't yet wired up the viewcart.php
When I create viewcart.php, what is the best way to extract and display
the contents of $_SESSION['TrolleyContents'] ?
Do I use my $sql value?
or in my while
$mydata-RNum - $mydata-field1: $mydata-field2.;
}
}
Thanks,
John
Robert Cummings wrote:
On Mon, 2005-10-03 at 16:38, John Taylor-Johnston wrote:
Robert Cummings wrote:
I took a look at your link and it appears to be working fine, though you
haven't yet wired up the viewcart.php
When I
Use foreach to traverse the array and display each trolly entry nicely
This might be cleaner? I'm not sure if I'm using while and list right,
but somehting like that?
$glquery = mysql_query($sql);
while ($mydata = mysql_fetch_object($glquery)) {
while (list($_SESSION['TrolleyContents'],
Any idea why I'm getting this error, and only on this page? I have the
same header on every other page?
http://testesp.flsh.usherb.ca/thingstodo.html
The page contains a \n before I start my ?php. Is this doing it?
?php
session_name( 'CCLTrolley' );
session_start();
// Initialize the trolley.
Michael Crute wrote:
The page contains a \n before I start my ?php. Is this doing it?
That \n is it. You can't send ANYTHING to the browser before you send
the headers and cookies are part of the headers. Take out the \n and
all should be well.
Thanks. Dreamweaver screwed me over ;)
Robert Cummings wrote:
On Mon, 2005-10-03 at 18:08, John Taylor-Johnston wrote:
Use foreach to traverse the array and display each trolly entry nicely
If list() works for you it's fine. I don't really use it so not entirely
sure of it's functionality with respect to looping.
I
Is there a OS java (or other) html editor I can implement on a Web page.
I want a user to type text, use bold, italics, etc.
I would then store the html in a MySQl record and then use php to insert
the edited text.
I've seen some packaged, in Moodle for example.
John
--
PHP General Mailing
Looks good. But I was hoping for open source.
John
Torgny Bjers wrote:
John Taylor-Johnston wrote:
Is there a OS java (or other) html editor I can implement on a Web
page. I want a user to type text, use bold, italics, etc.
I would then store the html in a MySQl record and then use php
Thanks Rob. They are hard to choose between?! I'll play with both. I
only want the very basics.
Thanks!
John
On Tue, 2005-10-18 at 23:52, John Taylor-Johnston wrote:
Is there a OS java (or other) html editor I can implement on a Web page.
I've seen some packaged, in Moodle for example
and then use php to
insert the edited text.
[/snip]
Sorry I missed this earlier. Have you looked at htmlArea?
http://www.htmlarea.com/
--
John Taylor-Johnston
-
If it's not Open Source, it's Murphy's Law
SCRIPT_NAME and PHP_SELF always include leading url information and
slashes. Is there a function I can use to skin either down to the
filename? No slashes or leading url.
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks!
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Here,s my guess:
var $liveclass;
$liveclass = new(Test);
echo $liveclass-get() ;
echo BR ;
echo This is in the php code block ;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Found this on one of my favourite tech show sites:
http://www.flickr.com/photos/globalhermit/sets/1134389/show/
Is there something in PHP I can script or find toproduce a slide show of
the contents of a Linux directory? (Baby pictures :) )
John
--
PHP General Mailing List
Does anyone see anything wrong with my code below? It works in other
files, on other servers. I copied and pasted it exactly?
It won't recognise the user name or password. Does Authenticate work on
all servers? Here is my phpinfo if that helps?!
Robert Cummings wrote:
On Sat, 2005-10-22 at 17:59, John Taylor-Johnston wrote:
Does anyone see anything wrong with my code below? It works in other
files, on other servers. I copied and pasted it exactly?
It won't recognise the user name or password. Does Authenticate work on
all servers
Robert Cummings wrote:
On Sat, 2005-10-22 at 18:21, John Taylor-Johnston wrote:
Robert Cummings wrote:
On Sat, 2005-10-22 at 17:59, John Taylor-Johnston wrote:
Does anyone see anything wrong with my code below? It works in other
files, on other servers. I copied and pasted
name them) of
galeries to work. :(
Show me one that generates thumbnails - And works for you personally.
But thanks for the Yahoo key words to search with: PHP image gallery
scripts.
Any one :) Please.
Richard Lynch wrote:
On Sat, October 22, 2005 11:15 am, John Taylor-Johnston wrote
luckily I can do. But not always for everyone.
Thanks,
John
Richard Lynch wrote:
On Sun, October 23, 2005 12:09 am, John Taylor-Johnston wrote:
... out there, I'll eat my hat. :-)
Get your false teeth out and glue them on. I defy you to find one that
works.
Not counting
It does what I want, but I worry 4096 may not be big enough. Possible?
Is there a way to detect the filesize and insert a value for 4096?
$buffer = fgets($dataFile, $filesize);
Is this what it is for?
John
?php
#http://ca3.php.net/fopen
$filename = /var/www/html2/assets/about.htm ;
$dataFile =
I have some html + php stored in a mysql record. But when I echo the
contents:
$mydata-HTML=input type=text size=40 value=?php
if($searchenquiry)
echo stripslashes(htmlspecialchars($searchenquiry));
? name=searchenquiry /;
the php is not activated; rather I see ?php ... ? in my html
Does eval() have a synonym?
I store html in a mysql record, extract it into $contents. Under normal
circumstances, I have to eval($contents) to get any embedded php code to
work.
But when I use FCKeditor:
http://testesp.flsh.usherb.ca/~johj2201/ramtest.php
$contents='input type=text
I need to generate embedded php within in a mysql record. $contents is
the actual contents of that record.
?php
$contents = div class=\indent\ style=\font-size: 16px; font-family:
arial,helvetica; font-weight: bold;\About the Project/div
?php echo \hello world\; ?;
echo eval($contents);
?
I
?php
$contents = div class=\indent\ style=\font-size: 16px; font-family:
arial,helvetica; font-weight: bold;\About the Project/div
?php echo \hello world\; ?;
echo eval($contents);
?
eval() expects PHP code, not HTML with embedded PHP code. Try this
(untested):
eval( ? $contents ?php );
eval( ? $contents ?php );
However, if eval() is the answer, you're probably asking the wrong
question. You should take a hard look at your code and think of a better
way to do what you need to do.
Back to the drawing board? It is either store my html+embedded code in a
mysql record, or in
I guess I won the powerball $100 million. I'd feel better with the cash ;)
John
Robert Cummings wrote:
Does eval() have a synonym?
The infinite set of source code permutations that can output the word
'red' as a sole output regardless of whatever other logic may occur
within the content of
New server, new config. PHP 4.3.9 and new mysql db.
phpmyadmin works among other scripts, including:
http://compcanlit.usherbrooke.ca/whovisits.php
But this bugger won't:
http://testesp.flsh.usherbrooke.ca/testdb.phps
http://testesp.flsh.usherbrooke.ca/phpinfo.php
I cannot even see the
Ok, you are all used to working with register_gloabsl=off.
mail($to, stripslashes($subject), wordwrap($message, 60), From:
$from\r\n);
I change this line to:
mail($to, stripslashes($_POST[subject]), wordwrap($_POST[message],
60), From: $_POST[from]\r\n);
and I get:
Parse error: parse
this within other quotation marks and only if the
array's index is a string.
Hope that helps,
Larry
--
John Taylor-Johnston
-
If it's not Open Source, it's Murphy's Law.
' ' 'Collège de Sherbrooke:
ô¿ôhttp
Patience please :)
See my html below. Basically, if type=checkbox is checked, I'm trying to build
$to string in mail().
parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or
T_VARIABLE or T_NUM_STRING line 4
How do I rebuild this peice of code to be register_globals=off
I'm using PHP Version 4.3.9 and MySQL 4.1.12. I recently upgraded from
PHP 4.1.x and MySQL 4.0.x.
Basically my SQL below now render empty set. It worked until my upgrade.
Basically ORDER BY relevancy DESC no longer works, I think!?
I got help building this $SQL here, so I'm hoping
My question is simnple. I want to randomly select a row in a mysql
table. I have a primary id.
?php
$server = localhost;
$user = foo;
$pass = foo;
$db=foo_db;
$table=foo_table;
$myconnection = mysql_connect($server,$user,$pass);
mysql_select_db($db,$myconnection);
$sql = ??;
$news =
Hi,
I want to echo the location of head.jpg hidden in some deep dark
recess of my server, unbeknownst to me.
Which shell command do I use? How do I echo it?
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
With my counter, I track RemoteHost and IPAddress and save it in a mysql table.
One of my colleagues asked me these questions (below).
I can track number of hits per month. Is there any OS code anywhere that I
might implement to see geographical tendencies?
John
Is it possible to track this as
I want to include a phps file. But would like it to display the coloured
formatting of a phps, instead of executing the code with in. Is this possible?
This does not work:
include(sendmail.phps);
Thanks,
John
--
John Taylor-Johnston
How do I get PHP to create a table, if one does not already exist?
I have to do something with:
$news = mysql_query($sql) or die(print mysql_error());
What can I also add something to $sql?
$sql = if not exists CREATE TABLE `demo_assignment1` ...
John
snip
$server =
http://dev.mysql.com/doc/mysql/en/create-table.html
Thanks. Then this looks reasonable?
Would anyone code it differently?
#
$server = localhost;
$user = myname;
$pass = mypass;
$db = mydb;
$table = demo_assignment1;
Hi,
I've read:
http://dev.mysql.com/doc/mysql/en/create-table.html
Would anyone code/approach this differently?
#
$server = localhost;
$user = myname;
$pass = mypass;
$db = mydb;
$table = demo_assignment1;
Sorry to bother. I was hoping for inspiration. The code works. I wonder if
there is a cleaner way?
John
John Taylor-Johnston wrote:
Hi,
I've read:
http://dev.mysql.com/doc/mysql/en/create-table.html
Would anyone code/approach this differently
Hi,
FOpen question. My script is dying. Our results file could not be opened for
writing
What can I add to get more info from the die? Do I «have» to specify a pathname
in $defaultfile?
John
$defaultfile = ffmail.txt; #default file to write to
@ $results = fopen($datafilename, a); #open
errors
#print custom error if file doesn't exist or improper permissions
if (!$results) { die (Our results file could not be opened for writing.); }
--
John Taylor-Johnston
-
If it's not Open Source, it's Murphy's Law
I could use:
or die($php_errormsg);
but it is turned off in my php.ini and I can't modify it myself.
John
FOpen question. My script is dying. Our results file could not be opened for
writing
What can I add to get more info from the die?
$defaultfile = ffmail.txt; #default file to write
Burhan Khalid wrote:
Can you give me a send email sample?
RTFM : http://www.php.net/manual/en/function.mail.php
Burhan,
That's awfully polite. RTFM. How are people supposed to get started? Take
that attitude back over to the Perl newsgroup. One of the joys of PHP has been
a
Hi,
W+ does not work either.
I have resorted to adding a blank, 0 byte text file.
But it needs chmod 666.
Interesting, I add this line:
chmod($defaultfile, 666);
and it send back an illegal error, but it appears to work anyway - the data is
written!
What does the at_sign mean at the start of
Thanks for that!
John
Richard Lynch wrote:
On Sat, March 19, 2005 6:48 am, John Taylor-Johnston said:
chmod($defaultfile, 666);
http://php.net/chmod
has examples that tell you exactly why this is wrong...
666 is decimal.
The 666 you want is Octal.
They ain't the same number
Richard, thanks.
chmod($defaultfile, 666);
http://php.net/chmod
has examples that tell you exactly why this is wrong...
The 666 you want is Octal.
chmod($defaultfile, 0666);
Check. Thanks. Didn't pay enough attention to that.
What does the at_sign mean at the start of this line?
@
server.
It's part of a bigger tutorial:
http://compcanlit.usherbrooke.ca/eslcafe/hotpotatoes/hot-potatoes_104.htm
I'm still working on it.
John Taylor-Johnston wrote:
I've read:
http://dev.mysql.com/doc/mysql/en/create-table.html
Would anyone code/approach this differently
Thanks! Needed to know that!
:) John
Josh Whiting wrote:
$sql = INSERT INTO $table
(StudentNumber,Exercise1,Exercise2) values
('$StudentNumber','$Exercise1','$Exercise2');
mysql_select_db($db,$myconnection);
mysql_query($sql) or die(print mysql_error());
your example looks pretty
Martin,
Anyone,
I'm desperate :( PHP isn't sending my SQL correctly. It's not a MySQL problem. It's my
PHP syntax.
Debugging:
http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+maria%26quot%3B
$sql = 'SELECT ... FROM '.$table.' WHERE MATCH ... AGAINST
(\'ready maria\' IN BOOLEAN
Tom,
Anyone,
No I'm not looking for a , I'm trying to pass double quotes into MySQL.
Like I said, it works when debugging:
http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+maria%26quot%3B
http://ccl.flsh.usherb.ca/print/display.test.inc.phps
but fails when I try to pass my
are the field types in the mysql DB?
-Original Message-
From: John Taylor-Johnston [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 4 December 2002 4:13 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Whimper, help :)
Tom,
Anyone,
No I'm not looking for a , I'm trying to pass double
http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+maria%26quot%3B
http://ccl.flsh.usherb.ca/print/index.html?search=%26quot%3Bready+maria%26quot%3B
I blame PHP. Can't be MySQL.
echo $sql displays the EXACT same thing.
Debugging ... Works jdaxell.ccl = 2 records found:
$sql =
http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+maria%26quot%3B
http://ccl.flsh.usherb.ca/print/index.html?search=%26quot%3Bready+maria%26quot%3B
I blame PHP. Can't be MySQL.
echo $sql displays the EXACT same thing.
Debugging ... Works jdaxell.ccl = 2 records found:
$sql =
Hi,
Can someone take a look at this again, please?
http://news.php.net/article.php?group=php.generalarticle=126934
Your posts so far have proven fruitless. Thanks for trying. :) I do appreciate it.
I will try to answer everyone at the same time.
Someone mentionned it might be a problem with
What are magic quotes? Will this help me?
http://news.php.net/article.php?group=php.generalarticle=126934
How is this different from stripslashes.
I have RTF doc :)
http://www.php.net/manual/en/function.get-magic-quotes-gpc.php
Be gentil ::p
--
John Taylor-Johnston
.
Robbert van Andel
-Original Message-
From: John Taylor-Johnston [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 04, 2002 9:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Sigh :)
Hi,
Can someone take a look at this again, please?
http://news.php.net/article.php?group=php.generalarticle
:33, John Taylor-Johnston wrote:
Hi,
Can someone take a look at this again, please?
http://news.php.net/article.php?group=php.generalarticle=126934
Your posts so far have proven fruitless. Thanks for trying. :) I do appreciate it.
I will try to answer everyone at the same time
=php.generalarticle=126934
JTJ How is this different from stripslashes.
JTJ I have RTF doc :)
JTJ http://www.php.net/manual/en/function.get-magic-quotes-gpc.php
JTJ Be gentil ::p
JTJ --
JTJ John Taylor-Johnston
JTJ -
JTJ
Humour me. New server. I'm a little tired.
Where is my php.ini on a red hat server?
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Can I check mysql version so if version = 4 $sql = 'version 4 stuff' else $sql
=version 3 stuff;
--
John Taylor-Johnston
-
If it's not open-source, it's Murphy's Law.
- Université de Sherbrooke
mysql SELECT VERSION();
- '3.23.13-log'
Ok, how do I PHP it for greater than or equals version 4 :?
John
Johannes Schlueter wrote:
On Sunday 08 December 2002 20:42, John Taylor-Johnston wrote:
Hi,
Can I check mysql version so if version = 4 $sql = 'version 4 stuff' else
Does anyone know what the limit is for a FULLTEXT Index in MySQL 3.23.49+?
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I used to think I knew how to do this ... take pity :)
I start my session:
session_name(TestALS);
session_start();
I register a variable:
session_register(studentid);
if (isset($_SESSION[studentid]))
{
$id = $_SESSION[studentid];
echo \$studentid= $studentidbr;
}
Pretend $studentid contains
I did call session_start() before anything is output to the browser.
http://www.php.net/manual/en/function.session-start.php
I only have one php file so I know I'm recyling my code each time:
session_name(TestALS);
session_start();
session_register(studentid);
if (isset($_SESSION[studentid]))
{
Jason wrote:
RTFM again.
Jason, again, I RTFM, but did not get it working.
Otherwise I wouldn't have dared ask a question.
Sessions depends on a number of factors
including your version of PHP and the setting of register_globals.
The FM manual says:
$_SESSION (or $HTTP_SESSION_VARS with PHP
[familyname];
echo yay session works, \$familyname= $familynamebr;
}
--
John Taylor-Johnston
-
If it's not open-source, it's Murphy's Law.
' ' ' Collège de Sherbrooke:
ô¿ô http://www.collegesherbrooke.qc.ca
] Session: I RTFM
Date: Sat, 14 Dec 2002 18:41:40 -0500
From: John Taylor-Johnston [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED
http://www.php.net/manual/en/function.in-array.php
Can't find the °ù¢# $needle in my $haystack. Why? :p
(It is a serious example :)
?php
$needle = Ten things I hate about you;
if(in_array($needle, $haystack)) {
echo Found it;
}else{
echo Not there;
}
$haystack = array (Ten Things I
Yes I'm reading the FM :) http://www.php.net/manual/en/ref.mysql.php
I should know this. How will I PHP this SQL into my MySQL table?
INSERT INTO testals VALUES ($part1, $part2, $part3, $part4);
I'm particularily concerned aboute single quotes. How do I escape them? Should I?
Here is what I
Hope you got your answer before now?
Run phpinfo(); inside a php file.
See:
$DOCUMENT_ROOT
or
$_SERVER[DOCUMENT_ROOT]
All other variables you need are listed there. $_SERVER[TEMP], for example, is very
useful. Don't forget to add the $ to the beginning of the variable name.
I couldn't
Y'sure? Spam bot?
John
Martin Towell wrote:
na! didn't work :) g
-Original Message-
From: Roger Lewis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 4:59 PM
To: Php-General
Subject: [PHP] test
This is a test.
--
--
PHP General Mailing List
Roger,
Are you emailing or posting to the news group?
John
Roger Lewis wrote:
But it did! Otherwise I wouldn't have received your comment. Why did I get
this message from Mailer-Daemon:
Sorry. Your message could not be delivered to:
php-list,emc (The name was not found at the remote site.
I use $mycounter, not saying it is pretty. But if you have a whole bunch of stuff
deleted, your last id might be worth a lot more than the actual number of rows.
$myconnection = mysql_connect($server,$user,$pass);
mysql_select_db($db,$myconnection);
$news = mysql_query('select * from '.$table.'
Lookee there, I'm getting it now and I'm sending to the newsgroup.
Subject:
NDN: [PHP] Re: mysql_num_rows
Date:
Wed, 18 Dec 2002 14:18:28 +0800
From:
Mailer-Daemon [EMAIL PROTECTED]
To:
[EMAIL PROTECTED]
Sorry. Your message could not be delivered to:
Jeff or anyone,
Ok, I'll bight. What are you doing with the % and %7 ?
$idx=1;
echo(TR)
while(fetch_rows) {
printf(TD%s/TD, ID);
if($idx%7=0) {echo('/TRTR'}
++$idx;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I think this is perl? REMOTE_HOST
How can I do this? I want to check the referer. If A do Aa, else Bb
I can't find a variable in phpinfo()
?php
$appareil = getenv('REMOTE_HOST');
if(strpos($appareil, www.foo.ca))
{
echo found $appareil;
}else{
echo did not find $appareil;
}
?
--
PHP General
The deal is my ISP does a redirect from www.delete.compcanlit.ca to
www.delete.compcanlit.usherbrooke.ca. I'm trying to if statement the redirect. Again,
I find no variable in phpinfo().
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What happened when you tried that?
Nothing. Nothing showed. In fact nothing for getenv('REMOTE_HOST') in the else either.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
message. Nothing
appeared as the referrer.
John
John Nichel wrote:
Try...
$_SERVER['HTTP_REFERER']
John Taylor-Johnston wrote:
The deal is my ISP does a redirect from www.delete.compcanlit.ca to
www.delete.compcanlit.usherbrooke.ca. I'm trying to if statement the redirect. Again,
I find
John Nichel wrote:
Try...
$_SERVER['HTTP_REFERER']
John Taylor-Johnston wrote:
The deal is my ISP does a redirect from www.delete.compcanlit.ca to
www.delete.compcanlit.usherbrooke.ca. I'm trying to if statement the redirect. Again,
I find no variable in phpinfo().
John
101 - 200 of 562 matches
Mail list logo