Re: [PHP-DB] echo into variable or the like

2012-08-21 Thread Karl DeSaulniers


On Aug 21, 2012, at 12:35 AM, s@optusnet.com.au wrote:

yeah, I am thinking I should make that a function and call it from a  
variable.

what do you think? I think I need a php.net 'arrays for dummies'.



Sean Williams
T: 0416 628 967 E: sm...@optusnet.com.au
Skype: seanw78
-Original Message- From: Karl DeSaulniers
Sent: Tuesday, August 21, 2012 2:22 PM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] echo into variable or the like

You echo to the page not to a variable.

php.net is your friend.

:)

GL


On Aug 20, 2012, at 11:01 PM, s@optusnet.com.au s@optusnet.com.au

wrote:


Hi, this is my first post so forgive me if I missed a rule and do  
something wrong.


I have this code,

echo $_SERVER['PHP_SELF'].?;
foreach ($_GET as $urlvar=$urlval)
echo $urlvar.=.$urlval.;

It works by it’s self.
I want to insert the output in a table.  Is there a way to ‘echo’   
into a variable(i.e. make the output of this echo the value of a   
variable) or am I on the wrong track all together?


Karl DeSaulniers
Design Drumm
http://designdrumm.com


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





Na just go to php.net and do a search.
Look up -

foreach()

There are examples to learn from php.net and other users there.
May not be a copy and paste job, you'll most likely want to adopt  
things to your
situation, but the fundamentals are all there. Best way/place to learn  
IMO.


Then I would go and google MySQL INSERT or what ever SQL Lang your  
using.

Again, I would go to the php.net link that pops up. :)
Those two things should get you on track for what it looks like your  
trying to do.


if your not there after those two things, look up
array() php

and so on...

..but your not far off with what you have, you just need to swap a  
$var = with the echo text looks like.
Then use $var in your INSERT statement like so. $sql = INSERT     
(var, ... )  Value( '.mysql_real_escape_string($var).',  );
The single quotes are only needed for strings too. For variables that  
are integers (numbers), you don't need them.


You may also want to go ahead and look into how to set up your mysql- 
php scripts with mysqli as well. Like using  
mysqli_real_escape_string() instead.
I think mysql_ is getting depreciated. Instead of learning one way and  
then finding out you have to migrate later. :-/


Please correct me if I am wrong anyone.

HTH,

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] echo into variable or the like

2012-08-21 Thread Daniel Brown
On Tue, Aug 21, 2012 at 12:01 AM,  s@optusnet.com.au wrote:
 Hi, this is my first post so forgive me if I missed a rule and do something 
 wrong.

 I have this code,

 echo $_SERVER['PHP_SELF'].?;
 foreach ($_GET as $urlvar=$urlval)
 echo $urlvar.=.$urlval.;

 It works by it’s self.
 I want to insert the output in a table.  Is there a way to ‘echo’ into a 
 variable(i.e. make the output of this echo the value of a variable) or am I 
 on the wrong track all together?

This question actually belongs on the PHP General mailing list.

As for echoing into a variable, the only way that's really
possible is with output buffering (ob_start(), ob_get_contents(),
ob_end_clean(), et al).  However, you don't need (and shouldn't want)
to do this here.  Instead, as your snippet really won't do much of
anything useful, you should (entirely) rewrite your code to look
something like this, for an HTML table:

?php
echo $_SERVER['PHP_SELF'].'?'.PHP_EOL;
echo 'table'.PHP_EOL;
foreach ($_GET as $key = $value) {
echo ' tr'.PHP_EOL;
echo '  td'.$key.'/td'.PHP_EOL;
echo '  td'.$value.'/td'.PHP_EOL;
echo ' /tr'.PHP_EOL;
}
echo '/table';
?

However, since it looks almost as if you're trying to build a
query string based upon the supplied GET variables, you may want to
try looking into http_build_query().

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] echo into variable or the like

2012-08-20 Thread s.dev
Hi, this is my first post so forgive me if I missed a rule and do something 
wrong.

I have this code,

echo $_SERVER['PHP_SELF'].?;
foreach ($_GET as $urlvar=$urlval)
echo $urlvar.=.$urlval.;

It works by it’s self. 
I want to insert the output in a table.  Is there a way to ‘echo’ into a 
variable(i.e. make the output of this echo the value of a variable) or am I on 
the wrong track all together?


Re: [PHP-DB] echo into variable or the like

2012-08-20 Thread Karl DeSaulniers

You echo to the page not to a variable.

php.net is your friend.

:)

GL


On Aug 20, 2012, at 11:01 PM, s@optusnet.com.au s@optusnet.com.au 
 wrote:


Hi, this is my first post so forgive me if I missed a rule and do  
something wrong.


I have this code,

echo $_SERVER['PHP_SELF'].?;
foreach ($_GET as $urlvar=$urlval)
echo $urlvar.=.$urlval.;

It works by it’s self.
I want to insert the output in a table.  Is there a way to ‘echo’  
into a variable(i.e. make the output of this echo the value of a  
variable) or am I on the wrong track all together?


Karl DeSaulniers
Design Drumm
http://designdrumm.com


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] echo into variable or the like

2012-08-20 Thread s.dev
yeah, I am thinking I should make that a function and call it from a 
variable.

what do you think? I think I need a php.net 'arrays for dummies'.



Sean Williams
T: 0416 628 967 E: sm...@optusnet.com.au
Skype: seanw78
-Original Message- 
From: Karl DeSaulniers

Sent: Tuesday, August 21, 2012 2:22 PM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] echo into variable or the like

You echo to the page not to a variable.

php.net is your friend.

:)

GL


On Aug 20, 2012, at 11:01 PM, s@optusnet.com.au s@optusnet.com.au

wrote:


Hi, this is my first post so forgive me if I missed a rule and do 
something wrong.


I have this code,

echo $_SERVER['PHP_SELF'].?;
foreach ($_GET as $urlvar=$urlval)
echo $urlvar.=.$urlval.;

It works by it’s self.
I want to insert the output in a table.  Is there a way to ‘echo’  into a 
variable(i.e. make the output of this echo the value of a  variable) or am 
I on the wrong track all together?


Karl DeSaulniers
Design Drumm
http://designdrumm.com


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] echo

2007-03-29 Thread elk dolk

thanks to Chris and Dimiter,
I think I am close but still the problem is not solved, when I add

echo img src='/album/img/.$row[photoFileName].' / 
to the code as it was sugested by Dimiter there is parse Error :

PHP Parse error: syntax error, unexpected $end in 
C:\Inetpub\wwwroot\album\show.php on line 44

line 44 is end of the code just after /html

what does it mean?


I am storing just the name of photos in the database and the photos are 
in /img folder  ,and there is no permissions issue. My testing server
is IIS And the path would be something like this : Inetpub\wwwroot\album\img
as I am running out of time! could someone complete this code just with 
one echo and img src so that I can retrive my photos ?

MySQL columns : photoID=seq number
photoFileName=name of my photo like 3sw.jpg
title=title
description=short description
-  
  

body

?php

$link = mysql_connect('localhost', 'root', 'pw');
if (!$link) {
 die('Not connected : ' . mysql_error());
}
  echo 'connected!';

$db_selected = mysql_select_db('album', $link);
if (!$db_selected) {
die ('Can\'t use foo : ' . mysql_error());
}


$query = SELECT * FROM photo;
$result=mysql_query($query);


while ($row = mysql_fetch_array($result)) 
{
  echo img src='/album/img/.$row[photoFileName].' / 
}


mysql_free_result($result);
?


/body
/html   


  
-
Looking for earth-friendly autos? 
 Browse Top Cars by Green Rating at Yahoo! Autos' Green Center.  

Re: [PHP-DB] echo

2007-03-29 Thread Brad Bonkoski

elk dolk wrote:

thanks to Chris and Dimiter,
I think I am close but still the problem is not solved, when I add

echo img src='/album/img/.$row[photoFileName].' / 
to the code as it was sugested by Dimiter there is parse Error :


PHP Parse error: syntax error, unexpected $end in 
C:\Inetpub\wwwroot\album\show.php on line 44

line 44 is end of the code just after /html

what does it mean?
  

probably you don't have a semi colon at the end of your echo line
nor is there and end double quote.



  
I am storing just the name of photos in the database and the photos are 
in /img folder  ,and there is no permissions issue. My testing server

is IIS And the path would be something like this : Inetpub\wwwroot\album\img
as I am running out of time! could someone complete this code just with 
one echo and img src so that I can retrive my photos ?



  

MySQL columns : photoID=seq number
   photoFileName=name of my photo like 3sw.jpg
   title=title
   description=short description
-


body


?php

$link = mysql_connect('localhost', 'root', 'pw');
if (!$link) {
 die('Not connected : ' . mysql_error());
}
  echo 'connected!';

$db_selected = mysql_select_db('album', $link);
if (!$db_selected) {
die ('Can\'t use foo : ' . mysql_error());
}


$query = SELECT * FROM photo;
$result=mysql_query($query);


while ($row = mysql_fetch_array($result)) 
{
  echo img src='/album/img/.$row[photoFileName].' / 
}



mysql_free_result($result);
?


/body
/html   



  
-
Looking for earth-friendly autos? 
 Browse Top Cars by Green Rating at Yahoo! Autos' Green Center.  
  


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] echo

2007-03-29 Thread elk dolk
thank you all,
it did it! 

[EMAIL PROTECTED]
You need a trailing 

you have echo img src='/album/img/.$row[photoFileName].' /

it needs to be 

echo img src='/album/img/.$row[photoFileName].' /;
 
-
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.

RE: [PHP-DB] echo

2007-03-29 Thread Bastien Koert

try

echo img src='/album/img/{$row[photoFileName]}' / ;

warpping the array element in braces allows for proper evaluation

bastien


From: elk dolk [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] echo
Date: Thu, 29 Mar 2007 05:08:36 -0700 (PDT)


thanks to Chris and Dimiter,
I think I am close but still the problem is not solved, when I add

echo img src='/album/img/.$row[photoFileName].' /
to the code as it was sugested by Dimiter there is parse Error :

PHP Parse error: syntax error, unexpected $end in 
C:\Inetpub\wwwroot\album\show.php on line 44


line 44 is end of the code just after /html

what does it mean?


I am storing just the name of photos in the database and the photos are
in /img folder  ,and there is no permissions issue. My testing server
is IIS And the path would be something like this : 
Inetpub\wwwroot\album\img

as I am running out of time! could someone complete this code just with
one echo and img src so that I can retrive my photos ?

MySQL columns : photoID=seq number
photoFileName=name of my photo like 3sw.jpg
title=title
description=short description
-

body

?php

$link = mysql_connect('localhost', 'root', 'pw');
if (!$link) {
 die('Not connected : ' . mysql_error());
}
  echo 'connected!';

$db_selected = mysql_select_db('album', $link);
if (!$db_selected) {
die ('Can\'t use foo : ' . mysql_error());
}


$query = SELECT * FROM photo;
$result=mysql_query($query);


while ($row = mysql_fetch_array($result))
{
  echo img src='/album/img/.$row[photoFileName].' /
}


mysql_free_result($result);
?


/body
/html



-
Looking for earth-friendly autos?
 Browse Top Cars by Green Rating at Yahoo! Autos' Green Center.


_
Fine Dining  Fancy Food. Check Out This Collection Of Good Eats. 
http://local.live.com/?mkt=en-ca/?v=2cid=A6D6BDB4586E357F!378


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] echo

2007-03-28 Thread Dimiter Ivanov

something like this : Inetpub\wwwroot\album\img
as I am running out of time! could someone complete this code just with one 
echo and img src so that I can retrive my photos ?

MySQL columns : photoID=seq number
photoFileName=name of my photo like 
3sw.jpg
 title=title
 description=short description


?php

$link = mysql_connect('localhost', 'root', 'pw');
if (!$link) {
die('Not connected : ' . mysql_error());
}

$db_selected = mysql_select_db('album', $link);

$query = SELECT * FROM photo;
$result=mysql_query($query);

while ($row = mysql_fetch_array($result))
{
echo???

}

mysql_free_result($result);

?



The path would be relative to your web root folder.

in your case
img src=/album/img/image_name

or if you are testing on your own machine use
img src=http://localhost/album/img/image_name;
or if you need it to work for outside connections :
img src=http://your_ip_addres/album/img/image_name;

i suggest using the relative path.

while ($row = mysql_fetch_array($result)) {
 echo img src='/album/img/.$row[photoFileName].' /
}

P.S.

Chris sorry for accidentaly sending it only to you the first time..

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] echo

2007-03-28 Thread Bastien Koert
if you view the source of the generated page, is the image name correct? is 
the path to the image correct?


bastien



From: elk dolk [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] echo Date: Tue, 27 Mar 2007 22:07:37 -0700 (PDT)

Hi all,
I am new to web programming.

I have code to add pictures to a MYSQL database. Now I can't seem to figure 
out how to get them back out ! so we can see them.
  The MySQL doesn't seem to be a problem (yet), also I'm trying to learn 
PHP.


 What I usually do is to load the images in a folder img and then the 
name of the pic (i.e. myphoto.jpg) in the database, so i retrieve the 
name of the pic with:


 Code: ?php
 $connex = MySQL_connect(server,login,password);
 $sql_query = select picname from photos where...;
 $result = MySQL_query($sql_query,$connex);
 $row = MySQL_fetch_array($result);
 ?

 and then:

 Code: echo img src=.$row['photoFileName']. alt='photo';

  but I can't see the photo
Any pointers or code samples will be greatly appreciated...


-
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.


_
RealLiveMoms: Share your experience with Real Live Moms just like you 
http://www.reallivemoms.ca/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] echo

2007-03-27 Thread elk dolk
Hi all,
I am new to web programming. 
  
I have code to add pictures to a MYSQL database. Now I can't seem to figure out 
how to get them back out ! so we can see them. 
  The MySQL doesn't seem to be a problem (yet), also I'm trying to learn PHP. 
  
 What I usually do is to load the images in a folder img and then the name of 
the pic (i.e. myphoto.jpg) in the database, so i retrieve the name of the pic 
with: 
  
 Code: ?php 
 $connex = MySQL_connect(server,login,password); 
 $sql_query = select picname from photos where...; 
 $result = MySQL_query($sql_query,$connex); 
 $row = MySQL_fetch_array($result); 
 ? 
   
 and then: 
 
 Code: echo img src=.$row['photoFileName']. alt='photo'; 
   
  but I can't see the photo
Any pointers or code samples will be greatly appreciated...

 
-
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.

Re: [PHP-DB] echo

2007-03-27 Thread Ron Croonenberg
You might be missing a quote so here and there unless you have the
quotes stored in the database too.

Since your photos are stored on disk, make sure  the webserver has
access to them.

Then make sure that your string is something like
 img src=pathphotoFileName

in php:  printf(img src=\%s%s\, $somepath, $somefilename);

in your php line: echo img src=.$row['photoFileName']. alt='photo';

the line echoed doesn't have any quotes in it.

Ron



elk dolk wrote:
 Hi all,
 I am new to web programming. 
   
 I have code to add pictures to a MYSQL database. Now I can't seem to figure 
 out how to get them back out ! so we can see them. 
   The MySQL doesn't seem to be a problem (yet), also I'm trying to learn PHP. 
   
  What I usually do is to load the images in a folder img and then the name 
 of the pic (i.e. myphoto.jpg) in the database, so i retrieve the name of 
 the pic with: 
   
  Code: ?php 
  $connex = MySQL_connect(server,login,password); 
  $sql_query = select picname from photos where...; 
  $result = MySQL_query($sql_query,$connex); 
  $row = MySQL_fetch_array($result); 
  ? 

  and then: 
  
  Code: echo img src=.$row['photoFileName']. alt='photo'; 

   but I can't see the photo
 Any pointers or code samples will be greatly appreciated...
 
  
 -
 Bored stiff? Loosen up...
 Download and play hundreds of games for free on Yahoo! Games.

-- 
=
 It's is not, it isn't ain't, and it's it's, not its, if you mean
 it is. If you don't, it's its. Then too, it's hers. It isn't
 her's. It isn't our's either. It's ours, and likewise yours and
 theirs.
  -- Oxford Uni Press
=
 Ron Croonenberg   |
   | Phone: 1 765 658 4761
 Lab Instructor   | Fax:   1 765 658 4732
 Technology Coordinator|
   |
 Department of Computer Science| e-mail: [EMAIL PROTECTED]
 DePauw University |
 275 Julian Science  Math Center  |
 602 South College Ave.|
 Greencastle, IN  46135|
=
 http://www.csc.depauw.edu/RonCroonenberg.html
=

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] echo

2007-03-27 Thread Chris

elk dolk wrote:

Hi all,
I am new to web programming. 
  
I have code to add pictures to a MYSQL database. Now I can't seem to figure out how to get them back out ! so we can see them. 
  The MySQL doesn't seem to be a problem (yet), also I'm trying to learn PHP. 
  
 What I usually do is to load the images in a folder img and then the name of the pic (i.e. myphoto.jpg) in the database, so i retrieve the name of the pic with: 
  
 Code: ?php 
 $connex = MySQL_connect(server,login,password); 
 $sql_query = select picname from photos where...; 
 $result = MySQL_query($sql_query,$connex); 
 $row = MySQL_fetch_array($result); 
 ? 
   
 and then: 
 
 Code: echo img src=.$row['photoFileName']. alt='photo'; 
   
  but I can't see the photo

Any pointers or code samples will be greatly appreciated...


Are you storing the whole file in the database or just the path to the file?

If you're storing just the path, then your script is pointing to the 
wrong directory and/or the file it's trying to reference doesn't exist 
(or a permissions issue maybe).




If you're storing the whole file you need a new php script to pull it 
back out.


Then in your html code you do:

echo 'img src=/path/to/display_image.php?image_id=' . $row['imageid'] 
. '';



That will hit 'display_image.php' and pull the image contents out of the 
database.


See 
http://www.phpriot.com/d/articles/database/images-in-mysql/page8.html 
for an example.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] echo

2007-03-27 Thread elk dolk

I am storing just the name of photos in the database and the photos are in /img 
folder  ,
and there is no permissions issue. My testing server is IIS And the path would 
be 
something like this : Inetpub\wwwroot\album\img
as I am running out of time! could someone complete this code just with one 
echo and img src so that I can retrive my photos ?

MySQL columns : photoID=seq number
photoFileName=name of my photo like 
3sw.jpg
 title=title
 description=short description


?php

$link = mysql_connect('localhost', 'root', 'pw');
if (!$link) {
die('Not connected : ' . mysql_error());
}

$db_selected = mysql_select_db('album', $link);

$query = SELECT * FROM photo;
$result=mysql_query($query);

while ($row = mysql_fetch_array($result)) 
{
echo???

}

mysql_free_result($result);
 
?
 
-
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.

Re: [PHP-DB] echo

2007-03-27 Thread Chris

elk dolk wrote:

I am storing just the name of photos in the database and the photos are in /img 
folder  ,
and there is no permissions issue.


So it's a path issue.

You need to reference the image as:

img src=/img/image_name_here

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] echo delay...

2007-02-16 Thread Matthew Ferry
Hi fellow php late night peoples

Thanks for everyone's help the last couple of days...
I have learned so much.  The best way to learn this stuff...is simple trial and 
error...
and thanks for good old Ggle!

My problem tonight is very simple.  I just don't know what command I want to 
use.
I want to echo text in a page then take a delay then echo more text/images to 
the same page.

I tried the sleep command with the number of seconds, but it don't load the 
page to the sleep timer is done.

any ideas of what php command I can use?

Matt


RE: [PHP-DB] echo delay...

2007-02-16 Thread Bastien Koert


I would suggest placing all the data into divs and using some js to show 
those divs when the time is right


bastien


From: Matthew Ferry [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] echo delay...
Date: Fri, 16 Feb 2007 03:37:17 -0500

Hi fellow php late night peoples

Thanks for everyone's help the last couple of days...
I have learned so much.  The best way to learn this stuff...is simple trial 
and error...

and thanks for good old Ggle!

My problem tonight is very simple.  I just don't know what command I want 
to use.
I want to echo text in a page then take a delay then echo more text/images 
to the same page.


I tried the sleep command with the number of seconds, but it don't load the 
page to the sleep timer is done.


any ideas of what php command I can use?

Matt


_
Your Space. Your Friends. Your Stories. Share your world with Windows Live 
Spaces. http://discoverspaces.live.com/?loc=en-CA


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] ECHO $variable

2006-10-08 Thread Bastien Koert
easist way is to wrap the entire value in single quotes not double 
quotes...kinda breaks the rules but it will work..the other option is to 
search your value and do a replace on the double quotes


bastien



From: Ron Piggott (PHP) [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: PHP DB php-db@lists.php.net
Subject: [PHP-DB] ECHO $variable
Date: Sun, 08 Oct 2006 01:32:13 -0400

In one of my scripts I have

input type=text name=message_title size=40 maxlength=80 value=?echo
$saved_message_title;?

where

$saved_message_title is 1 Peter 5:7 Cast all your cares on Him for He
cares about you
--- note the 

When this is displayed on the screen it reads

1 Peter 5:7

I am assuming the  closes the value=

How may I echo this to the screen and have the full text be displayed,
not just 1 Peter 5:7 ?

Ron


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] ECHO $variable

2006-10-08 Thread Jan Bailleul

You can as well add a backslash BEFORE the 

eg. echo text \more text\ ;

So that will return this: 
   text more text
- Original Message - 
From: Bastien Koert [EMAIL PROTECTED]

To: [EMAIL PROTECTED]; php-db@lists.php.net
Sent: Sunday, October 08, 2006 3:35 PM
Subject: RE: [PHP-DB] ECHO $variable


easist way is to wrap the entire value in single quotes not double 
quotes...kinda breaks the rules but it will work..the other option is to 
search your value and do a replace on the double quotes


bastien



From: Ron Piggott (PHP) [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: PHP DB php-db@lists.php.net
Subject: [PHP-DB] ECHO $variable
Date: Sun, 08 Oct 2006 01:32:13 -0400

In one of my scripts I have

input type=text name=message_title size=40 maxlength=80 value=?echo
$saved_message_title;?

where

$saved_message_title is 1 Peter 5:7 Cast all your cares on Him for He
cares about you
--- note the 

When this is displayed on the screen it reads

1 Peter 5:7

I am assuming the  closes the value=

How may I echo this to the screen and have the full text be displayed,
not just 1 Peter 5:7 ?

Ron


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] ECHO $variable

2006-10-07 Thread Ron Piggott (PHP)
In one of my scripts I have

input type=text name=message_title size=40 maxlength=80 value=?echo
$saved_message_title;?

where

$saved_message_title is 1 Peter 5:7 Cast all your cares on Him for He
cares about you
--- note the  

When this is displayed on the screen it reads

1 Peter 5:7 

I am assuming the  closes the value=

How may I echo this to the screen and have the full text be displayed,
not just 1 Peter 5:7 ?

Ron


Re: [PHP-DB] ECHO $variable

2006-10-07 Thread Niel Archer
Hi

Where's the DB question?

Niel

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Echo with extra characters

2003-01-08 Thread Alex Francis
I have the following code in my page as a header.
?
if ($mainarea==Language)
{
header(Location:add_5-14_material.php?mainarea=$mainarea);
}
else
{
}
?
When I echo $mainarea I get \'Language\'. I think it is something to do
with my quotation marks but need some help.

How do I get rid of the ' and \ so that I am left with my variable?.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Echo Command Thanks

2002-10-23 Thread Chris Payne
Hi there everyone,

Thank you all for your responses to my question about the best way to end a
PHP command (Or use Echo to print HTML).

My gut feeling was it should be ok, it's just that *To me* it is MUCH easier
to follow code which doesn't contain echo table width=50 etc . I
much prefer to do it ? table width=50 and so on, it seems to look much
cleaner to me.  I'm not a C+ programmer, a Perl programmer or anything like
that, i've learnt ASP and PHP, started with ASP but found it to be a system
hog, tried PHP and fell in love with it within a couple of days and just
wanted to make sure I wasn't putting unecessary strain on my server :-)

Thanks again everyone, this is the best PHP / Programming mailinglist out
there.

Regards

Chris Payne


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] echo printing a cookie

2002-10-15 Thread Steve Dodkins

Hi I'm trying to print the contents of a cookie (php 4.2.3) the syntax below
is wrong but what should it be?

if ($_cookie[cookiename]== TRUE) {
echopyour cookie is $_COOKIE[cookiename]/p;
}



Regards

Steve Dodkins

IMPORTANT NOTICE The information in this e-mail is confidential and should
only be read by those persons to whom it is addressed and is not intended to
be relied upon by any person without subsequent written confirmation of its
contents. ebm-ZIEHL (UK) Ltd. cannot accept any responsibility for the
accuracy or completeness of this message as it has been transmitted over a
public network.   Furthermore, the content of this e-mail is the personal
view of the sender and does not represent the advice, views or opinion of
our company. Accordingly, our company disclaim all responsibility and accept
no liability (including in negligence) for the consequences of any person
acting, or refraining from acting, on such information prior to the receipt
by those persons of subsequent written confirmation. In particular (but not
by way of limitation) our company disclaims all responsibility and accepts
no liability for any e-mails which are defamatory, offensive, racist or in
any other way are in breach of any third party's rights, including breach of
confidence, privacy or other rights. If you have received this e-mail
message in error, please notify me immediately by telephone. Please also
destroy and delete the message from your computer. Any form of reproduction,
dissemination, copying, disclosure, modification, distribution and/or
publication of this e-mail message is strictly prohibited.  If you have
received this E-mail in error, or suspect that the message may have been
intercepted or amended, please notify ebm-ZIEHL (UK) Ltd on +44(0)1245
468555.
ebm-ZIEHL (UK) Ltd Chelmsford Business Park, Chelmsford, Essex CM2 5EZ




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] echo printing a cookie

2002-10-15 Thread Jeffrey_N_Dyke


I belive $_cookie is different then $_COOKIE

Jeff



   

Steve Dodkins  

Steve.Dodkins@ebm-zi   To: Php-Db (E-mail) 
[EMAIL PROTECTED]   
ehl.co.uk  cc:

Subject: [PHP-DB] echo printing a 
cookie   
10/15/2002 09:21 AM

   

   





Hi I'm trying to print the contents of a cookie (php 4.2.3) the syntax
below
is wrong but what should it be?

if ($_cookie[cookiename]== TRUE) {
echopyour cookie is $_COOKIE[cookiename]/p;
}



Regards

Steve Dodkins

IMPORTANT NOTICE The information in this e-mail is confidential and should
only be read by those persons to whom it is addressed and is not intended
to
be relied upon by any person without subsequent written confirmation of its
contents. ebm-ZIEHL (UK) Ltd. cannot accept any responsibility for the
accuracy or completeness of this message as it has been transmitted over a
public network.   Furthermore, the content of this e-mail is the personal
view of the sender and does not represent the advice, views or opinion of
our company. Accordingly, our company disclaim all responsibility and
accept
no liability (including in negligence) for the consequences of any person
acting, or refraining from acting, on such information prior to the receipt
by those persons of subsequent written confirmation. In particular (but not
by way of limitation) our company disclaims all responsibility and accepts
no liability for any e-mails which are defamatory, offensive, racist or in
any other way are in breach of any third party's rights, including breach
of
confidence, privacy or other rights. If you have received this e-mail
message in error, please notify me immediately by telephone. Please also
destroy and delete the message from your computer. Any form of
reproduction,
dissemination, copying, disclosure, modification, distribution and/or
publication of this e-mail message is strictly prohibited.  If you have
received this E-mail in error, or suspect that the message may have been
intercepted or amended, please notify ebm-ZIEHL (UK) Ltd on +44(0)1245
468555.
ebm-ZIEHL (UK) Ltd Chelmsford Business Park, Chelmsford, Essex CM2 5EZ




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] echo printing a cookie

2002-10-15 Thread Simon Taylor

Here ya go..

if ($_cookie[cookiename]) {
echopyour cookie is.$_COOKIE['cookiename']./p;
}

Cheers
Simon

-Original Message-
From: Steve Dodkins [mailto:[EMAIL PROTECTED]] 
Sent: 15 October 2002 15:22
To: Php-Db (E-mail)
Subject: [PHP-DB] echo printing a cookie


Hi I'm trying to print the contents of a cookie (php 4.2.3) the syntax below
is wrong but what should it be?

if ($_cookie[cookiename]== TRUE) {
echopyour cookie is $_COOKIE[cookiename]/p;
}



Regards

Steve Dodkins

IMPORTANT NOTICE The information in this e-mail is confidential and should
only be read by those persons to whom it is addressed and is not intended to
be relied upon by any person without subsequent written confirmation of its
contents. ebm-ZIEHL (UK) Ltd. cannot accept any responsibility for the
accuracy or completeness of this message as it has been transmitted over a
public network.   Furthermore, the content of this e-mail is the personal
view of the sender and does not represent the advice, views or opinion of
our company. Accordingly, our company disclaim all responsibility and accept
no liability (including in negligence) for the consequences of any person
acting, or refraining from acting, on such information prior to the receipt
by those persons of subsequent written confirmation. In particular (but not
by way of limitation) our company disclaims all responsibility and accepts
no liability for any e-mails which are defamatory, offensive, racist or in
any other way are in breach of any third party's rights, including breach of
confidence, privacy or other rights. If you have received this e-mail
message in error, please notify me immediately by telephone. Please also
destroy and delete the message from your computer. Any form of reproduction,
dissemination, copying, disclosure, modification, distribution and/or
publication of this e-mail message is strictly prohibited.  If you have
received this E-mail in error, or suspect that the message may have been
intercepted or amended, please notify ebm-ZIEHL (UK) Ltd on +44(0)1245
468555. ebm-ZIEHL (UK) Ltd Chelmsford Business Park, Chelmsford, Essex CM2
5EZ




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] echo printing a cookie

2002-10-15 Thread Aaron Wolski


If (isset($_COOKIE[cookiename]) {

echo 'Your cookie is: '.$_COOKIE[cookiename].' br';

}
-Original Message-
From: Steve Dodkins [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 15, 2002 9:22 AM
To: Php-Db (E-mail)
Subject: [PHP-DB] echo printing a cookie


Hi I'm trying to print the contents of a cookie (php 4.2.3) the syntax
below is wrong but what should it be?

if ($_cookie[cookiename]== TRUE) {
echopyour cookie is $_COOKIE[cookiename]/p;
}



Regards

Steve Dodkins

IMPORTANT NOTICE The information in this e-mail is confidential and
should only be read by those persons to whom it is addressed and is not
intended to be relied upon by any person without subsequent written
confirmation of its contents. ebm-ZIEHL (UK) Ltd. cannot accept any
responsibility for the accuracy or completeness of this message as it
has been transmitted over a
public network.   Furthermore, the content of this e-mail is the
personal
view of the sender and does not represent the advice, views or opinion
of our company. Accordingly, our company disclaim all responsibility and
accept no liability (including in negligence) for the consequences of
any person acting, or refraining from acting, on such information prior
to the receipt by those persons of subsequent written confirmation. In
particular (but not by way of limitation) our company disclaims all
responsibility and accepts no liability for any e-mails which are
defamatory, offensive, racist or in any other way are in breach of any
third party's rights, including breach of confidence, privacy or other
rights. If you have received this e-mail message in error, please notify
me immediately by telephone. Please also destroy and delete the message
from your computer. Any form of reproduction, dissemination, copying,
disclosure, modification, distribution and/or publication of this e-mail
message is strictly prohibited.  If you have received this E-mail in
error, or suspect that the message may have been intercepted or amended,
please notify ebm-ZIEHL (UK) Ltd on +44(0)1245 468555. ebm-ZIEHL (UK)
Ltd Chelmsford Business Park, Chelmsford, Essex CM2 5EZ




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] echo printing a cookie

2002-10-15 Thread Ford, Mike [LSS]

 -Original Message-
 From: Steve Dodkins [mailto:[EMAIL PROTECTED]]
 Sent: 15 October 2002 14:22
 To: Php-Db (E-mail)
 
 Hi I'm trying to print the contents of a cookie (php 4.2.3) 
 the syntax below
 is wrong but what should it be?
 
 if ($_cookie[cookiename]== TRUE) {
 echopyour cookie is $_COOKIE[cookiename]/p;
 }

  if (isset($_COOKIE['cookiename'])) {
echo pyour cookie is {$_COOKIE['cookiename']}/p;
  }

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Echo function stopping

2001-04-02 Thread Shannon Doyle

Hi People,

Below I have included some code that just doesn't seem to be functioning all
correctly. I have this running and it appears to stop the query/echo after
the first entry in the database. What is it that I am doing wrong here??

Regards,
Shannon


?
$roundnum = "";
$sql = "select * from results order by round";
$dbh = @mysql_connect($dbhost,$dbuser,$dbpass);
$results = mysql_db_query($db,$sql,$dbh);
  for($i = 0; $i  mysql_num_rows($results); $i++) {
  $array[$i] = mysql_fetch_array($results);
}
mysql_close($dbh);
for ($i = 0; $i  count($array); $i++)  {
if ($array[$i]["round"] != $roundnum) {
  $roundnum = $array[$i]["round"];
  echo "trtd colspan='5'brp align='center'bfont
color='#99'Round ".$roundnum."/font/b/p/td/tr";
  echo "trtd width='100'p".$array[$i]["home"]."/p/tdtd
width='10'p".$array[$i]["home_goals"]."/p/tdtd width='50'\n";
if ($array[$i]["home_goals"]  $array[$i]["away_goals"]) {
  echo "pDefeated/p/td";
}
elseif ($array[$i]["home_goals"]  $array[$i]["away_goals"]) {
  echo "pDefeated by/p/td";
}
elseif ($array[$i]["home_goals"] == $array[$i]["away_goals"]) {
  echo "pDrew/p/td";
}
echo "td width='100'p".$array[$i]["away"]."/p/tdtd
width='10'p".$array[$i]["away_goals"]."/p/td\n";
}
}
?



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]