php-general Digest 10 Mar 2002 14:53:55 -0000 Issue 1218

Topics (messages 87892 through 87902):

Re: Selecting a Queried Row
        87892 by: Stephano Mariani
        87893 by: hugh danaher

Can anyone tell me which mail server is good???(Use in WindowsME/XP, don't use IIS)
        87894 by: hei
        87895 by: Jason Wong

Re: need help converting code to more efficient loop
        87896 by: Jason Wong

CSS Group
        87897 by: jtjohnston

PDFLib
        87898 by: Evan Nemerson

Different field sizes!
        87899 by: hauger.itg

Execute bash shell script in php
        87900 by: Neal Dewing

exec() fails?
        87901 by: samug

Re: apache and php installation problem
        87902 by: Chris Hewitt

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
If you mean what I think you mean:

<TD><A HREF="somewhere.php?somevar=something">Some Text (ID?)</A></TD>

> -----Original Message-----
> From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, 10 March 2002 12:13 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Selecting a Queried Row
> 
> As a newbie at PHP (and relative newcomer to HTML and web design) I've
> been
> wading through documentation trying to accomplish various tasks.
However,
> I'm
> stumped on how to proceed with the following:
> 
> I would like a web vistor to be able to select a row from a table that
has
> been generated from a query. The problem is I don't know how to code a
> paricular column (using the present <td> . . </td> syntax of the
table) so
> that each cell would have a "clickable" element (perhaps the 'ID'
number).
> 
> Once that cell is clicked, I would like to code
'onclick=some_function()'
> 
> Does this sound reasable way of approaching the problem, or is there a
> better
> way. [Btw, at present, while learning PHP, I am using
global_variables=on,
> but would like to try $PHP_SELF method to pick up session variables.]
> 
> Any help would be greatly appreciated, as well as pointers of where to
> look!
> 
> Tia, Andre
> 
> 
> --
> Please pray the Holy Rosary to end the holocaust of abortion.
> Remember in your prayers the suffering souls in Purgatory.
> 
> May God bless you abundantly in His love!
> 
> For a free Cenacle Scriptural Rosary Booklet --
> http://www.webhart.net/csrb/
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
Andre,

The following code block is from a site I'm developing for a local museum.
The site is now located at www.ironorchid.com/museum/  but will move
eventually to its own site.  In it, I have a list of the landmark trees,
with links to a map showing the location of the tree, a link to
maps.yahoo.com to get a detailed map of the location and or driving
directions, and links to show all the trees in an area of the city.  In
other words, the table is link crazy--sounded enough like what you want to
do that I responded to your question.  All of the data in the html table
comes from a mysql database with three database tables (heritage, trees,
sites).
If you use the mysql_fetch_array() command in a WHILE statement, you create
an array of the row or rows resultant from your query and have the mysql
column titles as your array keys.  You can then use the <a href= html tag to
put a link under the words in your table cells and generate the html code to
go to the next row of data.
As I said earlier, I have the bad habit of writing everything in php once I
need it on a page, so the code block might be a bit hard to read.  Let me
know if you need further details on what's provide.
Hope this helps,
Hugh

<?php
print "<table align=center bgcolor=white cellspacing=0 cellpadding=4
border=1 >";
 print "<tr bgcolor=Cornsilk><td><h5><b>ID # <a href=list.php
title=\"scientific name\"><b>Common
Name</b></a></h5></td><td><h5><b>Address</b></h5></td><td><h5><b>District</b
></h5></td></tr>";

 $db="some_database";
 $pass="some_password";
 $link=mysql_connect("localhost","","$pass");
 if (! $link) die("Can't log in at this time");
 mysql_select_db($db,$link) or die ("Can't log in at this time");
 $query="select * from heritage where asset_num>'0' order by asset_num";
 $result=mysql_query($query);
 if (!$result) die(mysql_error());
 while ($heritage=mysql_fetch_array($result))
  {
  $query2="select * from trees where id='".$heritage['plant_num']."' ";
  $result2=mysql_query($query2);
  $trees=mysql_fetch_array($result2);
  $query3="select * from sites where plant_num='".$heritage['plant_num']."'
";
  $result3=mysql_query($query3);
  $num=0;
  while ($sites=mysql_fetch_array($result3))
   {
   $links[$num]=$sites['link'];
   $num=$num+1;
   }
  print "<tr><td valign=top align=left><p><a
href=mapmastr.php?list1=1&tree=1&coordinate_x=".$heritage['x']."&coordinate_
y=".$heritage['y']." title=\"".stripslashes($trees['scientific_name'])."
native to ".$trees['native_to']."\"> &nbsp;".$heritage['asset_num']."
&nbsp;".stripslashes($trees['common_name'])."</a></p></td>
       <td valign=top align=left><p><a
href=http://maps.yahoo.com/py/maps.py?BFCat=&Pyt=Tmap&newFL=Use+Address+Belo
w&addr=".ereg_replace (" ", "+",
stripslashes($heritage['address']))."&csz=".$heritage['zip']."&Country=us&Ge
t%A0Map=Get+Map title=\"go to maps.yahoo.com to get a map of this address\">
&nbsp;".stripslashes($heritage['address'])."</a></p></td>
       <td valign=top align=left><p><a
href=mapmastr.php?district=".$heritage['town_name']." title=\"see the
location of all Landmark Trees in the ".$heritage['town_name']." District\">
&nbsp;".$heritage['town_name']."</a></td></tr>";
  }
 mysql_close($link);
print "</table>";
?>

----- Original Message -----
From: "Andre Dubuc" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 09, 2002 4:12 PM
Subject: [PHP] Selecting a Queried Row


> As a newbie at PHP (and relative newcomer to HTML and web design) I've
been
> wading through documentation trying to accomplish various tasks. However,
I'm
> stumped on how to proceed with the following:
>
> I would like a web vistor to be able to select a row from a table that has
> been generated from a query. The problem is I don't know how to code a
> paricular column (using the present <td> . . </td> syntax of the table) so
> that each cell would have a "clickable" element (perhaps the 'ID' number).
>
> Once that cell is clicked, I would like to code 'onclick=some_function()'
>
> Does this sound reasable way of approaching the problem, or is there a
better
> way. [Btw, at present, while learning PHP, I am using global_variables=on,
> but would like to try $PHP_SELF method to pick up session variables.]
>
> Any help would be greatly appreciated, as well as pointers of where to
look!
>
> Tia, Andre
>
>
> --
> Please pray the Holy Rosary to end the holocaust of abortion.
> Remember in your prayers the suffering souls in Purgatory.
>
> May God bless you abundantly in His love!
>
> For a free Cenacle Scriptural Rosary Booklet --
http://www.webhart.net/csrb/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Can anyone tell me which mail server is good???(Use in WindowsME/XP, don't
use IIS)
_________________________________________ wai wing hei ICQ#:102663005
Current ICQ status: SMS: (Send an SMS message to my ICQ): +2783142102663005
More ways to contact me: http://wwp.icq.com/102663005
_________________________________________


--- End Message ---
--- Begin Message ---
On Sunday 10 March 2002 10:06, hei wrote:
> Can anyone tell me which mail server is good???(Use in WindowsME/XP, don't
> use IIS)

CommuniGatePro (www.stalker.com) is pretty good.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
For people who like that kind of book, that is the kind of book they will 
like.
*/
--- End Message ---
--- Begin Message ---
On Saturday 09 March 2002 18:08, Timothy J. Luoma wrote:
> Hello!  I am trying to reduce the size of the code below, which I believe
> can be simplified.
>
> I checked the 'for' entry in the manual as well as googling for some
> similar code, but did not have any luck.
>
> Here is what I have:
>
>
> $ICON_COUNT="0";
>
> if ($SHOW_WAI_ICON != "no")
> {
>       $ICON_COUNT++ ;
> }
>
> if ($SHOW_BOBBY508_ICON != "no")
> {
>       $ICON_COUNT++ ;
> }
>
> if ($SHOW_W3_ICON != "no")
> {
>       $ICON_COUNT++ ;
> }
>
> if ($SHOW_CSS_ICON != "no")
> {
>       $ICON_COUNT++ ;
> }
>
>
> Now I would like to make that a 'for' loop, but I'm not sure how to do it
> in PHP.
>
> In case it is not clear what I am trying to do, this is what I would do if
> PHP syntax were like bash:
>
> variables="SHOW_CSS_ICON SHOW_W3_ICON SHOW_BOBBY508_ICON SHOW_WAI_ICON"
>
> for i in $variables
> do
>
>       if [ "$i" != "no" ]
>       then
>               #increment icon_count here
>       fi
>
> done
>
>
> I'm just not sure about the nested syntax in PHP.


$doo = array("SHOW_CSS_ICON", "SHOW_W3_ICON");
foreach($doo as $dah) {
  if (${$dah} != "no") {
    $ICON_COUNT++;
  }
}

*** Untested, use with caution! ***



-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Don't put off for tomorrow what you can do today because if you enjoy it 
today,
you can do it again tomorrow.
*/
--- End Message ---
--- Begin Message ---
Can anyone recommend a good CSS news group?


--- End Message ---
--- Begin Message ---
>From http://www.pdflib.com/pdflib/faq.html:

"This demo stamp appears when one of our binaries distributed by PDFlib GmbH 
is used. It can be disabled by purchasing a PDFlib license, and applying the 
delivered license key (serial) at runtime with the PDF_set_parameter() 
function as indicated in the manual. With the ActiveX/COM edition of PDFlib 
the serial can also be supplied during the installation process."

I have a license key, now what parameters do I pass PDF_set_parameter()? The 
PHP man doesn't say, nor does the PDFLib man (so far as I can tell). Any help 
would be greatly appreciated- I'm getting pretty frustrated.


Thanks in advance,
Evan Nemerson





-- 

"Employ your time in improving yourself by other men's writings, so that you 
shall gain easily what others have labored hard for."

-Socrates
--- End Message ---
--- Begin Message ---
Hello,
I 've a question: If I select data from a mysql database in the www with the
php script to show it on my web site, I get different field sizes in the
same coloumn. It's a format problem but I don't no which one. Has anybody
the solution to my question?

Best regards

Innovations- und
Technologiefoerdergemeinschaft e.V.(ITG)
Willi Hauger (Vorsitzender)

Gefrdert durch das Institut
der deutschen Wirtschaft in Kln
(INSTI-Erfinderclub der ITG e.V.)

Erlenstrasse 48
78050 VS-Villingen
Telefon: (07721)53821
Telefax: +49 (0)69 791213262
mailto:[EMAIL PROTECTED]
http://www.t-online.de/home/forum.itg/
Oeffnungszeiten des ITG_Bueros_VS:
Mittwochs von 18h-20h

--- End Message ---
--- Begin Message ---
Amit,

$output = shell_exec("./checklist'");
echo nl2br($output);

Works great,

Neal
--- End Message ---
--- Begin Message ---
Hi,
I'm quite new to php and I'm trying to execute a file with
exec("executable.exe"); and nothing happens.
I have win2k with apache 1.3.23 and php 4.1.1 (ISAPI).
I read somewhere that running external programs with isapi is impossible. Is
that true? I can still run system commands, i.e. system("dir *.*"); Why is
that? Any ideas?



--- End Message ---
--- Begin Message ---
Duncan,

Just a thought, does the user that apache is running as have permissions 
to read/execute the file?

Regards

Chris

Duncan wrote:

>Hi,
>
>i currently installed latest apache and php on my RH 7.2 system.
>However, i allways get the following error now:
>
>/usr/local/apache/bin/apachectl configtest 
>Syntax error on line 216 of /usr/local/apache/conf/httpd.conf: 
>Cannot load /usr/local/apache/libexec/libphp4.so into server: 
>€Ø+@€Ø+@((Ø+@Ø+@˜Ø+@˜Ø+@ Ø+@ 
>Ø+@¨Ø+@¨Ø+@°Ø+@°Ø+@¸Ø+@¸Ø+@ÀØ
>+@ÀØ+@ÈØ+@ÈØ+@ÐØ+@ÐØ+@ØØ+@ØØ+@àØ+@àØ+@èØ+@èØ+@ðØ+@ðØ+@øØ+@øØ
>+@: shared object not open 
>
>
>
>The error_log says:
>
>Cannot load /usr/local/apache/libexec/libphp4.so into server: 
>/usr/local/apache/libexec/libphp4.so: cannot open shared object file: No such file or 
>directory
>
>...but the file IS there! I don't understand this error.
>
>I had to comment all php-based lines within the httpd.conf file, to get apache up and 
>running again! 
>
>My problem is, that i need to get php up and running asap, so any help is more than 
>welcome. 
>
>Thanks in advance, 
>
>regards, 
>
>Duncan
>
>
:wq



--- End Message ---

Reply via email to