Re: [PHP] Anybody have a function to encode a string?
I need a function that encodes stuff, with a key. It, of course, needs to be decodable too. Does anbody know/have a function like this? What is everyone's thoughts on RC4Crypt? http://sourceforge.net/projects/rc4crypt/ http://www.paphe.com/php/tutorials/230101.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anybody have a function to encode a string?
I need a function that encodes stuff, with a key. It, of course, needs to be decodable too. Does anbody know/have a function like this? http://www.php.net/manual/en/ref.mcrypt.php How about situations when mcrypt is not available? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $DOCUMENT_ROOT behavior linux vs solaris
»Dennis Moore« sagte am 2002-03-20 um 02:14:16 -0500 : So when I build my paths I get an extra /. Is there any way to make Sun version to work like the Linux version. I hate to go back and change all my code. Uhm, is the double / a problem? On Linux, it doesn't seem to hurt. Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.iso-top.de | Jabber: [EMAIL PROTECTED] iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 2 days 21 hours 25 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anybody have a function to encode a string?
I need a function that encodes stuff, with a key. It, of course, needs to be decodable too. Does anbody know/have a function like this? What is everyone's thoughts on RC4Crypt? http://sourceforge.net/projects/rc4crypt/ http://www.paphe.com/php/tutorials/230101.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $PHP_SELF on include file
Hello: I would like to do the following: a.php -- include b.php; b.php -- echo $PHP_SELF; in b.php, instead show a.php as the script is executing, I want to know if there's a way to show b.php, that is, the included file is being executed. Regards. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $PHP_SELF on include file
Hello: try it with __FILE__ you might have to work a little on the resulting string, but it at least delivers the current file's name What is __FILE__, a global var, an environment variable? Could you put a simple example? Regards and thanks for your quick answer. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Loading files via HTTP or directly from the server?
Hi there, I did recently discover that I might have a important failure in my webapp. But I am not sure about it. All the image files, js, css files I am accessing are loaded like this: http://www.server.com/test/image.gif Same with JS and css files. Now I am wondering if it would be faster to access them directly from the disk on the server. due to my architecture I can only use apsolute pathnames. I tryed /folder/file.gif but this does not work. Thanx for any help, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Making a simple borderless pop up window with a Close button
If you want a popup window that lacks a border entirely, check out chromeless windows at www.microbians.com Denis L. Menezes [EMAIL PROTECTED] wrote in message 000f01c1cf3f$5321d520$c900a8c0@d8d0l7">news:000f01c1cf3f$5321d520$c900a8c0@d8d0l7... Hello friends. I am making a database website where I need to add a small help button for every field on the form. Whenever the user clicks the small help button, I wish to show a titleless popup window containing the help text and a close button. Can someone help me with the php script for this. Thanks Denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $PHP_SELF on include file
On Wednesday 20 March 2002 10:12, José León Serna wrote: Hello: try it with __FILE__ you might have to work a little on the resulting string, but it at least delivers the current file's name What is __FILE__, a global var, an environment variable? Could you put a simple example? print( __FILE__ ); echo __FILE__; will show the current file name -- Wolfram ... translating template engine http://sf.net/projects/simpletpl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $PHP_SELF on include file
Hello: echo __FILE__; will show the current file name Oops! Thanks! ;-)) Regards. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Receipts
This may seem a bit off topic - but i am getting really tired of this... I am subscribing to a variety of mailing lists and receives hundreds, and sometimes thousands, of e-mails every day. One thing - that is almost unique to this list - is that some of you send a request for a read receipt with every mail. Why? Dou you really want read receipts from thousands of subscribers? It is not only annoying. It´s rude! And no - i am not considering to deny or automatically send read receipts. It is, when properly used, a good function. And i want to choose when to send them. Although not being forced to deny receipts from a mailing list. # Daniel Alsén| www.mindbash.com # # [EMAIL PROTECTED] | +46 705 38 10 30 # # ICQ: 63006462 | +46 8 694 82 22 # # PGP: http://www.mindbash.com/pgp/ # -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP - mssql
Hi. I have a table that contains lots of names in mssql. and i want to make a page where each of theese individuals can login with that spesific username and password. So my question is : what is the proper (best) command to use for sending and returning the info? ?PHP $link = mssql_connect($hostname,$username,$password); $dblink = mssql_select_db($dbname, $link); if ( $link $dblink ) { $query = select * from members where user = '$user' and pass = '$pass'; $result = mssql_query( $query ); if ( $result ) echo correct login; else echo wrong login; } ? This is not working... i have tried everything i can think of that can work but with no luck. So if someone have a solution for me... i would apriciate it :) (and yes i do have defined all the vars in the script they are just not that important here) -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Source Code Formatter
Hello: Any of you know about any source code formatter for PHP? I mean a tool to take a source code and produces an output file with the source code indented like it must be. Regards. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Return the column names of MySQL table?
The result of the DESCRIBE query is a dataset like that of any other query so ... $query = DESCRIBE montileaux_events ; if ($result = mysql_query($query)) { while ($field = mysql_fetch_array($result)) { foreach($field as $key = $val) { echo $key : $val |; } echo(br); } } Tim Ward Internet Chess www.chessish.com http://www.chessish.com -- From: Kevin Stone [SMTP:[EMAIL PROTECTED]] Sent: 19 March 2002 23:21 To: [EMAIL PROTECTED] Subject: RE: [PHP] Re: Return the column names of MySQL table? Philip thanks for the tip-off to the mysql_list_fields() function.. that simplifies things quite a bit. Problem solved. :) I'm still wondering about the other method though. I noticed the DESCRIBE table_name method in the MySQL docs but couldn't figure out how to use it. Alone it seems to return information about only the first column... ? $query = DESCRIBE montileaux_events ; $result = mysql_fetch_array(mysql_query($query)) foreach ($result as $key = $val) { echo $key : $val br; } ? --- returns - 0 : keynum Field : keynum 1 : int(11) Type : int(11) 2 : Null : 3 : PRI Key : PRI 4 : 5 : auto_increment Extra : auto_increment 6 : select,insert,update,references Privileges : select,insert,update,references -- keynum is the name of the frist column in the table. But beyond that there doesn't appear to be any data to increment through. The function returns this and only this. Am I using it wrong? Thanks, Kevin -Original Message- From: Philip Hallstrom [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 4:02 PM To: Geoff Hankerson Cc: Kevin Stone; [EMAIL PROTECTED] Subject: [PHP] Re: Return the column names of MySQL table? Or if you want to do this within PHP use the mysql_list_fields function. On Tue, 19 Mar 2002, Geoff Hankerson wrote: I believe it is: describe tablename; - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 19, 2002 4:43 PM Subject: Return the column names of MySQL table? Forgive me for the off topic question. This is a MySQL question.. has nothing to do with PHP directly. However I was not able to find an answer in the MySQL documentation, on Usenet, or the MySQL mailing list archives. Also MySQL.com's mail manager is on the fritz so I can't even subscribe to the MySQL email list. Anyway since many of you are familiar with SQL this is as good a place to ask this question as any. I simply need to return a list of column names of a MySQL table. What's the syntax to do that? Thanks, Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Making a simple borderless pop up window with a Closebutton
The 3rd parameter to JavaScript function window.open() allows you to disable a number of window elements every browser has, these include the toolbar (buttons), location, status, menubar, scrollbars. This functionality is provided by the most common browsers and versions (MSIE and Netscape) and will also work in Mozilla and Netscape 6. I don't know about the JavaScript implementation in Opera, but if it supports JS it is likely to support these options too (or at least ingores them). bvr. Joe Webster wrote: It only works in IE -- it makes use of the 'Full Screen' (F11) option and tricks IE into doing so... hope you don't want it to work in NS, Opera... or anything else -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail
hey Is it possible to put somebody in CC when you use the mail() function ???
Re: [PHP] PHP - Forced header downloads
Ian Wayne wrote: [...] /*retrieve filename from url*/ $current=$REQUEST_URI; $url=parse_url($current); $fileq=$url[query]; $file=$fileq..mov; /*force download*/ header(Content-type:application/octet-stream\n); header(Content-disposition:attachment; filename=\$file\\n); header(Content-transfer-encoding:binary\n); header(Content-length:.filesize($file).\n); /*send file contents */ $fp=fopen($file,r); fpassthru($fp); I can't tell you how long it's taken me to download anything and I'm still getting can't add header errors, but at least I'm downloading something. But how do I download the desired movie file? You don't need newline (\n) at the end of your header R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail
yes I guess http://www.php.net/manual/en/function.mail.php Good luck. SR Sven Jacobs a écrit : hey Is it possible to put somebody in CC when you use the mail() function ??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sorting
Hii, Actually i want to sort the files form mysql database using php sorting.I can get the correct result using php sorting if the data's are stored in the array like this format. $temp=array(apple,Orange,Gova) please tell me how i will store the field details in a array fetched from mysql database -Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail
Yeah, just add Cc:[EMAIL PROTECTED] to your headers, that's it... Karthick - Original Message - From: Sven Jacobs [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 20, 2002 11:51 AM Subject: [PHP] mail hey Is it possible to put somebody in CC when you use the mail() function ??? _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to parse db-stored code
Hi Folks, I have stored several selects in a mysql-db, it is possible to parse the answer, but I couldn´t remember how. f.e. the answer on a query is: select * from somewhere where foo='$foo' and foofoo='$foofoo' this is a string, what is the method to make the $foo-vars real vars? TIA Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to seek and convert an email address to mailto link
At 3/20/2002, you wrote: $newstr = preg_replace('/\b(\S+@\S+)\b/', 'a href=mailto:\1;\1/a', $oldstr); Take the time to learn Perl-style regular expressions. You can practically write Photoshop with them. miguel Thanks! It seems to work fine. If I had time I'd try to learn regexp, but first I'll have to learn how not to be busy all the time. Pekka -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sorting
At 20.03.2002 16:29, you wrote: Hii, Actually i want to sort the files form mysql database using php sorting.I can get the correct result using php sorting if the data's are stored in the array like this format. $temp=array(apple,Orange,Gova) please tell me how i will store the field details in a array fetched from mysql database even if you could sort the data with the correct select f.e. select * from your_db where something='tru' order by the_field_you_wnt_to_sort, the method you requested is something like while($res=result_from_db_select) (sorry for result_from_db_select but as I´m using objects for databaseactions, I don´t know the exact commands maybe mysql_fetch_row) { for($i=0; $i count($res); $i++) // counts all fields that come back { $temp[$i] = $res[$i]; } } if you have a named array, you could also use an array for the names f.e. $arraynames=array(first_col,second_col,third_col) the your code would like while($res=result_from_db_select) { for($i=0; $i count($res); $i++) // counts all fields that come back { $temp[$arraynames[$i]] = $res[$i]; } } HTH Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re:SOLVED [PHP] How to parse db-stored code
At 20.03.2002 12:17, you wrote: SOLVED ! I have stored several selects in a mysql-db, it is possible to parse the answer, but I couldn´t remember how. f.e. the answer on a query is: select * from somewhere where foo='$foo' and foofoo='$foofoo' this is a string, what is the method to make the $foo-vars real vars? i would say, you can either do $val = $$whatYouGotFromTheDB; or eval ( \$val=.$whatYouGotFromTheDB ); where $whatYouGotFromTheDB = '$foo'; should work either way, good luck Thanks for the quick answer, I meant eval(). Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] email password and username
I am trying to create a system where a user can retreive there user name and password details. The problem is that the user name /password is in one table and the contact details are in another. The contact details are refrenced to the username. I want to acheive the following: 1. A user enters their email address into a form 2. The form submits to the database 3. The form checks the email and picks up the username / password 4. An email is sent to the relevant address with the password details Can this be done? If so how?? Any comments will be grateful -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [NEWMAN] make an if or else if statement from mysql.
$sql = SELECT accessIP FROM `access` ORDER BY `accessID` DESC; $sql_result = mysql_query($sql, $connection) or die (Could not get Query); if (db_num_rows() 0) { // Update view where ip = visitor_ip } else { // Normal insert $sql = INSERT INTO `access` (`accessID`, `accessIP`, `accessDNS`, `accessTIME`, `accessUPDATE`, `accessVIEW`) VALUES ('', '$proxy_ip', '$proxy_dns', '$add_date', NOW(NULL), '0'); $result = mysql_query($sql); } this gives me Fatal error: Call to undefined function: db_num_rows() in d:\hosting\crushme\index.php on line 20 anyone helo me fix this - Original Message - From: Philip J. Newman [EMAIL PROTECTED] To: Julio Nobrega Trabalhando [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, March 20, 2002 8:46 AM Subject: Re: [PHP] Re: [NEWMAN] make an if or else if statement from mysql. if (db_num_rows() 0) { mysql_query(UPDATE access SET access VIEW= accessVIEW+1 WHERE accessIP = accessIP); // Update view where ip = visitor_ip } else { $sql = INSERT INTO `access` (`accessID`, `accessIP`, `accessDNS`, `accessTIME`, `accessUPDATE`, `accessVIEW`) VALUES ('', '$proxy_ip', '$proxy_dns', '$add_date', NOW(NULL), '0'); $result = mysql_query($sql); } if (db_num_rows() 0) {= WHERE DOSE THIS VERABLE COME FROM? - Original Message - From: Julio Nobrega Trabalhando [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 20, 2002 8:45 AM Subject: [PHP] Re: [NEWMAN] make an if or else if statement from mysql. Select before to see if exists: if (db_num_rows() 0) { // Update view where ip = visitor_ip } else { // Normal insert } -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 Philip J. Newman [EMAIL PROTECTED] wrote in message 003401c1cf85$1afe54c0$0401a8c0@philip">news:003401c1cf85$1afe54c0$0401a8c0@philip... I have a log of IP numbers that come to WEBSITE A $sql = INSERT INTO `access` (`accessID`, `accessIP`, `accessDNS`, `accessTIME`, `accessUPDATE`, `accessVIEW`) VALUES ('', '$proxy_ip', '$proxy_dns', '$add_date', NOW(NULL), '0'); This has worked well, how ever when someone comes back with the same accessIP then I would like then accessVIEW aadds a +1 to the value. I would like help to create this .. if (!$remote_addr) - if the ip that they are using is the same as one in the table then update the record and use the accessID for that record. else if there isn't that $remote_addr in the table then it is added. I have yet to start on the code, so would some direction. Philip J. Newman PhilipNZ :: Design Solutions http://www.philipnz.com/ [EMAIL PROTECTED] ICQ# 20482482 +64 25 6144012 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail
//-- function sendmail( $From, $To, $CC, $BCC, $Replay_To, $Subject, $Body, $Mailer, $Extra_Header ) { $Header = ''; $Header .= 'From: ' . $From . \n; $Header .= 'Reply-To: ' . $Replay_To . \n; if ( $CC != '' ) { $Header .= CC: . $CC . \n; } if ( $BCC != '' ) { $Header .= BCC: . $BCC . \n; } if ( $Mailer == '' ) { $Header .= X-Mailer: PHP/ . phpversion(); } else { $Header .= $Mailer; } $Header .= $Extra_Header; mail( $To, $Subject, $Body, $Header ); Krzysiek Sven Jacobs wrote: hey Is it possible to put somebody in CC when you use the mail() function ??? -- Aktualnosci gospodarcze. Gielda. Kursy. Stopy. Waluty. Kredyty... Bezplatny Biuletyn Ekonomiczny. http://biznes.interia.pl/biuletyn/ -- Doniesienia z ostatniej chwili http://newsroom.interia.pl/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: [NEWMAN] make an if or else if statement from mysql.
Try if(mysql_num_rows($sql_result)) instead of db_num_rows. Hope this helps. Brian Drexler -Original Message- From: Philip J. Newman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 7:09 AM To: Philip J. Newman; Julio Nobrega Trabalhando Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: [NEWMAN] make an if or else if statement from mysql. $sql = SELECT accessIP FROM `access` ORDER BY `accessID` DESC; $sql_result = mysql_query($sql, $connection) or die (Could not get Query); if (db_num_rows() 0) { // Update view where ip = visitor_ip } else { // Normal insert $sql = INSERT INTO `access` (`accessID`, `accessIP`, `accessDNS`, `accessTIME`, `accessUPDATE`, `accessVIEW`) VALUES ('', '$proxy_ip', '$proxy_dns', '$add_date', NOW(NULL), '0'); $result = mysql_query($sql); } this gives me Fatal error: Call to undefined function: db_num_rows() in d:\hosting\crushme\index.php on line 20 anyone helo me fix this - Original Message - From: Philip J. Newman [EMAIL PROTECTED] To: Julio Nobrega Trabalhando [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, March 20, 2002 8:46 AM Subject: Re: [PHP] Re: [NEWMAN] make an if or else if statement from mysql. if (db_num_rows() 0) { mysql_query(UPDATE access SET access VIEW= accessVIEW+1 WHERE accessIP = accessIP); // Update view where ip = visitor_ip } else { $sql = INSERT INTO `access` (`accessID`, `accessIP`, `accessDNS`, `accessTIME`, `accessUPDATE`, `accessVIEW`) VALUES ('', '$proxy_ip', '$proxy_dns', '$add_date', NOW(NULL), '0'); $result = mysql_query($sql); } if (db_num_rows() 0) {= WHERE DOSE THIS VERABLE COME FROM? - Original Message - From: Julio Nobrega Trabalhando [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 20, 2002 8:45 AM Subject: [PHP] Re: [NEWMAN] make an if or else if statement from mysql. Select before to see if exists: if (db_num_rows() 0) { // Update view where ip = visitor_ip } else { // Normal insert } -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 Philip J. Newman [EMAIL PROTECTED] wrote in message 003401c1cf85$1afe54c0$0401a8c0@philip">news:003401c1cf85$1afe54c0$0401a8c0@philip... I have a log of IP numbers that come to WEBSITE A $sql = INSERT INTO `access` (`accessID`, `accessIP`, `accessDNS`, `accessTIME`, `accessUPDATE`, `accessVIEW`) VALUES ('', '$proxy_ip', '$proxy_dns', '$add_date', NOW(NULL), '0'); This has worked well, how ever when someone comes back with the same accessIP then I would like then accessVIEW aadds a +1 to the value. I would like help to create this .. if (!$remote_addr) - if the ip that they are using is the same as one in the table then update the record and use the accessID for that record. else if there isn't that $remote_addr in the table then it is added. I have yet to start on the code, so would some direction. Philip J. Newman PhilipNZ :: Design Solutions http://www.philipnz.com/ [EMAIL PROTECTED] ICQ# 20482482 +64 25 6144012 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] using reload within PHP when submitting a form
I use this construct constantly. Assume name of script is thisform.php3: ?php if( isset($submit) ) { print $myname; exit; } ? HTML HEAD /HEAD BODY FORM method=post action=./thisform.php3 INPUT type=text name=myname value=BR INPUT type=submit name=submit value=Submit /FORM /BODY /HTML -Original Message- From: Daniel Negron/KBE [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 10:29 PM To: [EMAIL PROTECTED] Subject: [PHP] using reload within PHP when submitting a form I have tried several variations within PHP to reload the page after updating a form to PHP_SELF. Does anyone have a working example within a form AFTER a submit ? **DAN** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with gethostbyaddr()
Greetings all, I'm having a problem with the gethostbyaddr() function in PHP 4.1.2. Whenever I use it, regardless of the IP (Intranet or Internet) it just returns the IP. It says in the manual if there is an error, it will return the IP, but I can't figure out what the error is. Anyone have any input? Thanks in advance. Brian Drexler Operations Technician Saginaw Control Engineering (989)799-6871 Ext. 497 http://www.saginawcontrol.com http://www.saginawcontrol.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] edit record in mysql and receive error
Hi, I have the following records in my table dnsDNS Record 1 : Login = company1 ip = 10.123.100.111 Record 2 : Login = company2 ip = 10.123.101.111 I want to update recordnumber 1 I receive error ?php $ip=10.10.9.100; $company=company1; $host=localhost; $user=username; $password=abcdef; $database=database1; $query = update dynDNS SET IP='$ip' where Login='$company'; mysql_connect ($host, $user, $password); mysql_select_db($database); $result=mysql_query($query); if ($result == 0) { echo(error); echo(BR); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] LDAP and 2k
Hi all Has anyone been successful in authenticating ldap via win2k using samaccountname (username) instead of the users container name. I can successfully do it against the cn but this is not always the same as the username. All help/guidelines will be gratefully received. matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Filing Structure
I am coming from a Flash, Director, and VB type programming world. Filing structure and code structure in PHP is really new to me. Therefore, does anyone have some an example filing structure I can look at or documentation on how to best structure? I downloaded a free message board (phpBB2) from sourceforge.net, and that's a start. Any more? J ** Scanned for Viruses ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML (to XML?) to PDF
Hm. If you can't store the data as XML from the beginning (doesn't it make more sense to go from XML to HTML than vice versa?), Yes, it does. However, the people creating these templates don't know XML, only HTML. As such, that is how they are going to be stored. :| If your initial document is in XHTML form, you should be able to use XSLT, since XHTML is a form of XML. Yes, that would be the ideal situation. However, that won't be the case. So I need to find out some way to be able to either: * Print the HTML (less tags, keep formatting) to PDF * Convert the HTML to XML to I can then pass that onto the PDFClass we are using. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] edit record in mysql and receive error
We can't read your mind. What kind of error do you get? Second, I recommend that you ALWAYS add the die() clause to your mysql function calls -Original Message- From: Manu Verhaegen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 7:16 AM To: 'Php-General (E-mail) Subject: [PHP] edit record in mysql and receive error Hi, I have the following records in my table dnsDNS Record 1 : Login = company1 ip = 10.123.100.111 Record 2 : Login = company2 ip = 10.123.101.111 I want to update recordnumber 1 I receive error ?php $ip=10.10.9.100; $company=company1; $host=localhost; $user=username; $password=abcdef; $database=database1; $query = update dynDNS SET IP='$ip' where Login='$company'; mysql_connect ($host, $user, $password); mysql_select_db($database); $result=mysql_query($query); if ($result == 0) { echo(error); echo(BR); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Problem with gethostbyaddr()
My apologies for wasting everyone's time. gethostbyaddr() works fine, I had gethostbyname() in my script. Is today Monday or something? Have a nice day! Brian -Original Message- From: Brian Drexler [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:15 AM To: Php-General@Lists. Php. Net Subject: [PHP] Problem with gethostbyaddr() Greetings all, I'm having a problem with the gethostbyaddr() function in PHP 4.1.2. Whenever I use it, regardless of the IP (Intranet or Internet) it just returns the IP. It says in the manual if there is an error, it will return the IP, but I can't figure out what the error is. Anyone have any input? Thanks in advance. Brian Drexler Operations Technician Saginaw Control Engineering (989)799-6871 Ext. 497 http://www.saginawcontrol.com http://www.saginawcontrol.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP for 3D scatterplots
is there any code for this available yet? I am looking for a way of plotting gif images of objects in a 3D space... thank you! Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] why doesnt this work???
this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why doesnt this work???
if( $line[1]='$bruker' and $line[2]='$passord') {echo hei $bruker.;} else {echo FEIL;} -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] why doesnt this work??? this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why doesnt this work???
nope... that did not do the trick... -Chris Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... if( $line[1]='$bruker' and $line[2]='$passord') {echo hei $bruker.;} else {echo FEIL;} -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] why doesnt this work??? this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why doesnt this work???
You need two = signs for comparision not just one . Also I think you need to enclose the variables in double quote. if( $line[1]==$bruker and $line[2]==$passord) echo hei $bruker.; else echo FEIL; -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] why doesnt this work??? this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why doesnt this work???
Hi, I am not an expert, but try if( $line[0]='$bruker' and $line[1]='$passord') {echo hei $bruker.;} else {echo FEIL;} atb Lars -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: 20 March 2002 14:22 To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? nope... that did not do the trick... -Chris Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... if( $line[1]='$bruker' and $line[2]='$passord') {echo hei $bruker.;} else {echo FEIL;} -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] why doesnt this work??? this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why doesnt this work???
It still just comes out blank when the vars is wrong R'Twick Niceorgaw [EMAIL PROTECTED] wrote in message 020501c1d01b$11eb1d00$[EMAIL PROTECTED]">news:020501c1d01b$11eb1d00$[EMAIL PROTECTED]... You need two = signs for comparision not just one . Also I think you need to enclose the variables in double quote. if( $line[1]==$bruker and $line[2]==$passord) echo hei $bruker.; else echo FEIL; -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] why doesnt this work??? this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why doesnt this work???
instead of 'and' use '' if($line[1] == $bruker $line[2] == $passord){ echo hei $bruker.; }else{ echo FEIL; } Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: R'twick Niceorgaw [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:25 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? You need two = signs for comparision not just one . Also I think you need to enclose the variables in double quote. if( $line[1]==$bruker and $line[2]==$passord) echo hei $bruker.; else echo FEIL; -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] why doesnt this work??? this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why doesnt this work???
First: you need == not = to test equivalence. Second, use not '; otherwise $vars will not expand if( $line[1]==$bruker and $line[2]==$passord) {echo hei $bruker.;} else {echo FEIL;} -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:22 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? nope... that did not do the trick... -Chris Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... if( $line[1]='$bruker' and $line[2]='$passord') {echo hei $bruker.;} else {echo FEIL;} -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] why doesnt this work??? this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why doesnt this work???
it all works just fine exept that when the vars is wrong i get a blank page...wich means that the else echo doesnt work for some reason... and if i use == the correct vars become wrong... but it does print the else echo... hmm... Robert Collins [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... instead of 'and' use '' if($line[1] == $bruker $line[2] == $passord){ echo hei $bruker.; }else{ echo FEIL; } Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: R'twick Niceorgaw [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:25 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? You need two = signs for comparision not just one . Also I think you need to enclose the variables in double quote. if( $line[1]==$bruker and $line[2]==$passord) echo hei $bruker.; else echo FEIL; -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] why doesnt this work??? this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why doesnt this work???
Try this if($line[1] == '$bruker' $line[2] == '$passord'){ echo hei $bruker.; }else{ echo FEIL; } Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:33 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? it all works just fine exept that when the vars is wrong i get a blank page...wich means that the else echo doesnt work for some reason... and if i use == the correct vars become wrong... but it does print the else echo... hmm... Robert Collins [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... instead of 'and' use '' if($line[1] == $bruker $line[2] == $passord){ echo hei $bruker.; }else{ echo FEIL; } Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: R'twick Niceorgaw [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:25 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? You need two = signs for comparision not just one . Also I think you need to enclose the variables in double quote. if( $line[1]==$bruker and $line[2]==$passord) echo hei $bruker.; else echo FEIL; -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] why doesnt this work??? this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why doesnt this work???
Thanx for all the help guys, but i have tried all of the sugestions but the one that works best is the one i startet with... but that one does not work 100% either...im so confused my head is about to fall of i just dont get it... Robert Collins [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Try this if($line[1] == '$bruker' $line[2] == '$passord'){ echo hei $bruker.; }else{ echo FEIL; } Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:33 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? it all works just fine exept that when the vars is wrong i get a blank page...wich means that the else echo doesnt work for some reason... and if i use == the correct vars become wrong... but it does print the else echo... hmm... Robert Collins [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... instead of 'and' use '' if($line[1] == $bruker $line[2] == $passord){ echo hei $bruker.; }else{ echo FEIL; } Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: R'twick Niceorgaw [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:25 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? You need two = signs for comparision not just one . Also I think you need to enclose the variables in double quote. if( $line[1]==$bruker and $line[2]==$passord) echo hei $bruker.; else echo FEIL; -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] why doesnt this work??? this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why doesnt this work???
Please try this :) for ($i = 0; $i mssql_num_rows( $result ); $i++) { $line = mssql_fetch_row($result); if (($line[0] == $bruker) ($line[1] == $passord)) { echo hei $line[0]; } else { echo FEIL; } Lars Stampe -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: 20 March 2002 14:30 To: 'chris'; [EMAIL PROTECTED] Subject: RE: [PHP] why doesnt this work??? First: you need == not = to test equivalence. Second, use not '; otherwise $vars will not expand if( $line[1]==$bruker and $line[2]==$passord) {echo hei $bruker.;} else {echo FEIL;} -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:22 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? nope... that did not do the trick... -Chris Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... if( $line[1]='$bruker' and $line[2]='$passord') {echo hei $bruker.;} else {echo FEIL;} -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] why doesnt this work??? this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP - mssql
-Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 3:38 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP - mssql ?PHP $link = mssql_connect($hostname,$username,$password); $dblink = mssql_select_db($dbname, $link); if ( $link $dblink ) { $query = select * from members where user = '$user' and pass = '$pass'; $result = mssql_query( $query ); if ( $result ) echo correct login; else echo wrong login; } ? This is not working... i have tried everything i can think of that can work but with no luck. In what way isn't it working? Do you get an error message, or just not the result you were expecting? If it's the latter (in particular, if you're getting correct login no matter what values you use for $user and $pass), the issue is likely related to the fact that mssql_query() returns a result identifier which doesn't necessarily have any correlation to the contents of the result set -- it'll only return false if there's an error in your query (and a query can be error-free and still not return data). For what you're doing, you'll probably want to take a look at mssql_num_rows(). --- Mark Roedel | Blessed is he who has learned to laugh Systems Programmer| at himself, for he shall never cease LeTourneau University | to be entertained. Longview, Texas, USA | -- John Powell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why doesnt this work???
This works; I just tried it. ?php $line = bruker; $bruker = bruker; $linex = passwordx; $password = password; if( !strcmp($line,$bruker) !strcmp($line,$password) ) {echo hei $bruker.;} else {echo FEIL;} ? -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:41 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? Thanx for all the help guys, but i have tried all of the sugestions but the one that works best is the one i startet with... but that one does not work 100% either...im so confused my head is about to fall of i just dont get it... Robert Collins [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Try this if($line[1] == '$bruker' $line[2] == '$passord'){ echo hei $bruker.; }else{ echo FEIL; } Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:33 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? it all works just fine exept that when the vars is wrong i get a blank page...wich means that the else echo doesnt work for some reason... and if i use == the correct vars become wrong... but it does print the else echo... hmm... Robert Collins [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... instead of 'and' use '' if($line[1] == $bruker $line[2] == $passord){ echo hei $bruker.; }else{ echo FEIL; } Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: R'twick Niceorgaw [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:25 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? You need two = signs for comparision not just one . Also I think you need to enclose the variables in double quote. if( $line[1]==$bruker and $line[2]==$passord) echo hei $bruker.; else echo FEIL; -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] why doesnt this work??? this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why doesnt this work???
This works : ?php $line = array('','bob','tpw'); $bruker = 'bob'; $passord = 'pw'; if($bruker == $line[1] $passord == $line[2]){ echo hei $bruker.; }else{ echo FEIL; } ? Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:41 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? Thanx for all the help guys, but i have tried all of the sugestions but the one that works best is the one i startet with... but that one does not work 100% either...im so confused my head is about to fall of i just dont get it... Robert Collins [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Try this if($line[1] == '$bruker' $line[2] == '$passord'){ echo hei $bruker.; }else{ echo FEIL; } Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:33 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? it all works just fine exept that when the vars is wrong i get a blank page...wich means that the else echo doesnt work for some reason... and if i use == the correct vars become wrong... but it does print the else echo... hmm... Robert Collins [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... instead of 'and' use '' if($line[1] == $bruker $line[2] == $passord){ echo hei $bruker.; }else{ echo FEIL; } Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: R'twick Niceorgaw [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:25 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? You need two = signs for comparision not just one . Also I think you need to enclose the variables in double quote. if( $line[1]==$bruker and $line[2]==$passord) echo hei $bruker.; else echo FEIL; -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] why doesnt this work??? this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] new to php/mysql - insert not working
Can somebody help me with this? The following code gets me document contains no data. I have done a successfull select from mysql db, but not an insertion. I don't know how to troubleshoot this. Any help is much appreciated. Thanks! ?php $id = addslashes($id); $visitdate = addslashes($visitdate); $img_group = addslashes($img_group); $img_url = addslashes($img_url); $display = addslashes($display); $db = mysql_connect(www, mmc, mmc-WWW); if (!$db) { echo Error: Could not connect to database. Please try again later.; exit; } mysql_select_db(mmc); $query = insert into visitorgallery values ('.$id.', '.$img_url.', '.$visitdate.', '.$img_group.', '.$display.', ); $result = mysql_query($query); if ($result) echo mysql_affected_rows(). Image inserted! ; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why doesnt this work???
Hi, Let me explain what is wrong with this line: if( $line[1]='$bruker' and $line[2]='$passord') when you use = instead of == it will always be true because you set $line[1] to $bruker, you have to compare them by using ==. Also looking at your sql query $line[0] would contain your username and $line[1] your password! try after $line = mssql_fetch_row($result); echo DEBUG : $line[0] - $line[1] - $line[2]; if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; Regards Lars Stampe -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: 20 March 2002 14:41 To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? Thanx for all the help guys, but i have tried all of the sugestions but the one that works best is the one i startet with... but that one does not work 100% either...im so confused my head is about to fall of i just dont get it... Robert Collins [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Try this if($line[1] == '$bruker' $line[2] == '$passord'){ echo hei $bruker.; }else{ echo FEIL; } Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:33 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? it all works just fine exept that when the vars is wrong i get a blank page...wich means that the else echo doesnt work for some reason... and if i use == the correct vars become wrong... but it does print the else echo... hmm... Robert Collins [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... instead of 'and' use '' if($line[1] == $bruker $line[2] == $passord){ echo hei $bruker.; }else{ echo FEIL; } Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -Original Message- From: R'twick Niceorgaw [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:25 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] why doesnt this work??? You need two = signs for comparision not just one . Also I think you need to enclose the variables in double quote. if( $line[1]==$bruker and $line[2]==$passord) echo hei $bruker.; else echo FEIL; -Original Message- From: chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] why doesnt this work??? this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP for 3D scatterplots
Simon De Deyne [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... is there any code for this available yet? I am looking for a way of plotting gif images of objects in a 3D space... thank you! Simon Don't know of any offhand, but it doesn't sound all THAT hard to develop... actually, it could be kind of interesting. In fact, if you want to include a few more details I might whip up a demo for you. - what kind of axis scaling do you want? (linear / log) - axis data range figured how? (specified / auto) - where do you want the axis drawn (back edge / full box / at 0s) - what kind of projection (orthogonal / perspective) - how to draw data points (single-pixel / ball / icon) - depth indication (none / shading / drop-line to axis / other) - should data points be scaled (no / by size / by color) - how to handle overlapping / coincident data (ignore / emphasize) - how to color data points (specified / per-point / random/arbitrary) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Accessing form variables
I have a form with a menu which I need multiple select on. How does PHP handle this? I have to use $HTTP_POST_VARS[somevariable] to access somevariable from the form. -- Joshua E Minnie CIO [EMAIL PROTECTED] Don't work for recognition, but always do work worthy of recognition. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] safe_mode_include_dir not working
Hi all, I have PHP 4.1.2 as Apache module, Safe-Mode On. I want to use the safe_mode_include_dir directive and ... this does not work. I have this in the directory directive of httpd.conf, I put the include_path to exactly the same path, I use complete path, and I always get the safe-mode restriction in effect error. I have found some information about this directive working for 4.0.7 and higher, but nothing usefull ( I tried several configurations ) to me and nothing about 4.1.2. Any idea, or tricks from people for whom it works ? Many thanks, Estelle -- -- Estelle Martin mailto:[EMAIL PROTECTED] -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Db Access Count
Hi there, I want to have a field in a database that counts the number of times that particular record has been viewed on the website. When is the best time to increment the count in the file and how? Kind Regards, Ian.
[PHP] Re: why doesnt this work???
What I think you'd note, actually, is that you ALWAYS get the matching echo, and never the non-matching, because you're using an assignment operator instead of comparison. It should read if ($line[1]==' instead of ($line[1]='. --Matt Chris wrote: this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Delete Confirmation
Daniel Negron/Kbe wrote: Does anyone have examples of record deletions from php to mysql Could you be more specific? $sql = DELETE from tablename where tablename_idx = $index; $result = mysql_query($sql); would be a very simple example of deleting a record from a hypothetical database with php, but I'm not sure if that's what you were really asking. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: new to php/mysql - insert not working
The actual typo in your code is a trailing comma in your sql statement. '.$img_group.', '.$display.', ); Strip out the comma after your last single quote. It's very useful to have CLI access to mysql. Then you could just say, print QUERY: $query BR\n; and instead of executing it, paste it into the mysql CLI and see what it has to say. You may also want to keep an eye on your web server logs, or raise php errors so they are printed in the web server output, but in this case, you'd probably see no error. --Matt Robert McPeak wrote: Can somebody help me with this? The following code gets me document contains no data. I have done a successfull select from mysql db, but not an insertion. I don't know how to troubleshoot this. Any help is much appreciated. Thanks! ?php $id = addslashes($id); $visitdate = addslashes($visitdate); $img_group = addslashes($img_group); $img_url = addslashes($img_url); $display = addslashes($display); $db = mysql_connect(www, mmc, mmc-WWW); if (!$db) { echo Error: Could not connect to database. Please try again later.; exit; } mysql_select_db(mmc); $query = insert into visitorgallery values ('.$id.', '.$img_url.', '.$visitdate.', '.$img_group.', '.$display.', ); $result = mysql_query($query); if ($result) echo mysql_affected_rows(). Image inserted! ; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] new to php/mysql - insert not working
Robert, I still feel fairly new to this myself but if I find that I'm having problems writing to the database I generally try to echo the query to the page and then test this out directly with the command line prompt directly to the database. At least that way you can test out the query in isolation. Good luck, Michael The following code gets me document contains no data. I have done a successfull select from mysql db, but not an insertion. I don't know how to troubleshoot this. Any help is much appreciated. Thanks! ?php $id = addslashes($id); $visitdate = addslashes($visitdate); $img_group = addslashes($img_group); $img_url = addslashes($img_url); $display = addslashes($display); $db = mysql_connect(www, mmc, mmc-WWW); if (!$db) { echo Error: Could not connect to database. Please try again later.; exit; } mysql_select_db(mmc); $query = insert into visitorgallery values ('.$id.', '.$img_url.', '.$visitdate.', '.$img_group.', '.$display.', ); $result = mysql_query($query); if ($result) echo mysql_affected_rows(). Image inserted! ; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Accessing form variables
If your form is: SELECT name=a OPTION value=11/OPTION OPTION value=22/OPTION /SELECT SELECT name=b OPTION value=11/OPTION OPTION value=22/OPTION /SELECT Then you'd have two php post variables available, a and b, each would have a value of 1 or 2, which you could get from HTTP_POST_VARS or, with later php versions, $_POST[a] and $_POST[b]. Joshua E Minnie wrote: I have a form with a menu which I need multiple select on. How does PHP handle this? I have to use $HTTP_POST_VARS[somevariable] to access somevariable from the form. -- Joshua E Minnie CIO [EMAIL PROTECTED] Don't work for recognition, but always do work worthy of recognition. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sessions not so secure..solution?
Steve Clay wrote: Hello, I'm building an e-commerce site which uses sessions to hold my $cart object. This works great but I've two worries: 1) When the user connects through our secure hostname, can I ensure the browser will send the server the cookie (w/ SESSID)? The user will shop through domain.com and checkout via https:secure.domain.com. (haven't got cert yet) If your cookie domain is .domain.com, it will send the cookie to both, however, you don't really WANT to use the same cookie in both places. 2) While the user shops the SESSID is thrown around insecurely (no big deal, just a cart). But when I move the user to a secure server to get sensitive info a resourceful hacker could also go to the checkout script using this SESSID and 'confirm' the real user's personal details (kept in another registered session object). Yes, and so this is inappropriate. Allocate a cookie for all pages (ssl and not). When they transition to SSL for checkout, then give them an SSL cookie as well, and associate it with the old cookie. You could store them in a session -- I do it in a database table. Store the time you allocated the SSL cookie. Mandate that when someone views a secure page, to be considered authenticated, they must hand you the SSL-only cookie. You can use its association to retrieve the cart, but not to let someone else interrupt the ordering process, or use its authentication properties to view personal details, cancel an order, etc. Since you set the cookie to be SSL-ONLY (there's a flag for that in setcookie()), it won't be passed in the clear. Associate the assignment time of the cookie with it, and each pageview, reset it to some reasonable number, say 5-30 min. After that time expires, the cookie is no good and you reassign one. In my own scheme, that's when a user re-enters their password. Anyhow, the dual-cookie approach will allow you to maintain reasonable security. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTTP_Upload with PHP
We have an application that used PHP's FTP function to upload files. Now it worked until we upgraded to 4.1.2. We have now downgraded back to 4.1.1 but still no luck, it won't work. We have set upload_max_filesize and post_max_size as well, and that doesn't seem to help. Here is the following code. It has not changed since it went live: srand((double)microtime()*100); //Create random timestamp for the file temp file $randval = rand(); //Creates a temp file that the file gets put in, we then read that file $tmpfile = /tmp/ . $file_name . $randval; copy($file,$tmpfile);//line 272 ftp_put($this-connection,$file_name,$tmpfile,FTP_BINARY); //line 273 unlink($tmpfile); return true; This is inside a function, and $file is the handle for the uploaded file and $file_name is the name of the uploaded file. The weird thing is that this will work for small files ( 1MB). Anything bigger, it gives us the following errors: Warning: Unable to open 'none' for reading: No such file or directory in /Ftp.inc on line 272 Warning: error opening /tmp/IP4_0EngALLMsi.exe1419195771 in /Ftp.inc on line 273 Any ideas? It seems as if the big files are not getting passed in? Thanks, /rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP_Upload with PHP
'none' comes from a failed file upload. Figure out why the file upload is not working. Did you perhaps turn file uploads off in your php.ini file? -Rasmus On Wed, 20 Mar 2002, Rick wrote: We have an application that used PHP's FTP function to upload files. Now it worked until we upgraded to 4.1.2. We have now downgraded back to 4.1.1 but still no luck, it won't work. We have set upload_max_filesize and post_max_size as well, and that doesn't seem to help. Here is the following code. It has not changed since it went live: srand((double)microtime()*100); //Create random timestamp for the file temp file $randval = rand(); //Creates a temp file that the file gets put in, we then read that file $tmpfile = /tmp/ . $file_name . $randval; copy($file,$tmpfile);//line 272 ftp_put($this-connection,$file_name,$tmpfile,FTP_BINARY); //line 273 unlink($tmpfile); return true; This is inside a function, and $file is the handle for the uploaded file and $file_name is the name of the uploaded file. The weird thing is that this will work for small files ( 1MB). Anything bigger, it gives us the following errors: Warning: Unable to open 'none' for reading: No such file or directory in /Ftp.inc on line 272 Warning: error opening /tmp/IP4_0EngALLMsi.exe1419195771 in /Ftp.inc on line 273 Any ideas? It seems as if the big files are not getting passed in? Thanks, /rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Multipage form
I was just wondering what was the best way to handle a multipage form. Would the best way be to keep passing the variables through the forms as hidden values or should I use sessions and store all the values as session variables? What's the best way to handle all of this? Also the different forms will all be in the same php file that loops to itself if that makes a difference. Thanks, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] environment variable code fails
? session_start(); include($DOCUMENT_ROOT/php/main.home.php); ? The environment variable in this code on index.php is not invoking main.home.php page in php folder in htdocs on new server. Code worked on previous server setup, but fails on new server. Other php calls to MySQL db in ported site code that uses environment variable seems to work fine, but this very first start page code fails. What can be wrong?--JRF -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with HTTP Authorization
I realize this may be a bit out of the scope of this list, but I'm sure someone out there can help. Here is my problem. I'm using htaccess/htpasswd for authentication on my site. I want to know if there is a way that when a user opens a link in a new window, their htaccess information stays the same. As it is right now, if USER1 clicks on a link that opens a new window, the new window has no user. I'd like the new window to have USER1 as the user. Is this possible? Brian Drexler Operations Technician Saginaw Control Engineering (989)799-6871 Ext. 497 http://www.saginawcontrol.com http://www.saginawcontrol.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysql update help needed
Can somebody straighten this out for me? I can't get the update to work. I'm sure the variables are being passed to the code. Thanks! if ($postaction==edit) { echo it firedBr; // process form $db = mysql_connect(myhost, myuname, mypword); mysql_select_db(mydb); $sql = UPDATE mytable SET img_url=$img_url,visitdate=$visitdate,img_group=$img_group,display=$display, caption=$caption where id = $id; $result = mysql_query($sql); echo center; echo Thank you! Information entered.\n; echo /center; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Calling Javascript-function from php-script ...
I'm not quite sure what you mean... If Javascript were disabled then this whole argument would be moot. Since our method requires Javascript to properly function we're really not interested in that particular situation. :) There are two ways a PHP script (or any scripting language for that matter) can send input to a Javascript. One, by dynamically generating a local Javascript with the lines of code necessary to perform a certain task. Two, by sending information through the URL string to a remote Javascript which runs functions based on that information. Classic Input/Output. It doesn't matter where the input is coming from so long as the program gets what is expecting. So in this sense the two unrelated programs (one server side, one client side) are communicating, just not directly. Bottom line is the method works so I don't understand what there is to debate. See here for a working example http://www.helpelf.com/fetch_data.html It's not very sophisticated yet (all the junk left in the URL, et al). But it does what I'm talking about. You can copy paste this Javascript into any web page and it'll return the same database information gathered by the PHP script. -Kevin -Original Message- From: Alexander Skwar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 4:27 PM To: Kevin Stone Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Calling Javascript-function from php-script ... »Kevin Stone« sagte am 2002-03-19 um 14:11:42 -0700 : Not entirely true. Javascript is directly linked to HTML and HTML is directly linked to PHP so you can have PHP talk to Javascript through HTML. I still don't agree. You can of course create JavaScripts dynamically in PHP. However, PHP won't talk to JS, it's the browser which will execute the dynamically created JS and then maybe talk back to the server and thus execute some PHP code. This may seem like nitpicking, but I don't think it is. If PHP were to execute the JS, it would work even when the user had disabled JS in his browser. Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.iso-top.de | Jabber: [EMAIL PROTECTED] iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 2 days 12 hours 18 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] drop down box
Hi I need to get info from a specific field in a MySQL database to appear in a drop box as options. Has anyone any ideas on this. Thanks Mohamed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] page expired message
Is there any way to avoid getting this message when I hit back on my browser Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you. To resubmit your information and view this Web page, click the Refresh button. I get it when I am using a form with session variables... Zara -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Calling Javascript-function from php-script ...
I think the point here is that it be made clear to those who might get confused that the javascript (unless it's a server-side script) is running in a browser and as such there is no way for the server to 'make a call to it by URL.' The Javascript can call the server but the server-side PHP script cannot call the client. Therefore, no PHP script can 'call' a javascript function. On Wednesday 20 March 2002 12:44 pm, Kevin Stone wrote: I'm not quite sure what you mean... If Javascript were disabled then this whole argument would be moot. Since our method requires Javascript to properly function we're really not interested in that particular situation. :) There are two ways a PHP script (or any scripting language for that matter) can send input to a Javascript. One, by dynamically generating a local Javascript with the lines of code necessary to perform a certain task. Two, by sending information through the URL string to a remote Javascript which runs functions based on that information. Classic Input/Output. It doesn't matter where the input is coming from so long as the program gets what is expecting. So in this sense the two unrelated programs (one server side, one client side) are communicating, just not directly. Bottom line is the method works so I don't understand what there is to debate. See here for a working example http://www.helpelf.com/fetch_data.html It's not very sophisticated yet (all the junk left in the URL, et al). But it does what I'm talking about. You can copy paste this Javascript into any web page and it'll return the same database information gathered by the PHP script. -Kevin -Original Message- From: Alexander Skwar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 4:27 PM To: Kevin Stone Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Calling Javascript-function from php-script ... »Kevin Stone« sagte am 2002-03-19 um 14:11:42 -0700 : Not entirely true. Javascript is directly linked to HTML and HTML is directly linked to PHP so you can have PHP talk to Javascript through HTML. I still don't agree. You can of course create JavaScripts dynamically in PHP. However, PHP won't talk to JS, it's the browser which will execute the dynamically created JS and then maybe talk back to the server and thus execute some PHP code. This may seem like nitpicking, but I don't think it is. If PHP were to execute the JS, it would work even when the user had disabled JS in his browser. Alexander Skwar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] drop down box
This is actually a small excerpt from a program I've written in the past... hope it helps... function show_downtime_form() { global $conf_file; global $filter; $data=file($conf_file); foreach ( $data as $line ) { $bang=explode(':', $line); $idents[]=$bang[0]; } $idents=array_unique($idents); echo 'div align=centerhr width=300'; echo 'form name=inputform action=reports.php method=post'; echo 'Match Idents To:br'; echo 'input type=text name=filter value='.$filter.''; echo 'br - OR Select - br'; echo 'select name=temp onchange=doEcho()'; echo 'option selected--From Current Idents--'; foreach($idents as $ident) { echo 'option value='.$ident.''.$ident; } echo '/select'; echo 'br'; echo 'input type=submit value=search'; echo '/form'; echo '/div'; } -Original Message- From: ...::: M.E. Suliman :::... [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 9:57 AM To: [EMAIL PROTECTED] Subject: [PHP] drop down box Hi I need to get info from a specific field in a MySQL database to appear in a drop box as options. Has anyone any ideas on this. Thanks Mohamed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTMLnetscape issue
Hi, Sorry for repeating myself, but am lost and still can't find a solution to the following problem, I need to specify a background image for td like the code below: tr td background=images/bottomcell_bg.gif/td /tr This code works EVERYWHERE (in all browsers) but Netscape Navigator 4.xx versions. Please help, Thanks, Vlad http://kulchitski.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Calling Javascript-function from php-script ...
I think the point here is that I'm right and you're wrong *JUST JOKING!* Seriously you're absolutely right, a PHP script can not activate a Javascript function. What I'm saying (and what I wanted the original poster to understand) is that a PHP script CAN send input to a Javascript, and based on that input run a specific function. A Javascript can activate a PHP function in the same way. So in this way a Javascript and a PHP script can in fact communicate. (please note the preceeding a before the words Javascript and PHP.. we're not talking about the languages here only the physical scripts, because we could be talking about any two interpreted languages). *phew* Are we done yet? I really need to get back to work. LOL :D -Kevin -Original Message- From: Andrew Lopucki [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 10:51 AM To: Kevin Stone; [EMAIL PROTECTED] Subject: Re: [PHP] Calling Javascript-function from php-script ... I think the point here is that it be made clear to those who might get confused that the javascript (unless it's a server-side script) is running in a browser and as such there is no way for the server to 'make a call to it by URL.' The Javascript can call the server but the server-side PHP script cannot call the client. Therefore, no PHP script can 'call' a javascript function. On Wednesday 20 March 2002 12:44 pm, Kevin Stone wrote: I'm not quite sure what you mean... If Javascript were disabled then this whole argument would be moot. Since our method requires Javascript to properly function we're really not interested in that particular situation. :) There are two ways a PHP script (or any scripting language for that matter) can send input to a Javascript. One, by dynamically generating a local Javascript with the lines of code necessary to perform a certain task. Two, by sending information through the URL string to a remote Javascript which runs functions based on that information. Classic Input/Output. It doesn't matter where the input is coming from so long as the program gets what is expecting. So in this sense the two unrelated programs (one server side, one client side) are communicating, just not directly. Bottom line is the method works so I don't understand what there is to debate. See here for a working example http://www.helpelf.com/fetch_data.html It's not very sophisticated yet (all the junk left in the URL, et al). But it does what I'm talking about. You can copy paste this Javascript into any web page and it'll return the same database information gathered by the PHP script. -Kevin -Original Message- From: Alexander Skwar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 4:27 PM To: Kevin Stone Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Calling Javascript-function from php-script ... Kevin Stone sagte am 2002-03-19 um 14:11:42 -0700 : Not entirely true. Javascript is directly linked to HTML and HTML is directly linked to PHP so you can have PHP talk to Javascript through HTML. I still don't agree. You can of course create JavaScripts dynamically in PHP. However, PHP won't talk to JS, it's the browser which will execute the dynamically created JS and then maybe talk back to the server and thus execute some PHP code. This may seem like nitpicking, but I don't think it is. If PHP were to execute the JS, it would work even when the user had disabled JS in his browser. Alexander Skwar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTMLnetscape issue
At 20.03.2002 13:11, you wrote: Hi, Sorry for repeating myself, but am lost and still can't find a solution to the following problem, I need to specify a background image for td like the code below: tr td background=images/bottomcell_bg.gif/td /tr This code works EVERYWHERE (in all browsers) but Netscape Navigator 4.xx versions. UNTESTED Try an $nbsp; insidetd/td as: trtd background=images/bottomcell_bg.gifnbsp;/td/tr HTH Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] building a control panel in php
On Wednesday 20 Mar 2002 02:42, Thalis A. Kalfigopoulos wrote: -Original Message- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 5:49 PM To: Paul ... Cc: [EMAIL PROTECTED] Subject: Re: [PHP] building a control panel in php On Wed, 20 Mar 2002, Paul ... wrote: just thinking about making a small control panel for my server so i can do the web hosting related things from the web... would php be a good language to do this in and if so why?.. what would be the ups and downs? The fastest way would be to download Webmin from here (http://www.webmin.com/), then change all the comments so it says you wrote it. Seriously, you might want to look into that because a lot of people have already put a lot of work into making something fairly comprehensive. miguel Yes, but how safe can one feel having all this power-functionality over a webpage? (I presume lots of stuff is SETUID;Correct?) Webmin is modular. You only install the modules you want to control over the web. You can also retrict access to port 1 (on which it lives by default) in the normal way. I imagine you can set it to do HTTPS connections as well, but I've not tried that because I only use it locally. --jaa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HTMLnetscape issue
STILL DOESN'T WORK :( -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 20 ÂÅÒÅÚÎÑ 2002 Ò. 13:29 To: [EMAIL PROTECTED] Subject: Re: [PHP] HTMLnetscape issue At 20.03.2002 13:11, you wrote: Hi, Sorry for repeating myself, but am lost and still can't find a solution to the following problem, I need to specify a background image for td like the code below: tr td background=images/bottomcell_bg.gif/td /tr This code works EVERYWHERE (in all browsers) but Netscape Navigator 4.xx versions. UNTESTED Try an $nbsp; insidetd/td as: trtd background=images/bottomcell_bg.gifnbsp;/td/tr HTH Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTMLnetscape issue
On Wednesday 20 Mar 2002 18:11, Vlad Kulchitski wrote: Hi, Sorry for repeating myself, but am lost and still can't find a solution to the following problem, I need to specify a background image for td like the code below: tr td background=images/bottomcell_bg.gif/td /tr This code works EVERYWHERE (in all browsers) but Netscape Navigator 4.xx versions. Yes, Netscape 4.x doesn't do table backgrounds according to HTML spec. There is no solution for it, and you'll have to work your way around it, either by changing the design for your page, or by giving an alternative layout which is displayed when netscape users pay a visit. The second way I mentioned is really surprisingly easy using CSS. --jaa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Making a simple borderless pop up window with a Close button
Using the options parameter will allow you to get rid of toolbarts and scrollbars, but NOT the window's border, which the question was asking. -Joe Bvr [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The 3rd parameter to JavaScript function window.open() allows you to disable a number of window elements every browser has, these include the toolbar (buttons), location, status, menubar, scrollbars. This functionality is provided by the most common browsers and versions (MSIE and Netscape) and will also work in Mozilla and Netscape 6. I don't know about the JavaScript implementation in Opera, but if it supports JS it is likely to support these options too (or at least ingores them). bvr. Joe Webster wrote: It only works in IE -- it makes use of the 'Full Screen' (F11) option and tricks IE into doing so... hope you don't want it to work in NS, Opera... or anything else -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP - mssql
I doubt msSQL differs from MySQL -- $link = mssql_connect( $host, $user, $pass ) or die( Can't connect to the DB! ); mssql_select_db( $dbname, $link ) or die( Can't select database ); $query = SELECT * FROM members WHERE user='$user' AND pass='$pass';; $result = mssql_query( $query, $link ); if(!mssql_num_rows( $result )){ die( Username/Password no good ); } else{ die( Everything is okay! ); } like i said, i think all the mysql functions in php have a mssql equiv. -- like mssql_num_rows(). -Joe Chris [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi. I have a table that contains lots of names in mssql. and i want to make a page where each of theese individuals can login with that spesific username and password. So my question is : what is the proper (best) command to use for sending and returning the info? ?PHP $link = mssql_connect($hostname,$username,$password); $dblink = mssql_select_db($dbname, $link); if ( $link $dblink ) { $query = select * from members where user = '$user' and pass = '$pass'; $result = mssql_query( $query ); if ( $result ) echo correct login; else echo wrong login; } ? This is not working... i have tried everything i can think of that can work but with no luck. So if someone have a solution for me... i would apriciate it :) (and yes i do have defined all the vars in the script they are just not that important here) -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mysql update help needed
if ($postaction==edit) -Original Message- From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 11:44 AM To: [EMAIL PROTECTED] Subject: [PHP] mysql update help needed Can somebody straighten this out for me? I can't get the update to work. I'm sure the variables are being passed to the code. Thanks! if ($postaction==edit) { echo it firedBr; // process form $db = mysql_connect(myhost, myuname, mypword); mysql_select_db(mydb); $sql = UPDATE mytable SET img_url=$img_url,visitdate=$visitdate,img_group=$img_group,display=$display, caption=$caption where id = $id; $result = mysql_query($sql); echo center; echo Thank you! Information entered.\n; echo /center; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Announcement: Smarty template engine 2.0.1 available
This is a point release, a few bug fixes clean up. http://www.phpinsider.com/php/code/Smarty/ There have been some nice plugins contributed to the plugin repository too! http://www.phpinsider.com/php/code/Smarty/contribs/plugins/ Version 2.0.1 - - rename plugin .make_timestamp.php to shared.make_timestamp.php (Monte) - changed crc32() generated values, replace '-' with 'N' (Monte) - added support for +/- N syntax in html_select_date year values (Monte) - fixed behavior of inserts with script attribute. (Andrei) - fixed bug with $smarty.cookies and $smarty.server. (Andrei) - wordwrap and indent are missing from 2.0 release, now fixed. (Monte) - removed show_info_header and show_info_include variables. (Monte) -- Monte Ohrt [EMAIL PROTECTED] Director of Technology, ispi Inc. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with posting
I'm writing a voting script, but I have a problem with it. Voters cast their vote by submitting a form. When this form is received it is added to the database, and a session variable is set saying that they've voted. The problem is that once someone's voted they can just press reload on their browser and it sends another vote. This happens in Netscape 4.x. All other browsers either do not submit form data or recognise that the session variable is set. Any ideas on how to fix this? Thanks. --jaa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Problem with posting
What do you mean All other browsers either do not submit form data? show your code. What kind of user authentication are you using? If none, they'll vote and vote often. -Original Message- From: James Arthur [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 1:39 PM To: [EMAIL PROTECTED] Subject: [PHP] Problem with posting I'm writing a voting script, but I have a problem with it. Voters cast their vote by submitting a form. When this form is received it is added to the database, and a session variable is set saying that they've voted. The problem is that once someone's voted they can just press reload on their browser and it sends another vote. This happens in Netscape 4.x. All other browsers either do not submit form data or recognise that the session variable is set. Any ideas on how to fix this? Thanks. --jaa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTMLnetscape issue
On Wednesday, March 20, 2002, at 01:11 PM, Vlad Kulchitski wrote: Sorry for repeating myself, but am lost and still can't find a solution to the following problem, I need to specify a background image for td like the code below: tr td background=images/bottomcell_bg.gif/td /tr This code works EVERYWHERE (in all browsers) but Netscape Navigator 4.xx versions. You're fighting an unwinnable battle. Give up on Crapscape 4.x, it is full of bugs. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with posting
On Wed, 20 Mar 2002, James Arthur wrote: I'm writing a voting script, but I have a problem with it. Voters cast their vote by submitting a form. When this form is received it is added to the database, and a session variable is set saying that they've voted. The problem is that once someone's voted they can just press reload on their browser and it sends another vote. This happens in Netscape 4.x. All other browsers either do not submit form data or recognise that the session variable is set. How about this: When they go to the page that provides the voting form, generate a unique random number and store it in your database. Send that number as a hidden variable on the voting form. When the form is submitted, look up the number in the database and store their vote alongside it. That way, if they resubmit, it just replaces their earlier vote. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HTMLnetscape issue
Yes here is a solution to this problem and I am surprised no one on this list pointed it out. Simply put a transparent dot within a cell table that you wish to have the background image display. Netscape 4 in retarded in the fact that it will not display a cell background image unless it has cell content. tr td background=images/bottomcell_bg.gifimg src=images/transparent_1x1_dot.gif/td /tr -Original Message- From: Vlad Kulchitski [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 10:12 AM To: [EMAIL PROTECTED] Subject: [PHP] HTMLnetscape issue Hi, Sorry for repeating myself, but am lost and still can't find a solution to the following problem, I need to specify a background image for td like the code below: tr td background=images/bottomcell_bg.gif/td /tr This code works EVERYWHERE (in all browsers) but Netscape Navigator 4.xx versions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multipage form
On Wednesday, March 20, 2002, at 11:57 AM, David Johansen wrote: I was just wondering what was the best way to handle a multipage form. Would the best way be to keep passing the variables through the forms as hidden values or should I use sessions and store all the values as session variables? What's the best way to handle all of this? Also the different forms will all be in the same php file that loops to itself if that makes a difference. Thanks, These can be a pain in the ASS. But as for the answer to your question, it's really more a matter of personal preference and the particular application you have. For instance, if I were writing a shopping cart or some extremely complicated sequence of forms that fork off into a tree-like structure, I'd probably just give up on hidden form fields and use session variables. But because session variables can be tricky to unset (you have to make sure the user explicitly executes a script to unset them), I try to avoid it when I can. I have a linear multi-part form (not one that branches into different directions) where I take user input and throw it all into hidden form fields -- very tedious, yes, but I have finer control over what values get passed around as the user moves on. Side note: the trickiest thing can be getting multiple-listbox values to be passed on, since it'll be hard to put multiple values into a single form field. The way to do it is a miniature loop for each case where you need to do this, that places each value into an element of an array -- then implode the array into a string and put the string into the hidden form field. Explode the string back into an array on the next part of the form. For a branching, tree-like system I'd probably use sessions unless for some reason you can't -- just make sure the user has a way of knowing what's in their cart (or equivalent for your site) somewhere, so that if they closed the window in the middle of filling out the form, possibly expecting it to reset all of their work, then they won't be surprised when they try to fill out the same form later and see all of their old values from their session. Good luck Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HTMLnetscape issue
The problem is it doesn't show the picture background, even if I type text in that cell... -Original Message- From: Nathan Cassano [mailto:[EMAIL PROTECTED]] Sent: 20 ÂÅÒÅÚÎÑ 2002 Ò. 14:43 To: [EMAIL PROTECTED]; Vlad Kulchitski Subject: RE: [PHP] HTMLnetscape issue Yes here is a solution to this problem and I am surprised no one on this list pointed it out. Simply put a transparent dot within a cell table that you wish to have the background image display. Netscape 4 in retarded in the fact that it will not display a cell background image unless it has cell content. tr td background=images/bottomcell_bg.gifimg src=images/transparent_1x1_dot.gif/td /tr -Original Message- From: Vlad Kulchitski [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 10:12 AM To: [EMAIL PROTECTED] Subject: [PHP] HTMLnetscape issue Hi, Sorry for repeating myself, but am lost and still can't find a solution to the following problem, I need to specify a background image for td like the code below: tr td background=images/bottomcell_bg.gif/td /tr This code works EVERYWHERE (in all browsers) but Netscape Navigator 4.xx versions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HTMLnetscape issue
I agree, but there are sites like heavy GRAPHICS sites that look fine everywhere you know what I am saying... the only solution I see is to add more cells, like even 1 pix cells and 100 pix wide if I want a line of graphic etc... that is the only solution I see -Original Message- Sorry for repeating myself, but am lost and still can't find a solution to the following problem, I need to specify a background image for td like the code below: tr td background=images/bottomcell_bg.gif/td /tr This code works EVERYWHERE (in all browsers) but Netscape Navigator 4.xx versions. You're fighting an unwinnable battle. Give up on Crapscape 4.x, it is full of bugs. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions
I am kind of confused by this error that I am receiving when I try to logout of a session. If somebody could pleae help me out here. Warning: Cannot send session cache limiter - headers already sent (output started at /home/www/wildwebtech/cumc/default.php:9) in /home/www/wildwebtech/cumc/default.php on line 10 Here is the code that is causing the problem. ? session_start(); $result = session_unregister(valid_user); session_destroy(); ? -- Joshua E Minnie CIO [EMAIL PROTECTED] Don't work for recognition, but always do work worthy of recognition. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Db Access Count
To increment the field $count by one I can just do $count ++ can I? Cheers, Ian. - Original Message - From: Randum Ian To: PHP Mailing List Sent: Wednesday, March 20, 2002 4:20 PM Subject: [PHP] Db Access Count Hi there, I want to have a field in a database that counts the number of times that particular record has been viewed on the website. When is the best time to increment the count in the file and how? Kind Regards, Ian. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with posting
On Wednesday 20 Mar 2002 19:40, Rick Emery wrote: What do you mean All other browsers either do not submit form data? I mean when the user hits 'reload' the POST data is not resubmitted. Some browsers do not resubmit form data, some do, and some prompt. What kind of user authentication are you using? If none, they'll vote and vote often. A session variable is used to store who has voted and who has not. Netscape and Mozilla seem to eschew this somehow. Not sure how. In IE it works fine, even when you choose to resubmit the form data. Hit http://wired.st-and.ac.uk/ to see what happens. --jaa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Accessing form variables
On Wed, 20 Mar 2002, Joshua E Minnie wrote: I have a form with a menu which I need multiple select on. How does PHP handle this? I have to use $HTTP_POST_VARS[somevariable] to access somevariable from the form. For a multiple select, stick [] after the HTML name and you'll get it back as an array with one element for each item the user selects: select multiple name=colors[] blah blah /select Will get you an array in $_REQUEST['colors'] . miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Again, and Again, and AGAIN!
Are you hitting enter while in one of the fields or clicking the submit button. I've seen versions of IE that would not set the submit button if enter was used. Personally, I would check for isset($username) isset($password). Mike... (Sorry for the very late reply, etc. I've been dealing with a screwy server for the past few days:( Jason Wong wrote: On Sunday 17 March 2002 13:14, Jason Wong wrote: You're using 4.1.1, $HTTP_POST_VARS{} has been replaced by $_POST[] (see changelog/history/php.ini for details). Sorry a typo: $HTTP_POST_VARS[] has been replaced by $_POST[] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTMLnetscape issue
On Wednesday 20 Mar 2002 19:43, Nathan Cassano wrote: Yes here is a solution to this problem and I am surprised no one on this list pointed it out. Simply put a transparent dot within a cell table that you wish to have the background image display. Netscape 4 in retarded in the fact that it will not display a cell background image unless it has cell content. tr td background=images/bottomcell_bg.gifimg src=images/transparent_1x1_dot.gif/td /tr Not only that, but it doesn't inherit the background image from its parent properly. For example, table background=myimage.gif trtdSome text/tdtdMore text/td/tr tr colspan=2tdEven more text/td/tr /table You'll find that the background is repeated in each cell, not that the cells are transparent and the table area has a background. This is mightily annoying. --jaa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] TIMESTAMP and COMPARISON
Hello, I am looking for a standard way to compare to dates. I have a date/time stored in a field in a mysql table as date_added TIMESTAMP(14). (IE mmddhhmmss). I want to delete all records in this table if date_added is older than 2 hours. IE if current_date date_added +2 hours then delete record. How do I do this from within mysql? Do I need to go outside of mysql and code it in php to do this? I read that mysql wants calculations done on the app side as compared to the server side. What do others do with these kind of situations? It appears that if I have to bring data out of the table and do a comparison it wouldnt be efficient. Thanks, ccma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php