Matty Sarro wrote:
Hey all!
This is probably my second post on the list, so please be gentle. Right now
I am running through the Heads First PHP and MySQL book from O'Reilly.
It's been quite enjoyable so far, but I have some questions about some of
the code they're using in one of the
João Cândido de Souza Neto wrote:
You made a mistake in your code:
?php the_title(); ?
must be:
?php echo the_title(); ?
Not necessarily: what if you have
function the_title()
{
echo Title;
}
for example...
In response to Sebastiano:
There would be not much point in using
Thanks, it's now much more clear. I thought that html parts outside
php tags were just dumped to output, no matter of if-else statements
and other conditions. I was *definitely* wrong
2009/7/23 Peter Ford p...@justcroft.com:
In response to Sebastiano:
There would be not much point in using
You made a mistake in your code:
?php the_title(); ?
must be:
?php echo the_title(); ?
--
João Cândido de Souza Neto
SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS
Fone: (0XX41) 3033-3636 - JS
www.siens.com.br
Sebastiano Pomata lafayett...@gmail.com escreveu na mensagem
2009/7/22 João Cândido de Souza Neto j...@consultorweb.cnt.br
You made a mistake in your code:
?php the_title(); ?
must be:
?php echo the_title(); ?
?= the_title(); ?
also works.
-Shane
--
João Cândido de Souza Neto
SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS
Fone: (0XX41) 3033-3636
Ted Turner http://www.brainyquote.com/quotes/authors/t/ted_turner.html -
Sports is like a war without the killing.
2009/7/23 Shane Hill shanehil...@gmail.com
2009/7/22 João Cândido de Souza Neto j...@consultorweb.cnt.br
You made a mistake in your code:
?php the_title(); ?
must be:
This is how I'd write this snippet
?php
if ( 'Home' !== ( $title = the_title('','',FALSE)))
{
echo 'h2 class=entry-header',
$title,
'/h2';
}
?
On Wed, Jul 22, 2009 at 6:31 PM, Lenin le...@phpxperts.net wrote:
Ted Turner
João Cândido de Souza Neto wrote:
You made a mistake in your code:
?php the_title(); ?
must be:
?php echo the_title(); ?
I haven't used worpress in a long time, but the the_title() function
might echo the title unless you pass the FALSE parameter, in which case
it just returns it.
--
1st page:
form
textarea name='thebody'/texarea
/form
2nd page:
$str_body = $_POST['thebody'];
mail('[EMAIL PROTECTED]', 'This is the
subject', $str_body);
Of course you can have the email and the subject fields come also from the
1st page.
Hope that helps!
--
itoctopus -
Man-wai Chang wrote:
create table temp ( big5 char(2) ) character set big5 collate big5_bin;
insert into temp ( big5 ) values ( 0x9f54 );
insert into temp ( big5 ) values ( 0x9f53 );
The 2nd query will report duplicated key. How should I fix the problem?
What does this has to do with PHP?
queries in the command-line MySQL client. If it works there but not
through mysqli_query() then you might have a case for asking here.
For the 13081 chinese alphabets I tried, only 1 one failed, and it's
0x9f54. mysqli_query() should have escaped the string for me. So ...
I suppose most PHP
Man-wai Chang wrote:
queries in the command-line MySQL client. If it works there but not
through mysqli_query() then you might have a case for asking here.
For the 13081 chinese alphabets I tried, only 1 one failed, and it's
0x9f54. mysqli_query() should have escaped the string for me.
create table temp ( big5 char(2) ) character set big5 collate big5_bin;
insert into temp ( big5 ) values ( 0x9f54 );
insert into temp ( big5 ) values ( 0x9f53 );
The 2nd query will report duplicated key. How should I fix the problem?
What does this has to do with PHP?
First of all I don't
Means you're passing the variable as reference.
This means that any change in the variable inside your function will affect
the variable outside your function, in other terms:
if you have
function myfunc($var){
$var = 5;
}
$a = 6;
myfunc($a);
will result in having $a=5 after the function
Satyam wrote:
for ($x=0;$x1000;$x++) {
echo ' trtdX is ' , $x , '/td/tr';
}
This seems to be a hair faster. I extended the test to 1 requests
(still concurrency 10) to make the test a little more reproducible:
echo str,var,str did 604.65 requests a second where trtd?= $x
?/td/tr did
How bored am I?
This bored: http://dev.stut.net/phpspeed/
Server is running PHP 5.1.2 (really should upgrade that) with no caches
of any sort.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
At 4:56 PM +0100 9/11/06, Stut wrote:
How bored am I?
This bored: http://dev.stut.net/phpspeed/
Server is running PHP 5.1.2 (really should upgrade that) with no
caches of any sort.
-Stut
Which begs the question, does it make much of a difference? (not you
being bored, but the rather
), they are the second best option.
Satyam
- Original Message -
From: Stut [EMAIL PROTECTED]
To: Jon Anderson [EMAIL PROTECTED]
Cc: Satyam [EMAIL PROTECTED]; php-general@lists.php.net
Sent: Monday, September 11, 2006 5:56 PM
Subject: Re: [PHP] Re: Newbie question about ?= ?
How bored am I?
This bored
Satyam wrote:
I admit I'm totally surprised about the buffered results.
Nevertheless, may I sugest you add the following to the series of tests?:
h3Using line-by-line single-quoted echobr/with comma
separated arguments/h3
snip
There seems to be one thing rarely anybody remembers,
tedd wrote:
At 4:56 PM +0100 9/11/06, Stut wrote:
How bored am I?
This bored: http://dev.stut.net/phpspeed/
Server is running PHP 5.1.2 (really should upgrade that) with no
caches of any sort.
-Stut
Which begs the question, does it make much of a difference? (not you
being bored, but
Jon Anderson wrote:
Stut wrote:
How bored am I?
This bored: http://dev.stut.net/phpspeed/
Server is running PHP 5.1.2 (really should upgrade that) with no
caches of any sort.
Just looking through the source, could you try changing the first
example to put the output all on one line? It's
- Original Message -
From: Stut [EMAIL PROTECTED]
To: Satyam [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Monday, September 11, 2006 6:32 PM
Subject: Re: [PHP] Re: Newbie question about ?= ?
Satyam wrote:
I admit I'm totally surprised about the buffered results
At 5:36 PM +0100 9/11/06, Stut wrote:
tedd wrote:
Opinions?
I would have to agree. Having watched the server CPU load while
playing with this test script it would appear that the performance
can be skewed a lot more by that than by the method you use for
squidging out the output.
As a
Mike Borrelli wrote:
Good day,
While I've been using php for more than a little while now, I've never
understood why the use of the ?= ...? short tag is noted to be
avoided.
Or rather, I understand that there's an option to disable it, and that's
why it's noted in this way, but I don't
- Original Message -
From: Al [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Sunday, September 10, 2006 5:52 PM
Subject: [PHP] Re: Newbie question about ?= ?
Mike Borrelli wrote:
Good day,
While I've been using php for more than a little while now, I've never
understood why
Al wrote:
Structurally, there is a far better way to compile your html pages.
This approach is easier to design and debug and it is faster since it
sends one complete packet instead of one for every short tag. And, it
saves using ob_start() and ob_flush().
Consider:
$report= '';
$report
- Original Message -
From: Jon Anderson [EMAIL PROTECTED]
To: php-general@lists.php.net
Cc: Al [EMAIL PROTECTED]
Sent: Sunday, September 10, 2006 9:16 PM
Subject: Re: [PHP] Re: Newbie question about ?= ?
Al wrote:
Structurally, there is a far better way to compile your html pages
Duggles Temple wrote:
Hi,
I'd like to say in advance that I am sorry about the silly and very newbie
question I'm asking.
I am having a problem with a shop system. I can't add values into the MySQL
DB via a PHP statement. The values are being transferred from one page to
another (know that
: [PHP] Re: Newbie Question Can't insert values into MySQL DB via
PHP
Duggles Temple wrote:
Hi,
I'd like to say in advance that I am sorry about the silly and very newbie
question I'm asking.
I am having a problem with a shop system. I can't add values into the
MySQL
DB via a PHP statement
try, ?PHP header(Location: Page_here); ?
www.BradTechnologies.com
99.9% Uptime
24/7 FREE Support
Plans starting at $3.50 per month
www.BradTechnologies.com
Pascal Platteeuw [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello everyone,
Here is a newbie question for you guys who
Thanks Ligaya
Ligaya Turmelle [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
it is refering to the associative array, specifically the $key = $value .
Note here (http://www.php.net/manual/en/language.types.array.php).
Respectfully,
Ligaya Turmelle
Gabe [EMAIL PROTECTED] wrote
it is refering to the associative array, specifically the $key = $value .
Note here (http://www.php.net/manual/en/language.types.array.php).
Respectfully,
Ligaya Turmelle
Gabe [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Looking at the code below, what exactly is happening with the
you need to declare your $monthname var as global, now you can use it!
function show_lang_date($timestamp, $country)
{
GLOBAL $monthname;
$date = getdate($timestamp);
echo mday = . $date['mday'] . ;
echo country = $country ;
$mon = $date[mon];
echo mon = . $mon . ;
echo
You can't do it that way.. You'll probably get parse error..
--
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
[EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
Sorry, I am new and could not supply the correct search strings on search
sites to answer by question.
it sounds like maybe you dont have the mysql php extension turned on in the
php ini file, or your php doesnt have mysql support?
Luke
James Marcinek [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello Everyone,
I'm new to this so forgive my ignorance. I'm trying to use php with
things to check..
check the register_globals flag in php.ini - you can also set this using
ini_set()
Check the short_open_tags are either on/off - again this chan be changes
in ini_set()
pete
News.Comcast.Giganews.Com wrote:
I am an experienced web developer who is just getting into php. I
How do I get PHP to automatically open another PHP page in a browser if a
condition is met?
I have a pull down HTML table that submits a form to a PHP script. That
script then uses a little logic to figure out which web page to go to. I
have 5 different pages, and each has different content.
see nl2br(). You might also want to convert spaces to nbsp;'s
On Fri, 9 Aug 2002, Kristoffer Strom wrote:
Ok, this is totally newbie but I just started messing around with PHP after
programming IBM's NetData for a while.
My first big problem I haven't been able to solve myself is how to
There we go :)
If there's any consolation, you just helped NataliePortman.com become a
better website :)
Thx
/Kris
Philip Hallstrom [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
see nl2br(). You might also want to convert spaces to nbsp;'s
On Fri, 9 Aug
Can you send the code that is failing to the list - it will help in working
out the problem...
Mikey
FréDéRick St-Hilaire [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
It a BASIC question,
With the following:
FORM NAME='Job_Application'
On Friday, May 31, 2002, 5:17:49 PM, you wrote:
Can you send the code that is failing to the list - it will help in working
out the problem...
And include your platform details (OS, PHP version, etc).
--
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hi,
I think you mean hwo u can get the data into an array
well here is an example :
$query = select ...;
$stmt = ociparse( $connectionhandle, $query );
if( ociexecute( $stmt, OCI_DEFAULT ) ){
ocifetchinto( $stmt, $row, OCI_ASSOC+OCI_RETURN_NULLS );
}
and now you got 1 resultset in an
R wrote:
Greetings people,
Special greetings to all of you who have helped me in the past.
As most of you know i am a newbie, I learned a bit of PHP via webmonkey and
a few other places, seeing the power of PHP i decided to convert from Java
servlets and JSP (JSP coz its expensive to host
try this:
html
head
titleSolid/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head
body bgcolor=#FF text=#00
table width=384 border=1
?php
$fp = fopen (album.dat,r);
while ($data = fgetcsv ($fp, 1000, ;))
{
if (isset($data[0]))
{
Strange..U sure you got the Win32 version??
Heres a mirror where u can get the installer:
http://www.evilwalrus.com/downloads/php/4.1.2/php-4.1.2-installer.exe
All the best,
Craig
Bogdan Popescu [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello all,
Try wget if it's installed. If not, lynx, a shell-based web browser, is
installed on quite a few machines.
J
Ben Turner wrote:
This may be a bit off topic but I am trying to install the pdflib package
for Linux so I can make pdfs through php and I was wondering if anyone
might know
You also seem to have an extra equals. Your loop should read:
while (false != ($file=readdir($handle))){
It should come up as an error, but I'm not sure.
Ben
Manuel Ritsch wrote:
Hello There
I'm new to PHP and trying to code a function that reads all teh files out of
a directory and
]
Subject: [PHP] Re: Newbie: Question about filesize()
You also seem to have an extra equals. Your loop should read:
while (false != ($file=readdir($handle))){
It should come up as an error, but I'm not sure.
Ben
Manuel Ritsch wrote:
Hello There
I'm new to PHP and trying to code a function
At 10:27 AM 2/6/2002 -0500, Ben Crawford wrote:
You also seem to have an extra equals. Your loop should read:
while (false != ($file=readdir($handle))){
I think you could eliminate the false != in the while condition...
It should be just the same if you write
while (($file = readdir($handle)))
On Wed, 2002-02-06 at 07:27, Ben Crawford wrote:
You also seem to have an extra equals. Your loop should read:
while (false != ($file=readdir($handle))){
It should come up as an error, but I'm not sure.
Ben
No, that's the 'identical' operator, which returns true when its
operands are
On Wed, 2002-02-06 at 15:33, Jeff Sheltren wrote:
At 10:27 AM 2/6/2002 -0500, Ben Crawford wrote:
You also seem to have an extra equals. Your loop should read:
while (false != ($file=readdir($handle))){
I think you could eliminate the false != in the while condition...
It should be
Manuel Ritsch [EMAIL PROTECTED] wrote:
$file_s = filesize($file);
you want $file_s = filesize(images/$file).
jim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To
Bunch of them!
Check php.net's links and sift through those.
Web Monkey has a good primer on PHP MySQL.
Geoff E [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Okay, probably been asked zillions of times already, but I couldn't find
reference to it in the last
Ok, I think I have the solution to your problem.
Try using nl2br() on the data in that field..
Example:
I have a message table that allows one user to send an instant message to
another user on my site. There are several fields, one of which being a TEXT
column (MySQL db). I use a simple
Rvb Pixels wrote:
Hi,
I'm new to the list and I have a problem with PHPNUKE 5.2 and W98.
After installing some categories and links in the Web Links section, and
then clicking on one of the links created I keep getting the following
message error in W98SE.
PHP caused an invalid page
Lb [EMAIL PROTECTED] wrote:
1) I thought that PHP automatically created variables for all form elements
on a page. When I run this, the dropdown box contains the first item, but
$Report evaluates as null. I am unclear why.
select name=ReportBR
option value=1 Test Report A/option
this counter'll increment the counter, no matter where are you go the page
from. If you only want that the counter increment for the first time
visitor visit the website, put the code at mainpage file, and check also
the page referrer weather it's a local url or not.
-toto-
Adam writes:
57 matches
Mail list logo