php-windows Digest 10 Sep 2001 21:10:35 -0000 Issue 748 Topics (messages 9283 through 9306): 405 Method Not Allowed 9283 by: Sichta Daniel Re: How to pass the authentication info. to SMTP server? 9284 by: Michel Laine Re: webserver root 9285 by: Michel Laine tutorials 9286 by: Gillies, James V. & Cynthia L. 9293 by: Juan-Pierre Havenga Canīt get ImageTTFBBox to work 9287 by: Claus Bloch 9288 by: Claus Bloch 9289 by: Claus Bloch 9290 by: Claus Bloch LDAP with SSL 9291 by: Sigurd Brinch getallheaders() help! 9292 by: Ross Fleming mail() emalloc() Error 9294 by: Simon Myers Re: Status of a stable ISAPI?? 9295 by: Steve Latest version of PHP 9296 by: Mitja Pagon Re: Closing Excel using DCOM and Release() 9297 by: Jeff Waldock 9300 by: Alain Samoun 9301 by: Jeff Waldock searching for a file 9298 by: afan 9299 by: Asendorf, John 9304 by: CJD reading arrays within a field from mysql and separating the values 9302 by: Robert Trembath 9303 by: Asendorf, John 9305 by: CJD Re: php4apache.dll not loading under W98/Apache/PHP4.0.4 9306 by: Jean Philippe Reis 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] ----------------------------------------------------------------------
Hi all, cfg: w2k, Apache1.3, php4.0.4 In index.html I have form with method set to POST. When I try to acces this page I'm getting this error The requested method POST is not allowed for the URL /index.html. Could anybody know what does it mean and how can I solve it ? DAN
If you are using the "built in" mail() function in PHP you cannot sent authentication - it assumes that you have a "sendmail" server. There is a php class available at http://phpclasses.upperdesign.com/ that may solve your problem. -- Michel Laine Balaji Ankem wrote: > Hi, > here my SMTP server is needed authentication . > I have the valid user id and password . > > What are the variables i have to set for username and password in php.ini > > please guide me. > > Thanks and regards > -Balaji > > ------------------------------------------------------------------------ > Name: Wipro_Disclaimer.txt > Wipro_Disclaimer.txt Type: Plain Text (text/plain) > Encoding: 7bit
Can't you just use include("filename.php") for the webroot... ...and use include("..\pages\filename.php") for subdirs? Assumed that you set the webroot in PHP .ini and change forward/backward slash depending on what OS you use. Mitja Pagon wrote: > Hi! > > I'm am an ASP developer, that decided to give PHP a try. So far I have been > nothing but impresed by PHP. But I have found one problem, that i can't find > a solution to. > When including files in ASP pages using <!--#virtual="/filename.asp"--> I > was able to include files into pages using path relative to the webserver > root. I have tried similar in PHP using include("/filename.php"), but just > recently learned that "/" slash charachter moves the pointer to the root of > the drive on which webserver directory is located on. I'm running PHP 4.0.6 > on WinNT with IIS4.0, therefor $DOCUMENT_ROOT variable doesn't work. I'm > writing an application that should be portable not just from server to > server, but also from platform to platform, so I can't have fixed paths in > my scripts. > My question is: "Is there any way I can get the root of the webserver in a > fashion simmilar to that of the method ASP uses?" > > Thanks, > > Mitja Pagon -- Michel Laine Engineer / Network Administrator SYSTEM TECHNOLOGY SWEDEN AB Phone:(+46)-8-982255 Fax:(+46)-8-982060 Snail mail: Vretenvagen 2, 171 54 SOLNA, SWEDEN E-mail: [EMAIL PROTECTED] WWW: http://www.systemtech.se
Do you know of any tutorials for PHP?
http://www.phpbeginner.com/ -- Juan-Pierre Havenga, [EMAIL PROTECTED] on 10/09/2001 at 02:43:48 PM
I get an error :: Could not find/open font . My the font is locating at the same dir as the file/string that call it: ImageTTFBBox($ttf_size,0,'DRAGONW.ttf',$show_txt); Is the setup of php wrong or what??? If you can help me i bee happy Claus Bloch DK [EMAIL PROTECTED]
"Claus Bloch" <[EMAIL PROTECTED]> skrev i en meddelelse news:... > I get an error :: Could not find/open font . My the font is locating at the > same dir as the file/string that call it: > > ImageTTFBBox($ttf_size,0,'DRAGONW.ttf',$show_txt); > > Is the setup of php wrong or what??? > > If you can help me i bee happy > > > Claus Bloch > DK > [EMAIL PROTECTED] > > >
I get an error :: Could not find/open font . My the font is locating at the same dir as the file/string that call it: ImageTTFBBox($ttf_size,0,'DRAGONW.ttf',$show_txt); Is the setup of php wrong or what??? If you can help me i bee happy Claus Bloch DK [EMAIL PROTECTED]
Becuse that i haed som problen whith my news group this file wil appaer more than ones: I get an error :: Could not find/open font . My the font is locating at the same dir as the file/string that call it: ImageTTFBBox($ttf_size,0,'DRAGONW.ttf',$show_txt); Is the setup of php wrong or what??? If you can help me i bee happy Claus Bloch DK [EMAIL PROTECTED]
Hi, Does anyone know wether the LDAP module delivered with php 4.0.6 is compiled with SSL support, If not, does anyone have one? Regards Sigurd Brinch
Hello, I've used php before, but have only just installed it on my win98 machine at home with apache for the first time. Does anyone have ANY idea why I get "Call to undefined function: getallheaders()" ? Is there a certain extension I should be loading? Appreciate any help Ross Fleming
We've been getting an error message when trying to call the mail() function: FATAL: emalloc(): Unable to allocate -5675919 bytes Treating that large negative number as an unsigned integer makes that just over 4 gigabytes, which the server blatantly doesn't have. But it doesn't make sense for anything to be requesting that much memory. The script works fine on Linux/Apache, only behaving like this on Windows/IIS. But there are other PHP scripts that send mail successfully on both servers. It isn't a server config issue, because the SMTP and sendmail_from variables are ini_set() in a standard file which is include-ed from both scripts that will send mail and the one which won't. I've been trying to isolate the problem, and can reproduce it completely in a test script which just sends a constant mail -- no database lookups, reading input, fancy HTML output, merely trying to send exactly the same mail each time the script is run. Then I changed things like the `To' and `Subject' headers and the body of the mail. It still doesn't send mail on Windows, but gives a different message: Warning: Server Error in mailo.php on line 40 Now the mail() function does complete, returning false. Has anybody any suggestion as to what could be causing these problems? My entire script (42 lines) is below; most of it is merely debugging print lines so I can see that mail() really is being called with the parameters that I think it is. <? $to = '[EMAIL PROTECTED]'; $subject = 'Test Mail'; $headers = 'Cc: [EMAIL PROTECTED]'; ini_set('SMTP', '194.72.6.62'); ini_set('sendmail_from', '[EMAIL PROTECTED]'); $msg_body = 'This is the body of the test mail message. It has a few lines of text in it, but that is about all. '; $smtp = ini_get('SMTP'); $sendmail_from = ini_get('sendmail_from'); print "##Preparing to send the mail, using the following parameters.<br>\n"; print "##To: [$to] " . strlen($to) . " characters.<br>\n"; print "##Subject: [$subject] " . strlen($subject) . " characters.<br>\n"; print "##Extra Header: [$headers] " . strlen($headers) . " characters.<br>\n"; print "##SMTP Server: [$smtp] " . strlen($smtp) . " characters.<br>\n"; print "##Sendmail From: [$sendmail_from] " . strlen($sendmail_from) . " characters.<br>\n"; $body_lngth = strlen($msg_body); print "##Body (" . $body_lngth . " characters):<br>\n<pre><font face=\"LucidaTypewriter, Courier\">"; $char_num = 0; while ($char_num < $body_lngth) { $col_num = 0; $hex = ''; $ascii = ''; while ($col_num++ < 0x10 && $char_num < $body_lngth) { $char = $msg_body[$char_num]; $hex .= sprintf('%02X ', ord($char)); $ascii .= preg_match('/[\w .,:]/i', $char) ? $char : '#'; $char_num++; } printf("%-48s %s\n", $hex, $ascii); } print "</font></pre>"; print "##Just about to send the mail, as the next statement.<br>\n"; $sent = mail($to, $subject, $msg_body, $headers); print "##The mail command has completed and returned [$sent].<br>\n"; ?> Thanks for help with this. Simon -- Simon Myers * GBdirect http://www.gbdirect.co.uk/ tel: +44 1274 772277 fax: +44 1274 772281
Thanks to everyone for responses to my initial post. Thanks goes especially to Rasmus for giving us the "state" of things. It is much more clear now why things are the way they are. Although I am not in a financial position to influence the development of PHP Win32, I am certainly willing to try to extend my excitement about PHP , champion its progress and use PHP whenever practical in production and development environments. As some of the posts have already done, I extend a plea to developers, who may have expertise to add, that we continue to stabilize! and expand PHP on Win32. A plea also goes to those of us who can contribute in other ways, that we will systematically test, give productive feedback and champion the cause. Enough on my soapbox, Thanks again! Steve Hall Novell, Inc. "Steve" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Does anyone know what the development status is regarding a stable release > of the ISAPI module? > Have the problems been pinpointed and is there a plan to fix them? > Does the PHP staff lack resources to develop the Win32 environment > sufficiently? (I would help if I knew how) > Is there a database of current issues, owner of issue and due date? (normal > project management stuff) > > If I remember correctly, it's been almost 2 years since the release of the > SAPI modules and I am still hearing of unstable behavior while using the > ISAPI module instead of CGI. I am frustrated at the lack of progress in > fixing these quirks. I also get frustrated because I don't know if I'll have > to put up with these quirks for another 6 months or 6 days. > > On a better note, I am using PHP 4.0.6/ISAPI in a single host production > environment running on IIS4 sp6 without problems. I do encounter problems > when we add virtual hosts to the server. > > I hope I didn't overstep the bounds by asking these questions. I am not > skilled enough to aid the actual development of this product but I am a > great proponent of PHP and wish to see it progress. > > Thanks for you reponses! > Steve Hall > Novell, Inc. > > > >
Hello! I was wondering if there is a way of getting the latest dev version of PHP for win already compiled. I know about www.php4win.com, but I don't think that their site is updated regulary. Also, is the any documentation on the dev versions, like descriptions of new features and so?? Thanks, Mitja Pagon
Thanks for the comment, but this code was lifted from an example on PHPbuilder.com! The central problem is that the instance of Excel (or Word) does not quit following $word->Quit(); I expected that the ->Release() function would release the memory associated with the object, but it clearly doesn't function because, as you say, it is not part of the Excel or Word object model. In which case ... how do it destroy the object? Jeff Waldock -----Original Message----- From: Alain Samoun [mailto:[EMAIL PROTECTED]] Sent: 09 September 2001 21:55 To: Jeff Waldock Cc: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] Closing Excel using DCOM and Release() As it said, your COM connection is closed, in addition 'release' is not a member in the word object as well as in the excel object. Alain On Sun, Sep 09, 2001 at 02:20:35PM +0100, Jeff Waldock wrote: > I cannot seem to get PHP to recognise the Release function when tring to > close an instance of Excel or Word opened using DCOM. > > This is the error message returned.. > > Warning: Unable to lookup release: The object invoked has disconnected from > its clients. in d:\wwwroot\studentdata\word.php on line 21 > > The code on line 21 is just > $word->Release(); > > The full code is:: > <?php > > // starting word > $word = new COM("word.application") or die("Unable to instanciate Word"); > print "Loaded Word, version {$word->Version}\n"; > > //bring it to front > $word->Visible = 1; > > //open an empty document > $word->Documents->Add(); > > //do some weird stuff > $word->Selection->TypeText("This is a test..."); > $word->Documents[1]->SaveAs("Useless test.doc"); > > //closing word > $word->Quit(); > > //free the object > $word->Release(); > $word = null; > > ?> > > Where am I going wrong? > > Jeff Waldock > > > -- > PHP Windows 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] -- PHP Windows 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]
To close Word, you should use: $word->quit(); You are right, my PHPBuilder example has an error, thanks for pointing it to me ;) Alain On Mon, Sep 10, 2001 at 06:30:20PM +0100, Jeff Waldock wrote: > Thanks for the comment, but this code was lifted from an example on > PHPbuilder.com! The central problem is that the instance of Excel (or Word) > does not quit following $word->Quit(); I expected that the ->Release() > function would release the memory associated with the object, but it clearly > doesn't function because, as you say, it is not part of the Excel or Word > object model. In which case ... how do it destroy the object? > Jeff Waldock > > -----Original Message----- > From: Alain Samoun [mailto:[EMAIL PROTECTED]] > Sent: 09 September 2001 21:55 > To: Jeff Waldock > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP-WIN] Closing Excel using DCOM and Release() > > > As it said, your COM connection is closed, in addition 'release' is not a > member in the word object as well as in the excel object. > Alain > > On Sun, Sep 09, 2001 at 02:20:35PM +0100, Jeff Waldock wrote: > > I cannot seem to get PHP to recognise the Release function when tring to > > close an instance of Excel or Word opened using DCOM. > > > > This is the error message returned.. > > > > Warning: Unable to lookup release: The object invoked has disconnected > from > > its clients. in d:\wwwroot\studentdata\word.php on line 21 > > > > The code on line 21 is just > > $word->Release(); > > > > The full code is:: > > <?php > > > > // starting word > > $word = new COM("word.application") or die("Unable to instanciate Word"); > > print "Loaded Word, version {$word->Version}\n"; > > > > //bring it to front > > $word->Visible = 1; > > > > //open an empty document > > $word->Documents->Add(); > > > > //do some weird stuff > > $word->Selection->TypeText("This is a test..."); > > $word->Documents[1]->SaveAs("Useless test.doc"); > > > > //closing word > > $word->Quit(); > > > > //free the object > > $word->Release(); > > $word = null; > > > > ?> > > > > Where am I going wrong? > > > > Jeff Waldock > > > > > > -- > > PHP Windows 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] > > -- > PHP Windows 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] > > > -- > PHP Windows 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]
Ok thanks! That works fine for Word, but a similar techniques fails for Excel. I want to pull data from a spreadsheet - and have been trying to test out the technique using something like the code below. Thiw works fine, insofar that the data are correctly displayed on the browser, but Excel is still running afterwards. No error is give, but I need to be able to destroy the Excel object, or I will be quickly running out of resources! The code is ... <?php echo " <HTML><HEAD><TITLE>Processing Form</TITLE></HEAD><BODY BGCOLOR=\"#D5D5AB\"> <h1>This is a test</h1>"; $xlApp = new COM("Excel.Application") or Die ("Did not connect"); $workbook = "d:\wwwroot\studentdata\xl1.xls"; $wkb = $xlApp->Workbooks->Open($workbook) or Die ("Did not open"); $sheets = $wkb->Worksheets("Sheet1"); $cell = $sheets->Cells(1,1); print "Cell Value = {$cell->value} <BR>"; $xlApp->ActiveWorkbook->Close("False"); $xlApp->quit(); $xlApp = null; echo "</body></html>"; ?> -----Original Message----- From: Alain Samoun [mailto:[EMAIL PROTECTED]] Sent: 10 September 2001 19:04 To: Jeff Waldock Cc: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] Closing Excel using DCOM and Release() To close Word, you should use: $word->quit(); You are right, my PHPBuilder example has an error, thanks for pointing it to me ;) Alain On Mon, Sep 10, 2001 at 06:30:20PM +0100, Jeff Waldock wrote: > Thanks for the comment, but this code was lifted from an example on > PHPbuilder.com! The central problem is that the instance of Excel (or Word) > does not quit following $word->Quit(); I expected that the ->Release() > function would release the memory associated with the object, but it clearly > doesn't function because, as you say, it is not part of the Excel or Word > object model. In which case ... how do it destroy the object? > Jeff Waldock > > -----Original Message----- > From: Alain Samoun [mailto:[EMAIL PROTECTED]] > Sent: 09 September 2001 21:55 > To: Jeff Waldock > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP-WIN] Closing Excel using DCOM and Release() > > > As it said, your COM connection is closed, in addition 'release' is not a > member in the word object as well as in the excel object. > Alain > > On Sun, Sep 09, 2001 at 02:20:35PM +0100, Jeff Waldock wrote: > > I cannot seem to get PHP to recognise the Release function when tring to > > close an instance of Excel or Word opened using DCOM. > > > > This is the error message returned.. > > > > Warning: Unable to lookup release: The object invoked has disconnected > from > > its clients. in d:\wwwroot\studentdata\word.php on line 21 > > > > The code on line 21 is just > > $word->Release(); > > > > The full code is:: > > <?php > > > > // starting word > > $word = new COM("word.application") or die("Unable to instanciate Word"); > > print "Loaded Word, version {$word->Version}\n"; > > > > //bring it to front > > $word->Visible = 1; > > > > //open an empty document > > $word->Documents->Add(); > > > > //do some weird stuff > > $word->Selection->TypeText("This is a test..."); > > $word->Documents[1]->SaveAs("Useless test.doc"); > > > > //closing word > > $word->Quit(); > > > > //free the object > > $word->Release(); > > $word = null; > > > > ?> > > > > Where am I going wrong? > > > > Jeff Waldock > > > > > > -- > > PHP Windows 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] > > -- > PHP Windows 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] > > > -- > PHP Windows 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]
Hi to all, how can I search folder with images for the image some_name.jpg and find does it exist or not? Thanks for any help! Afan
$file = "foo.jpg"; if ( file_exists ( "D:/bar/$file" ) ) { //DO SOMETHING } --------------------- John Asendorf - [EMAIL PROTECTED] Web Applications Developer http://www.lcounty.com - NEW FEATURES ADDED DAILY! Licking County, Ohio, USA 740-349-3631 Aliquando et insanire iucundum est > -----Original Message----- > From: afan [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 10, 2001 4:52 PM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] searching for a file > > > Hi to all, > how can I search folder with images for the image > some_name.jpg and find > does it exist or not? > > Thanks for any help! > > Afan > > > -- > PHP Windows 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] >
if you know the name of the file, and the directory, then use: if (file_exists("directory/filename.jpg")) { print "found"; } Watch out for case sensitive OS's tho. x.jpg != X.JPG A more complete method for searching a directory would be: $handle=opendir('.'); while (($file = readdir($handle))!==false) { if (strtolower($file)==strtolower($filetolookfor)) { print "Found"; } } closedir($handle); If you also wanted to check if the file WAS a JPG, then your could add the following to the if statement: if ($img=getimagesize($file)) { if ($img[2]==2) { print "JPG"; } else { print "Not a JPG"; } } else { print "No a graphic at all"; } "Afan" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi to all, > how can I search folder with images for the image some_name.jpg and find > does it exist or not? > > Thanks for any help! > > Afan >
Hello everyone, Ran into a problem trying to get this to work. I have multiple names in a mysql field (DCD_Access) that contains "name1, name2, name3, name4" and I want read this information as an array so I can use these values to populate a pull-down list using a while or foreach loop. Below is the code I used, but I get the values as a single entry no matter what I try. This query brings a single result row "name1, name2, name3, name4". Here's the code: $result4 = mysql_query( "SELECT DCD_Access FROM userdb WHERE ID = '$user_ID'"); $DCD = mysql_fetch_array ( $result4 ); print " <td width='6%' valign=top>\n <div align='center'>\n <select name='LCompare'>\n <option value='none'>None</option>\n <option value='within'>Within Gel</option>\n"; foreach ( $DCD as $val ) { print "<option value='$val'>$val</option>\n"; } print " </select></div>\n </td>\n"; This returns HTML like: <td width='6%' valign=top> <div align='center'> <select name='LCompare'> <option value='none'>None</option> <option value='within'>Within Gel</option> <option value='name1, name2, name3, name4'>name1, name2, name3, name4</option> <option value='name1, name2, name3, name4'>name1, name2, name3, name4</option> <option value='name1, name2, name3, name4'>name1, name2, name3, name4</option> <option value='name1, name2, name3, name4'>name1, name2, name3, name4</option> </select> </div> </td> What I need is to get: <td width='6%' valign=top> <div align='center'> <select name='LCompare'> <option value='none'>None</option> <option value='within'>Within Gel</option> <option value='name1'>name1</option> <option value='name2'>name2</option> <option value='name3'>name3</option> <option value='name4'>name4</option> </select> </div> </td> Anyone know how to fix this? Robert
I have no idea if this will work: $DCD = mysql_fetch_array ( $result4 ); $DCD = array ( $DCD ); I'm just wondering if you need to force PHP to understand that DCD is an array? or maybe: settype ( $DCD , "array" ); $DCD = mysql_fetch_array ( $result4 ); --------------------- John Asendorf - [EMAIL PROTECTED] Web Applications Developer http://www.lcounty.com - NEW FEATURES ADDED DAILY! Licking County, Ohio, USA 740-349-3631 Aliquando et insanire iucundum est > -----Original Message----- > From: Robert Trembath [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 10, 2001 3:42 PM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] reading arrays within a field from mysql and > separating the values > > > Hello everyone, > > Ran into a problem trying to get this to work. I have > multiple names in a > mysql field (DCD_Access) that contains "name1, name2, name3, > name4" and I > want read this information as an array so I can use these > values to populate > a pull-down list using a while or foreach loop. Below is the > code I used, > but I get the values as a single entry no matter what I try. > This query > brings a single result row "name1, name2, name3, name4". > Here's the code: > > $result4 = mysql_query( "SELECT DCD_Access FROM userdb WHERE ID = > '$user_ID'"); > $DCD = mysql_fetch_array ( $result4 ); > > print " <td width='6%' valign=top>\n > <div align='center'>\n > <select name='LCompare'>\n > <option value='none'>None</option>\n > <option value='within'>Within Gel</option>\n"; > foreach ( $DCD as $val ) > { > print "<option value='$val'>$val</option>\n"; > } > print " </select></div>\n > </td>\n"; > > This returns HTML like: > > <td width='6%' valign=top> > <div align='center'> > <select name='LCompare'> > <option value='none'>None</option> > <option value='within'>Within Gel</option> > <option value='name1, name2, name3, name4'>name1, > name2, name3, > name4</option> > <option value='name1, name2, name3, name4'>name1, > name2, name3, > name4</option> > <option value='name1, name2, name3, name4'>name1, > name2, name3, > name4</option> > <option value='name1, name2, name3, name4'>name1, > name2, name3, > name4</option> > </select> > </div> </td> > > What I need is to get: > > <td width='6%' valign=top> > <div align='center'> > <select name='LCompare'> > <option value='none'>None</option> > <option value='within'>Within Gel</option> > <option value='name1'>name1</option> > <option value='name2'>name2</option> > <option value='name3'>name3</option> > <option value='name4'>name4</option> > </select> > </div> </td> > > Anyone know how to fix this? > Robert > > > > > -- > PHP Windows 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] >
If I read this right, the data field actually contains "name1, name2, name3, name4" in which case, you'll need to explode the field to access it's parts. $vals=explode(", ", $DCD); foreach ($vals as $val ) { print "<option value='$val'>$val</option>\n"; } "Robert Trembath" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello everyone, > > Ran into a problem trying to get this to work. I have multiple names in a > mysql field (DCD_Access) that contains "name1, name2, name3, name4" and I > want read this information as an array so I can use these values to populate > a pull-down list using a while or foreach loop. Below is the code I used, > but I get the values as a single entry no matter what I try. This query > brings a single result row "name1, name2, name3, name4". Here's the code: > > $result4 = mysql_query( "SELECT DCD_Access FROM userdb WHERE ID = > '$user_ID'"); > $DCD = mysql_fetch_array ( $result4 ); > > print " <td width='6%' valign=top>\n > <div align='center'>\n > <select name='LCompare'>\n > <option value='none'>None</option>\n > <option value='within'>Within Gel</option>\n"; > foreach ( $DCD as $val ) > { > print "<option value='$val'>$val</option>\n"; > } > print " </select></div>\n > </td>\n"; > > This returns HTML like: > > <td width='6%' valign=top> > <div align='center'> > <select name='LCompare'> > <option value='none'>None</option> > <option value='within'>Within Gel</option> > <option value='name1, name2, name3, name4'>name1, name2, name3, > name4</option> > <option value='name1, name2, name3, name4'>name1, name2, name3, > name4</option> > <option value='name1, name2, name3, name4'>name1, name2, name3, > name4</option> > <option value='name1, name2, name3, name4'>name1, name2, name3, > name4</option> > </select> > </div> </td> > > What I need is to get: > > <td width='6%' valign=top> > <div align='center'> > <select name='LCompare'> > <option value='none'>None</option> > <option value='within'>Within Gel</option> > <option value='name1'>name1</option> > <option value='name2'>name2</option> > <option value='name3'>name3</option> > <option value='name4'>name4</option> > </select> > </div> </td> > > Anyone know how to fix this? > Robert > > >
All the extensions in php.ini are commented out, and i also commented out most of the modules i don't use, but it's useless. I think that the the problem is related to ODBC, but i don't know how to disable it. I would apreciate if someone could give me some help on this. Thanks. Jean Reis "Ignatius Teo" <[EMAIL PROTECTED]> escreveu na mensagem 007901c13989$0de663f0$aa2602cb@southernf8mwss">news:007901c13989$0de663f0$aa2602cb@southernf8mwss... > The main reason php4apache.dll will not load would be because there is > something misconfigured in php.ini - probably one of the extensions are not > being loaded. > I would comment out the extensions in php.ini and try loading php4apache.dll > again,then turn the extensions on one at a time and see what breaks. > > Ignatius > BTW, you should get 4.0.6 > > > ----- Original Message ----- > From: "Jean Philippe Reis" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, September 09, 2001 2:28 AM > Subject: [PHP-WIN] Re: php4apache.dll not loading under W98/Apache/PHP4.0.4 > > > > > > "Darren Ls" <[EMAIL PROTECTED]> escreveu na mensagem > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > > > "Jean Philippe Reis" <[EMAIL PROTECTED]> wrote in message > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > I'm using windows 98, Apache 1.3.19 and php 4.0.4, and it used to work > > > fine > > > > until some weeks ago. Now when I start apache, with php configured as > a > > > > module, it gives me the folowing error: > > > > "Syntax error on line 190 of c:/programas/apache > > > > group/apache/conf/httpd.conf: > > > > Cannot load c:/programas/php/sapi/php4apache.dll into server: (31) A > > > device > > > > connected to > > > > the system is not working:" > > > > (Last sentence is a translation from portuguese). > > > > First, it gave me an error because of odbc32.dll, but the I > de-installed > > > and > > > > re-installed Access 2000, and it started to give this other error. > > > > It has always worked fine before with this config. The error must (at > > > least > > > > that's what i think...) dll related. > > > > > > it depends whats on whats on line 190 of httpd.conf > > > > > > > > > > > > > > > > Well on the 190 and 191 line of httpd.conf is the following: > > > > LoadModule php4_module c:/programas/php/sapi/php4apache.dll > > AddType application/x-httpd-php .php4 > > > > As I said before, it has always worked fine with this config., until > > recently. > > > > > > > > -- > > PHP Windows 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] > > >