php-windows Digest 2 Aug 2001 20:13:07 -0000 Issue 681 Topics (messages 8622 through 8634): Re: duplicate entries 8622 by: k Re: fork?!?! 8623 by: Daniel Beulshausen Checking for valid login 8624 by: lars-eirik.netcom.no 8626 by: Johannes Janson 500 Server Error 8625 by: Yeo Kheng Hong 8629 by: Phil Driscoll larger uploads whit php 4.06 8627 by: Fatcho Re: Problem installing PHP4 on Linux 8628 by: G Schneider $main undefined variable 8630 by: Richard Frank problem with Netscape 8631 by: afan 8632 by: Robin Bolton 8633 by: Hugh Bothwell Re: How to remove a value from a array 8634 by: Pere 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] ----------------------------------------------------------------------
I'm not sure if I fully understand but let me give it a shot. You have a form where a user enters a hostname and your script queries to see if the hostname they typed in is already in the database. If it is, you give them an error, if not you insert the record. Now, if the hostname form field is blank, you want to allow that, right? $result = mysql_query ("SELECT * FROM asset WHERE hostname ='$hostname' AND hostname!=''"); ----- or ----- if ($hostname != '') { $result = mysql_query ("SELECT * FROM asset WHERE hostname ='$hostname'"); if (mysql_num_rows($result) != 0) { echo "I'm sorry, I can't do that. A duplicate hostname was found."; } } else { // DO INSERT } "Pete K." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] (Pete K.... > Maybe someone can help. > this script catches all duplicate entries, in the hostname field of my > database. The problem is, if the hostname field is left blank, [not all > devices have a DNS name], the script sees the blank field, and thinks > it's a duplicate. > > How can I reword it, so it prevents typed hostnames [like it does now] > but allows blank hostnames. > > Thanks in advance! > Pete > > > > /*Chck for another item with the same hostname */ > > $result = mysql_query ("SELECT * FROM asset > WHERE hostname ='$hostname' > "); > > > // check if row is returned, if yes error, if no insert > > if (mysql_num_rows($result) != 0) > > { > echo "I'm sorry, I can't do that. A duplicate > hostname was found."; > > } > > else { > // DO INSERT > -- > _______________________________________ > Pete Kuczynski > Sr. Field Engineer > DHL Airways Inc. > Infrastructure Technology & Services > (773)-462-9758 > 24/7 Helpdesk 1-800-434-5767 > > > __________________________________________________________________ > Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ > > Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ >
At 23:29 01.08.2001 -0700, k wrote: >I have 4.0.6 running and I'm still getting the "Unable to fork" error that >they say was fixed in 4.0.6. Maybe they don't have the latest Microsoft >patches or something but this stinks. use the latest snapshot it has been fixed a while ago. http://www.zend.com/snapshots/ daniel >David > >"Arkegide" <[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hello, > > > > I've the same problem. > > The php 4.0.6 version correct a problem with the exec (ie fork) function >(I > > see that in the 4.0.6 bug correction). > > But when I install the 4.0.5 or 4.0.6 PHP version on windows NT they don't > > want to work well. > > And I must return to the 4.0.4 version to get something working well. > > Try to install the 4.0.6 version and tell my if it works ! > > > > Jeff > > > > "G Schneider" <[EMAIL PROTECTED]> a écrit dans le message news: > > [EMAIL PROTECTED] > > > > > > Hi all, > > > > > > I get this message when I try to delete a file using PHP: > > > > > > Warning: Unable to fork [del wmd_banner.png.temp.png] in > > > c:\webspace\openhosting4\GB*******\webmastersdog.com\www\testfile.php on > > > line 608 > > > > > > the code I'm using is the 'ole exec("del $file"); thingy you have >to > > > use on Windows servers (rather than the usual PHP unlink() function >which > > > only works on UNIX servers). > > > > > > So...... why am I getting this message? What setting is it that I need >to > > > switch on (or whatever)? > > > > > > Thanks all, > > > Jefferrs > > > > > > > > > ++++++++++++++++++++++++++++++++++++++++ > > > http://www.webmastersdog.com > > > where website owners go. and talk about stuff. > > > ++++++++++++++++++++++++++++++++++++++++ > > > > > > > > > > > > > > > > > > > >-- >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] /*-- daniel beulshausen - [EMAIL PROTECTED] using php on windows? http://www.php4win.de
Hi there. I have a problem with PHP and mysql. I have users stored with a username and a password in my mysql db when i try to do a check for a valid u/p match i always get an error. I have password stored in the db using the mysql password()function. When i want to test for an entered password in an HTML form it does not allow me to do a check. This is my code. $check="select * from userinfo where username='$testusername' and password=password($'testpassword')"; Is it not possible to do a test on the html password in the query. If that is the case how can i retrieve the password stored in the db decrypted to check if it is the same as entered in the HTML form. I appreciate any help Lars Eirik Rønning
Hi, [...] >This is my code. >$check="select * from userinfo where username='$testusername' and >password=password($'testpassword')"; here's thr problem: password=PASSWORD('$password')"; You messed up the single quotes. cheers Johannes
Hi I installed phhp406 on win98 with the instructions here http://www.php.net/manual/en/install-windows.php#install.windows.installer however I have the 500 Server Error when I try to access the .php file using
On Thursday 02 August 2001 11:46, Yeo Kheng Hong wrote: > Hi > I installed phhp406 on win98 with the instructions here > http://www.php.net/manual/en/install-windows.php#install.windows.installer > > however I have the 500 Server Error when I try to access the .php file > using There are some tips on how to debug this situation towards the end of the install.txt file which came with your PHP distribution. Cheers -- Phil Driscoll
hi, i've got troubles with my upload scripts, it works well with tiny files but with largest it fail, i was set the php.ini and the httpconf of the apache (max_filesize_upload to 25MB and memory_limit to 50MB), but don't work yet. and max_execution_time too. i want upload files bigger than 20MB, how i implement this ????????? thanks, André Ferreira Marcondes (globalsites Curitiba - Brazil)
Try a Linux group, this is a MS Windows one:-) -- ++++++++++++++++++++++++++++++++++++++++ http://www.webmastersdog.com where website owners go. and talk about stuff. ++++++++++++++++++++++++++++++++++++++++ "Kevin Sayre" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Ok, here's a real stupid question, but I can't see what I did wrong. > Basically, I'm trying to get PHP to run on a Red Hat Linux server, installed > the RPM, verified that the httpd.conf file has the LoadModule for PHP in it, > but still, it won't process the scripts, simply spits out the code. What'd > I miss? Thanks. > > Kevin Sayre > [EMAIL PROTECTED] > >
I was copying a site from a linux server to a w2k server. the linux has php3 and w2k has php (4). one of the files index_frameset_eros.php3 has this code: <frameset rows="136,*" border="false" frameborder="0" framespacing="0"> <frame src="banner_eros.htm" marginwidth="1" marginheight="1" framespacing="0" noresize scrolling="no"> echo $main <frame src="<?php if ($main == "") { echo "main_eros.php3"; }else { echo $main; } ?>" name="maineros" marginwidth="1" marginheight="15" framespacing="0"> </frameset> </head> When opening index_frameset_eros.php3 it won't show me the second frame src. I get the message CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: (nothing) When I do <frame src="main_eros.php3"> it does show the page but the links in the top frame doesn't work anymore. I guess that i can't find the lower frame (maybe called main) anymore. I put echo $main in the title and the title says: <br><b>Warning</b>: Undefined variable: main in <b>d:/inetpub/www.eros.nl/website/index_frameset_eros.php3</b> on line <b>10</b><br>main_eros.php3
Hi to all, I did little script it works perfect on IE but keep crashing on Netscape 4.75. Script is about manipulating an array with no more then 20 elements. What could be first thing I have to look? I went hundreds times through script and didn't find anything wrong? What I have to do? Any help, please. Thanks Afan
I would look closely at the generated HTML code, Netscape doesn't handle malformed HTML code very well (eg, unclosed <TABLE> tags). ----- Original Message ----- From: "afan" <[EMAIL PROTECTED]> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Sent: Thursday, August 02, 2001 1:56 PM Subject: [PHP-WIN] problem with Netscape > Hi to all, > I did little script it works perfect on IE but keep crashing on Netscape > 4.75. Script is about manipulating an array with no more then 20 elements. > > What could be first thing I have to look? I went hundreds times through > script and didn't find anything wrong? > What I have to do? > > Any help, please. > > Thanks > > 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] > >
"Afan" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi to all, > I did little script it works perfect on IE but keep crashing on Netscape > 4.75. Script is about manipulating an array with no more then 20 elements. > > What could be first thing I have to look? I went hundreds times through > script and didn't find anything wrong? > What I have to do? Posting the relevant source code would help immensely...
> let's say there is an array with 10 elements. > One of elements has value 'xyz123' - I do not know which one. > How can I extract this element from the array and > have a new array with all other element, except extracted one. // original array $arr = array("a", "b", "c", "d", "xyz123", "f", "g"); // list of values to remove $remove = array("xyz123"); // do it $result = array_diff($arr, $remove); // show results foreach($result as $val) echo "<br>$val"; "Steen rabøl" <[EMAIL PROTECTED]> escribió en el mensaje 009a01c1098d$049a62f0$0300000a@srjhp">news:009a01c1098d$049a62f0$0300000a@srjhp... Hi How can I remove a vale from a array() eg; $a = array("1","2","3"); if I then unset($a[1]) the value is NULL, or the offset is empty, and you get a error if yoy try to access that element. What I want/need is a function whic can remove a valy/key from a array Does such a function exists ? Thanks in advance Steen