Re: [PHP] PHP and XHTML
Hi Daniel, Set short_open_tag = Off in your php.ini file and the problem will go away. --zak Rose, Daniel wrote: Hi, I have looked through the history of the list, and I see that several people have said that PHP fully supports XHTML. I have some problems using XHTML with PHP, namely parse errors, such as a parse error on the first line of every XHTML doc. ?xml version=1.0 encoding=UTF-8? [...] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] displaying icons
On 17 Jul 01, at 16:30, Yassel Omar Izquierdo Souchay wrote: Put the same text inside php example ? echo img src=abduction.ico the next code and if you want it to work reliable do is this way: echo img src=\abduction.ico\; and away you go... CYA, Dave --- Outback Queensland Internet - Longreach, Outback Queensland - Australia http://www.outbackqld.net.au mailto:[EMAIL PROTECTED] --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP based statistics/Graphs
On Tue, Jul 17, 2001 at 10:48:24PM -0700, Rasmus Lerdorf wrote: I like Vagrant. See http://vagrant.sourceforge.net I prefer R :) http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html It is IMHO the best language for statistic. -Egon On Wed, 18 Jul 2001, Chris Aitken wrote: Hi everyone.. Just wondering if anyone can suggest any methods, or even pre-made packages which can be manipulated to show various statistics, charts, graphs etc on a whole range of things. What im looking to do is run a whole bunch of statistics pages for where I work. Client stats, plan popularity, monthly income etc etc. Just doing some research and figured you guys are the best place to get some info. Cheers Chris -- Chris Aitken - Administration/Database Designer - IDEAL Internet email: [EMAIL PROTECTED] phone: +61 2 4628 fax: +61 2 4628 8890 __-__ *** Big Brother *** It just shows that the dull will rule the world. And we will be watching it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- -- All known books about PHP and related books: http://php.net/books.php Concert Band of the University of Hohenheim: http://www.concert-band.de/ First and second bestselling book in German: http://www.php-buch.de/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Cannot copy a file to a dynamic folder
Hi! when you use the \ character in a string you have to escape it by putting \\ instead of one! $default_dir = (D:\www\Proj\$textfield2\); would become: $default_dir = D:\\www\\Proj\\$textfield2\\; do the same for the $filename variable. Vincent Chew [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I get a parse error every time and I've modified the scripts a bunch of times already. // Make new directory function $default_dir = (D:\www\Proj\$textfield2\); if(file_exists($default_dir)) rmdir($default_dir); mkdir($default_dir, 0777); // Copy template.html to new directory $filename = D:Automator\auto_2\Template.html; copy($filename, ($default_dir) .overview.html); Can I not have these two scripts run together? The mkdir function alone works. Can someone tell me what I'm doing wrong? Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Command line args HELP!!!
Hey all, I tried passing an argument to a php script that had a plus sign (+) in one of the arguments. Observe the following: sciptname http://altavista.com/sites/search/web?q=task+managementpg=qkl=XX As it turns out the argument gets split into two seperate arguments, but I would like to keep it as one argument. Does anyone know how to accomplish this. I posted a bug report to bugs.php.net, and they responded by telling me to read: http://www.php.net/manual/en/language.variables.external.php But still after searching that page for the information I was looking for, nothing seemed to work. Am I missing something. Please let me know. Thanks, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Force new page in browser and wait commands
a simple example: ?php if (isset($submit)) { // process something here with all form's variable //example: echo !-- This page is created for $username --; } ? html headtitletest!/title/head body form name:input type=text name=usernamebr input type=submit name=submit /body /html In this example you won't see the comment in the start of the page unless the user processes the form. Hugh Danaher [EMAIL PROTECTED] wrote in message 002501c10f17$876cbf40$2afeb3d1@default">news:002501c10f17$876cbf40$2afeb3d1@default... Help, I'm new to php, and to writing software in general. Enough said on that. What I want to do, is to have my program wait for user input on a form and once data is submitted, to have the browser (IE5) generate a new page. Right now, my program runs straight through input forms and appends everything to the existing page. I now accomplish this by running several connected php programs, but want to do it in one program. I've looked throughout the php manual and website but have yet to find the right commands. Your help is greatly appreciated. Hugh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] count number of email sent to us
Dear people, I have an email link on my page like this a href=mailto:[EMAIL PROTECTED]; Big George /a and I want to know how may people click on on this particular link to keep the record, may be insert this record into a table as well ( but don't erally have to) Is there any technique at all to achieve this? cheers Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts
[PHP] LDAP compile problem.
When i try to activate ldap on a UNIX system something goes wrong but i dont even know were to begin looking. i use the --with-ldap when i compile but it doesnt give me any errors and yet it doesnt work. Any suggestions? On my PC it worked great. //Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: To overwrite or unregister session variables
Joseph Blythe [EMAIL PROTECTED] schrieb im Newsbeitrag 000801c10f42$9912f860$3e060bd2@binarylogic">news:000801c10f42$9912f860$3e060bd2@binarylogic... Hey, Was just wondering if it was better practice to unregister session variables before writing new values to them or if it was fine to just overwrite their values? Just overwrite .. Regards, Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Regular expressions
In article 000b01c10f4a$d569c5c0$0300a8c0@sparlak, [EMAIL PROTECTED] (Philip Murray) wrote: In Perl you can do this: $foo =~ tr/012/mpf/; Which is the same as: $foo = str_replace(0, m, $foo); $foo = str_replace(1, p, $foo); $foo = str_replace(2, f, $foo); in PHP. Is there a more elegant way of doing this in PHP? See the docs on str_replace() or preg_replace, both of which can take arrays as arguments, or on strtr() which appears to be the most direct equivalent to your Perl expression. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] count number of email sent to us
hi jack, the easiest way for you to do this is by using javascript. do somethins like: a href=mailto:[EMAIL PROTECTED]; onClick=countClick()Big George/a and have a javascript function like: script... function countClick()= { ...do stuffs } /script i dont know if you can embed php in javascript function or not, or any other method you can use. halmi/ On Wed, 18 Jul 2001 14:17:57 -0500 Jack [EMAIL PROTECTED] wrote: Dear people, I have an email link on my page like this a href=mailto:[EMAIL PROTECTED]; Big George /a and I want to know how may people click on on this particular link to keep the record, may be insert this record into a table as well ( but don't erally have to) Is there any technique at all to achieve this? cheers Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts halmi/ /** http://affroman.com **/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] count number of email sent to us
Yes, that is the point here. We normally use variables from php to do something in php function, how could we use javascript variables to do something in php function? Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts - Original Message - From: halmi yasin [EMAIL PROTECTED] To: Jack [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 10:43 AM Subject: Re: [PHP] count number of email sent to us hi jack, the easiest way for you to do this is by using javascript. do somethins like: a href=mailto:[EMAIL PROTECTED]; onClick=countClick()Big George/a and have a javascript function like: script... function countClick()= { ...do stuffs } /script i dont know if you can embed php in javascript function or not, or any other method you can use. halmi/ On Wed, 18 Jul 2001 14:17:57 -0500 Jack [EMAIL PROTECTED] wrote: Dear people, I have an email link on my page like this a href=mailto:[EMAIL PROTECTED]; Big George /a and I want to know how may people click on on this particular link to keep the record, may be insert this record into a table as well ( but don't erally have to) Is there any technique at all to achieve this? cheers Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts halmi/ /** http://affroman.com **/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] count number of email sent to us
Check the list archives - this question gets posed quite often. --zak - Original Message - From: Jack [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 1:38 PM Subject: Re: [PHP] count number of email sent to us Yes, that is the point here. We normally use variables from php to do something in php function, how could we use javascript variables to do something in php function? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: How make the time
select count(*) from test1 where MINUTE(tm1) = 15 and MINUTE(tm1) = 30 and HOUR(tm1)=12 this query will return you on column containing how many record found in that time range, same as how many customers where surfed at that time where 30-15=interval and 12 is the hour you're checking in! David Tandberg-Johansen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello! I am trying to make an online booking script for a client (restaurant), and I am using MySQL to store the booking information The restaurant have openings hour from 11:00 - 01:00, but do only take reservation between 11:00-22:30. The client wants to get a report written out over each hour like this: 11:002 Customers 11:1532 Customers 11:3012 Customers ... ... 22:3014 Customers In the MySQL table I have set up the time field as 'time' with 00:00:00 as default. Everything is ok, but I am stuck on how to make this report. The customer have set an interval of 15 mnutes between possible time to book, so I have to make an 'SELECT'-query based on when the restaurant opens to the time of the last possible booking time. But how do I make the timeset (11:00:00 and up to 22:30:00) My far out example: interval = 15; while (time=endtime){ time=starttime DBCONNECTION Select * from booking wher tine_field='time' time = time+interval } Do anyone have any tips on how I can solve this David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: How make the time
select count(*) from test1 where MINUTE(tm1) = 15 and MINUTE(tm1) = 30 and HOUR(tm1)=12 this query will return you on column containing how many record found in that time range, same as how many customers where surfed at that time where 30-15=interval and 12 is the hour you're checking in! David Tandberg-Johansen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello! I am trying to make an online booking script for a client (restaurant), and I am using MySQL to store the booking information The restaurant have openings hour from 11:00 - 01:00, but do only take reservation between 11:00-22:30. The client wants to get a report written out over each hour like this: 11:002 Customers 11:1532 Customers 11:3012 Customers ... ... 22:3014 Customers In the MySQL table I have set up the time field as 'time' with 00:00:00 as default. Everything is ok, but I am stuck on how to make this report. The customer have set an interval of 15 mnutes between possible time to book, so I have to make an 'SELECT'-query based on when the restaurant opens to the time of the last possible booking time. But how do I make the timeset (11:00:00 and up to 22:30:00) My far out example: interval = 15; while (time=endtime){ time=starttime DBCONNECTION Select * from booking wher tine_field='time' time = time+interval } Do anyone have any tips on how I can solve this David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] count number of email sent to us
Sorry, It is mistyping here. I mean, we normally use variables from php to do something in javascript function. But how could we use value from variables in javascript function to do something in php function? Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts - Original Message - From: Zak Greant [EMAIL PROTECTED] To: Jack [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 2:39 AM Subject: Re: [PHP] count number of email sent to us Check the list archives - this question gets posed quite often. --zak - Original Message - From: Jack [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 1:38 PM Subject: Re: [PHP] count number of email sent to us Yes, that is the point here. We normally use variables from php to do something in php function, how could we use javascript variables to do something in php function? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Command line args HELP!!!
The whole string Paul A. Procacci [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hey all, I tried passing an argument to a php script that had a plus sign (+) in one of the arguments. Observe the following: sciptname http://altavista.com/sites/search/web?q=task+managementpg=qkl=XX The whole string is in $QUERY_STRING (dont now whether encoded or not) To test this use ? phpinfo() ? as a php-script and pass your params as above. As it turns out the argument gets split into two seperate arguments, but I would like to keep it as one argument. Does anyone know how to accomplish this. I posted a bug report to bugs.php.net, and they responded by telling me to read: http://www.php.net/manual/en/language.variables.external.php But still after searching that page for the information I was looking for, nothing seemed to work. Am I missing something. Please let me know. Thanks, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] formating numbers to two decimal points - money - best ways
Anyone have functions for formatting numbers being multiplied by variables and whatnot to two decimal points - rounded up? As for displaying total cost, etc? _ Get your FREE download of MSN Explorer at http://explorer.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] passing variables from forms to the same page repetatively
This function that matt sent to automatically write hidden inputs is awesome. it works great. I am only using the first function. It's a great solution. thanks Original Message Follows From: maatt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [PHP] passing variables from forms to the same page repetatively Date: Tue, 17 Jul 2001 11:23:11 +0100 I was doing something similar just yesterday. Ended up with a little function to automatically write hidden inputs for every variable that's submitted, whether posted or thru the url. Goes like this... // put this somewhere in your form ?php print get_param_inputs(); ? // the function itself function get_param_inputs() { global $HTTP_GET_VARS, $HTTP_POST_VARS; $ret_str = ; $params = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS); foreach ($params as $k=$v) { if (is_array($v)) { foreach($v as $kk=$vv) { $ret_str .= 'input type=hidden name='.$k[$kk].' value='.$vv.''; } } else { $ret_str .= 'input type=hidden name='.$k.' value='.$v.''; } } return $ret_str; } I also needed to append the variables to links on the same page (for page 1, page 2, page 3... type thing) so did this: a href=?php print $PHP_SELF.get_param_query() ?link/a function get_param_query() { global $HTTP_GET_VARS, $HTTP_POST_VARS; $ret_str = ; $params = array_merge($HTTP_GET_VARS, $HTTP_POST_VARS); $j = ?; foreach ($params as $k=$v) { if (is_array($v)) { foreach($v as $kk=$vv) { $ret_str .= $j.urlencode($k[$kk]=$vv); $j = ; } } else { $ret_str .= $j.urlencode($k=$v); $j = ; } } return $ret_str; } Won't work if you're nesting arrays within arrays, but I'm not a recursive type. Hope it helps, Matt David Robley [EMAIL PROTECTED] wrote in message 01071716134101.29979@www">news:01071716134101.29979@www... On Tue, 17 Jul 2001 15:41, Tim Olsen wrote: People, I have 4 forms in four seperate html pages included directly (no links to includes) in the same .php file, i have it so all the form actions is php.self, so when each form is submitted it goes on to display the next form in line, using if and else statements, of course. I want to be able to use variables created by the first form in the html part of the last form. What is the best way to do this? So far, I can only use variables on the next page (form) that is written out. After that those variables have no value. Is there some way to submit all variables present and assigned with the submission of each form? If I make the forms a seperate include file, instead of having them in-line, how does this change the ways variables are passed or submitted by each form? Thanks, - Tim _ If I understand what you are saying: those variables don't exist until you SUBMIT the form. You can demonstrate this by looping through and displaying your POST or GET vars at the beginning of the form and see what happens when you first open the page, and when it calls itself. And re-reading, I think what you may want is hidden fields. You want part one to call part 2, and retain values from part 1, etc? Echo the values into hidden fields in each step of the process. INPUT TYPE=hidden NAME=whatever VALUE=?php echo $whatever ? -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA I always lie. In fact, I'm lying to you right now! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] count number of email sent to us
Both topics are covered frequently :) --zak Jack wrote: Sorry, It is mistyping here. I mean, we normally use variables from php to do something in javascript function. But how could we use value from variables in javascript function to do something in php function? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: Extracting from arrays - alphabetically
foreach ($array as $key=$element) { if (your_condition) echo({$array2[$key]} $element); } this is a general solution, but in your case why do you need to use the array with lastname as the element, why not just test the keys of the first name array, i.e. foreach ($array2 as $key=$element) { if (your_condition) echo($key $element); } ... and why do you have the 2 arrays in the first place? Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html -Original Message- From: Kevin Price-Ward [mailto:[EMAIL PROTECTED]] Sent: 17 July 2001 11:24 To: [EMAIL PROTECTED] Subject: Extracting from arrays - alphabetically Hi, A simple problem for you guys (I think), I have 2 arrays - firstname and lastname, both have the same associative index - lastname, I have then performed asort on both to order them alphabetically. Now I just need to extract and display the array elements that have the associative index beginning with A or B or whatever is defined by $query - thus displaying only names where the lastname begins with A etc. How do I do this? Thanks for any help you can offer. Lar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] formating numbers to two decimal points - money - best ways
On Wed, 18 Jul 2001 17:21, Tim Olsen wrote: Anyone have functions for formatting numbers being multiplied by variables and whatnot to two decimal points - rounded up? As for displaying total cost, etc? PHP has :-) have a look at the mathematical functions. http://www.php.net/manual/en/ref.math.php Round is probably the one you want. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA If a program is useless, it must be documented. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Command line args HELP!!!
argv Array of arguments passed to the script. When the script is run on the command line, this gives C-style access to the command line parameters. When called via the GET method, this will contain the query string. argc Contains the number of command line parameters passed to the script (if run on the command line). try'em Paul A. Procacci [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hey all, I tried passing an argument to a php script that had a plus sign (+) in one of the arguments. Observe the following: sciptname http://altavista.com/sites/search/web?q=task+managementpg=qkl=XX As it turns out the argument gets split into two seperate arguments, but I would like to keep it as one argument. Does anyone know how to accomplish this. I posted a bug report to bugs.php.net, and they responded by telling me to read: http://www.php.net/manual/en/language.variables.external.php But still after searching that page for the information I was looking for, nothing seemed to work. Am I missing something. Please let me know. Thanks, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] help on getting rid of \'
I am working with php and mysql and have the need to write a query like: $sql_statement=mysql_query( select * from table where column='string' ); What comes out is: select * from table where column=\'string\' mysql doesn't like this one bit and I get the dreaded: Warning: Supplied argument is not a valid MySQL result resource in /www /... 3display.php on line 41 I've tried using settype($sql_statement,string) before (and after) the above statement and still get the \'. Naturally, I've looked in the php manual online and found nothing helpful on this subject. Please help the needy. Hugh
[PHP] How to stop a previous page being repeated ?
How do I stop a previous page being repeated when the user hits their back button on the browser? Is PHP can do it? __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] help on getting rid of \'
I am working with php and mysql and have the need to write a query like: $sql_statement=mysql_query( select * from table where column='string' ); What comes out is: select * from table where column=\'string\' Only if you pass that variable through a GET/POST/COOKIE operation and you have magic_quotes_gpc enabled in your php.ini file. Either turn magic_quotes off or call stripslashes() on your string before passing it to MySQL. But, are you sure you want to be passing entire query strings between pages? Normally you would only pass the actual query arguments. In your case probably the 'string' part. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php-qmail-sendmail...cjk
Hello. I want to use a NEWSLETTER for my web site . I have 2 servers Server A: qmail,php-4.0.5,apache,courier/imap,mysql server b: sendmail,php4.0.2,apache,cyrus/imap,mysql In server A when i am trying to send a newsletter i have the following error: Warning: mail() is not supported in this PHP build in /usr/local/htdocs/test/newsletter/phpmynewsletter/include/cls.php3 on line 141 Now i thought to install SENDMAIL in server A in order to install and configure again PHP-APACHE-MYSQL and after uninstall it. I want to know will this function influence the qmail program? and another thing that i can do but dont know how is to somehow say to PHP that my mail program is QMAIL.Anybody knows how? sincerely _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] formating numbers to two decimal points - money - best ways
? $c = 12.3456; echo number_format($c, 2); ? http://php.net/number_format -Original Message- From: Tim Olsen [mailto:[EMAIL PROTECTED]] Sent: 18 iulie 2001 10:52 To: [EMAIL PROTECTED] Subject: [PHP] formating numbers to two decimal points - money - best ways Anyone have functions for formatting numbers being multiplied by variables and whatnot to two decimal points - rounded up? As for displaying total cost, etc? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How can i pop my mails?
Hi Using PHP, how can i check my mail and dump it to a text file? As if email2text ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How is the management of memory by PHP?
Hi Luiz! On Tue, 17 Jul 2001, Luiz Fernando (Tuca) wrote: Somebody know how it is the management of memory by PHP? yes, it's quite well done :) what exactly are you interested in? -- teodor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: How make the time
Thank you Elias [EMAIL PROTECTED] skrev i melding [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... select count(*) from test1 where MINUTE(tm1) = 15 and MINUTE(tm1) = 30 and HOUR(tm1)=12 this query will return you on column containing how many record found in that time range, same as how many customers where surfed at that time where 30-15=interval and 12 is the hour you're checking in! David Tandberg-Johansen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello! I am trying to make an online booking script for a client (restaurant), and I am using MySQL to store the booking information The restaurant have openings hour from 11:00 - 01:00, but do only take reservation between 11:00-22:30. The client wants to get a report written out over each hour like this: 11:002 Customers 11:1532 Customers 11:3012 Customers ... ... 22:3014 Customers In the MySQL table I have set up the time field as 'time' with 00:00:00 as default. Everything is ok, but I am stuck on how to make this report. The customer have set an interval of 15 mnutes between possible time to book, so I have to make an 'SELECT'-query based on when the restaurant opens to the time of the last possible booking time. But how do I make the timeset (11:00:00 and up to 22:30:00) My far out example: interval = 15; while (time=endtime){ time=starttime DBCONNECTION Select * from booking wher tine_field='time' time = time+interval } Do anyone have any tips on how I can solve this David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How is the management of memory by PHP?
I would like to know like is the management, that recourses the php utlize. I am making a work to university and I need of more information. I find in www.zend.com a article about Reference Counting, but i stayed confuse, if o recourse is of PHP 4 or of ZEND Engine.. Thanks Luiz Fernando [EMAIL PROTECTED] escreveu nas notícias de mensagem:[EMAIL PROTECTED] Hi Luiz! On Tue, 17 Jul 2001, Luiz Fernando (Tuca) wrote: Somebody know how it is the management of memory by PHP? yes, it's quite well done :) what exactly are you interested in? -- teodor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] unistall a newer veraion....cjk
i have in a server PHP 4.0.2 version and a function (mail) is working perfectly.In the version PHP 4.0.5 i have problems.How can i unintall the 4.0.5 to install 4.0.2? Do i just go to the sourcer directory of the 4.0.2 and give the ./configure command? _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] unistall a newer veraion....cjk
În 18 Jul 2001 14:59:21 +0300 Constantine Koulis a scris: i have in a server PHP 4.0.2 version and a function (mail) is working perfectly.In the version PHP 4.0.5 i have problems.How can i unintall the 4.0.5 to install 4.0.2? Unfortunatelly php doesn't have the classic make uninstall You can delete it by hand (the apache module and /usr/local/php) and then install what version you want. (If it's a development server, don't even bother to remove 4.0.5, just install another php 4.0.x) Marius Andreiana -- You don't have to go to jail for helping your neighbour http://www.gnu.org/philosophy/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] HTML in XML???
Hi, Is there some way to include HTML tags in a XML doc??? I want to use a XML document to include HTML data for my webpage. I have made a solution of replacing a special word to the '' and ' of a HTML tag. But I think my solution is very stupid. And is there a special php xml newsgroup?? thanks, Leon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] HTML in XML???
Is there some way to include HTML tags in a XML doc??? Yes, if your HTML is wellformed - XHTML And is there a special php xml newsgroup?? http://www.onlamp.com/pub/a/php/php-xml-ml.html Bye Jens -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] CAN'T connect to db when running PHP as Cron
I post this yesterday, but no one responds. Please someone help. I wonder if my problem is actually a bug in php or cron. -- Hello, I have a php script that connect to database and retrieve something, or do something with the db. I can run the script from the command line, it works just fine. But when I run it as cron, it gives error cannot connect to the database. Here is the script looks like: ? // script name: ora_test.php $conn = ora_logon(username@db, password); $cur = ora_open($conn); if (ora_parse($cur, select something from table)) { ora_exec($cur); while(ora_fetch($cur)) { $something[] = ora_getcolumn($cur, 0); } print_r($something); $msg = ''; for ($i=0; $icount($something); $i++) $msg .= $something[$i] . ; mail (me@localhost, test, $msg); } ? Here is the crontab entry: */1 * * * * /usr/local/bin/php ora_test.php /tmp/cron_oralog The error message from cron_oralog files is: X-Powered-By: PHP/4.0.3pl1 Content-type: text/html Warning: Oracle: Connection Failed: Error while trying to retrieve text for error ORA-12154 in ora_test.php on line 3 Warning/b: Supplied argument is not a valid Oracle-Connection resource in bora_test.php/b on line b5/b br bWarning/b: Supplied argument is not a valid Oracle-Cursor resource in bora_test.php/b on line b7/bbr Any help on this would be greatly appreciated. Thanks. Reuben D. Budiardja -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] CAN'T connect to db when running PHP as Cron
I would gather the output from phpinfo() for each case (web server cron job) and compare them. Often a path or environment variable will be different. This is especially true of Oracle which is somewhat fussy about having it's environment set properly in order to connect. - Tim http://www.phptemplates.org I have a php script that connect to database and retrieve something, or do something with the db. I can run the script from the command line, it works just fine. But when I run it as cron, it gives error cannot connect to the database. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Just like to know
hi, here's a little question. I like to know what is better and WHY ?? $string = bla bla $somevar bla bla bla $somevar$somevar bla; of $string = bla bla .$somevar. bla bla bla .$somevar.$somevar. bla; kind regards Jeroen Olthof -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] $PHP_AUTH_USER
hi can I use $PHP_AUTH_USER as a global variable? I'm having a hard time with it in my other pages. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: LDAP compile problem.
Johan, As the PHP documentation points out in Function Reference: LDAP functions: ...You will need to get and compile LDAP client libraries from either the University of Michigan ldap-3.3 package or the Netscape Directory SDK 3.0. You will also need to recompile PHP with LDAP support enabled before PHP's LDAP calls will work... Here is a link to this page: http://www.php.net/manual/en/ref.ldap.php So, after compiling the LDAP client libraries you will want to configure with the --with-ldap option, for example (if you install the libraries to /usr/local): $ ./configure [...all other options...] --with-ldap=/usr/local -Jeremy Maziarz Email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Just like to know
Jeroen, I guess it depends on your coding style and preference. Functionally, they do the same thing. First line is easier to read while the second line requires more typing. One note. This will not work (using an associative array): ?php $somevar = array(foo=bar); $string1 = bla bla $somevar[1] bla bla bla $somevar[foo]$somevar[1] bla; ? -Jeremy Maziarz Email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Just like to know
Hello, I ame facing a cookies problem with with Internet Explorer I issue the following command to set the cookie: setcookie( $cookie_name, $cookie_value, time()+15768, /, .mydomain.gr, 0 ) The page that sends the cookie is in an IFRAME inside the main browser's window. The domain in the main window and the page in the iframe is different. IE refuses to save the cookie if the privacy level is medium (or higher). If we set the privacy level to 'low' everything works fine. The problem is that IE comes with privacy level set to medium by default. Is there any way to set the cookie overiding IE's security options? Thanks in advance, George Papadakis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] MySQL Query
I have a table that looks like Name | Type | X | Y Foo| Ship | 9 | 29 Bar| Base | 9 | 29 Is there any way I can write a query that selects everything with Type = Base, and X and Y = Foo's X and Y? ie Select * from table where type = Base and X = {Foo:X} and Y = {Foo:Y}; Anyway, any ideas would be greatly appreciated Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com
[PHP] php/perl module
Is there any way for php to call a perl module? If so, would I need to do some sort of include (like the Perl use THIS;)? I don't know if this can even be done, but thanks in advance. Jessica -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] NT Authentication
I am running php4/mysql/apache in a large NT complex, behind a firewall. How can I authenticate users to my site using NT authentication? Has anyone done this? thanks, Warren Vail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Variable name into string
Hello, Manual and news group search returned to result on this topic. (or May be I miss something.) The objective : to be able to identify (print, compare, etc.) variable name as a String to be able to override class method based on variable name. Variable will be an associative array. Consider the following class method reconstraction : ?php $variable = array(); # I CAN NOT do variable variables thing here like function ($$variable) { if ($variable = Text) { $result = input type=\text\ ; foreach ($$variable as $prop=$value) { $result .= $prop=\$value\ ; } $result .=; return $result; } elseif {($variable = Area) $result = textarea ; foreach ($properties as $prop=$value) { $result .= $prop=\$value\ ; } $result .=; return $result; } } ? QUESTION: It is any way to extract variable string from $variable ? Thank you very much for any helpfull input regarding topic. Maxim Volkov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] How is the management of memory by PHP?
Reference counting works in the following way. Normally, if you assign an identifier to the value of an instantiated object then the parser will create a copy of that object. That is, the parser will allocate a physical chunk of memory of the relevant size and copy the memory contents of the original object into this location, your new variable will refer to this new chunk of memory. Say you had something like: 1 $objA = new classA; 2 $objA-temp = 10; 3 4 $objB = $objA Line 4 will cause the allocation of memory and copying of the contents of $objA into this new memory area. $objB will refer to this new copy. Allocating memory and copying values into that memory space consumes resources (time, processor, memory space etc..). Reference counting works by putting of the allocation of memory until such a time as the new copy of the object is actually altered. So, say you have something like: 1 $objA = new classA; 2 $objA-temp = 10; 3 4 $objB = $objA 5 $objB-temp2 =20; At line 4 no new memory is allocated. Instead, both $objA and $objB refer to exactly the same instance of the object. The parser keeps a reference count to this object, in this case at line 4 it will contain a value of 2 (2 variables refering the same object). When an attempt is made to alter the contents of an object the parser checks the reference counter, if it is greater than one then it knows that it needs to create a copy. So, on line 5 the parser allocates some new memory and copies the object, $objB will then refer to this new object. Now, when a property of $objB is altered it does not affect $objA. Once the parser has created a new object for $objB it drops the reference counter for $objA to 1. This is particularly useful for when objects are passed by value to functions. Many functions do not actually change the contents of the object and just use the values inside it. Reference counting improves performance by saving resources involved in the creation of a new copy of an object. Hope this helps. Neil -Original Message- From: Luiz Fernando (Tuca) [mailto:[EMAIL PROTECTED]] Sent: 18 July 2001 08:16 To: [EMAIL PROTECTED] Subject: Re: [PHP] How is the management of memory by PHP? I would like to know like is the management, that recourses the php utlize. I am making a work to university and I need of more information. I find in www.zend.com a article about Reference Counting, but i stayed confuse, if o recourse is of PHP 4 or of ZEND Engine.. Thanks Luiz Fernando [EMAIL PROTECTED] escreveu nas notícias de mensagem:[EMAIL PROTECTED] Hi Luiz! On Tue, 17 Jul 2001, Luiz Fernando (Tuca) wrote: Somebody know how it is the management of memory by PHP? yes, it's quite well done :) what exactly are you interested in? -- teodor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Making php execute php
I would like to store a mix of php and html in a database and then return the results. I can't figure out how to do this. $abc='div class=bob?php echo $Message ; ?/div' ; ... $Message=Hello World ; ... echo eval ($abc) ; where $abc is actually retrieved from a database. Does not work, but may illustrate what I am trying to accompish. If anyone has any hints on how I can do this, I would be very grateful. Thanks, Gord. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Using Bcc and Cc in mail() on Win32 don't work!
Hi, Does anyone know if there is a Windows distribution with a sendmail.c that actually works when using Bcc and/or Cc headers? TIA! Met vriendelijke groet / With kind regards, ICL Nederland B.V. Simon de Kraa e-Applications / Logistic Systems Systems Architect Het Kwadrant 1 Tel. +31 346 598865 Postbus 4000Fax +31 346 562703 3600 KA MAARSSEN The Netherlands mailto:[EMAIL PROTECTED] --- Microsoft Windows 2000 5.00.2195 SP 2, Progress 9.1b, Roundtable 9.1c SCO UnixWare 7.1.1, Progress 9.1b -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Making php execute php
It's failing becuase $abc is not valid PHP code, but is HTML. to get eval to work correctly, only pass it valid PHP code. This will print Hello World; $abc = ' print $Message; '; $Message=Hello World ; eval ($abc) ; If you want to output HTML, enclose it within a print statement, or something similar. -Original Message- From: Gord Gray [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 10:32 AM To: [EMAIL PROTECTED] Subject: [PHP] Making php execute php I would like to store a mix of php and html in a database and then return the results. I can't figure out how to do this. $abc='div class=bob?php echo $Message ; ?/div' ; ... $Message=Hello World ; ... echo eval ($abc) ; where $abc is actually retrieved from a database. Does not work, but may illustrate what I am trying to accompish. If anyone has any hints on how I can do this, I would be very grateful. Thanks, Gord. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] set var in PHP
In html, I can do !--#set var=TITLE value=some title here-- How do I do this in PHP? Thanks, Jessica -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] set var in PHP
u $TITLE = some title here; -Original Message- From: jessica lee tishmack [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 11:28 AM To: php Subject: [PHP] set var in PHP In html, I can do !--#set var=TITLE value=some title here-- How do I do this in PHP? Thanks, Jessica -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] set var in PHP clarified
Thanks for the prompt replies...but I think I should clarify... In regular html, I would do this: !--#set var=TITLE value=some title here-- !--#include virtual=/include/header.html -- and header.html would have in it (among other things): title!--#echo var=TITLE --/title So, the title of the webpage would be some title here... How can I accomplish the same thing in PHP? Thanks, Jessica -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] set var in PHP
i was wondering this too what happen to TITLEsome title here/TITLE reminds me of MIVA script or one of the build in things maybe (gulp) a front page thing? anyways i suspect that $TITLE = some text here; is what you want - Original Message - From: Chris Boget [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 10:47 PM Subject: RE: [PHP] set var in PHP In html, I can do !--#set var=TITLE value=some title here-- I've actually never seen this in html... How do I do this in PHP? but is this what you are talking about? $TITLE = some title here; ? Or am I missing something? Or perhaps you want to keep it an html thing... echo !--#set var=\TITLE\ value=\some title here\--; ? Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] string search
http://php.net/manual/en/function.strpos.php -Original Message- From: Joseph Bannon [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 7:46 AM To: PHP (E-mail) Subject: [PHP] string search I need a search function (if statement) that performs a search on a string and if the string contains something like aol.com, performs another function. Can anyone help me? Thanks. Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] set var in PHP clarified
- Original Message - From: jessica lee tishmack [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 10:50 PM Subject: [PHP] set var in PHP clarified Thanks for the prompt replies...but I think I should clarify... In regular html, I would do this: !--#set var=TITLE value=some title here-- !--#include virtual=/include/header.html -- assign like this $TITLE = some text here; and header.html would have in it (among other things): title!--#echo var=TITLE --/title use like this echo $TITLE; or print$TITLE; if this is in html makde sure you have php tags arround it ? ? So, the title of the webpage would be some title here... How can I accomplish the same thing in PHP? Thanks, Jessica -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] please help.
hi I wanna see how long my scripts load. So, i copied this script from phpbuilder --- ?php $timeparts = explode( ,microtime()); $starttime = $timeparts[1].substr($timeparts[0],1); $timeparts = explode( ,microtime()); $endtime = $timeparts[1].substr($timeparts[0],1); echo bcsub($endtime,$starttime,6) ? -- But i am not sure where to put that part. Can i put it anywhere within my script? And bcsub() is not install on my server. What other fuctions can i use? can i just use $endtime-$starttime? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] set var in PHP clarified
You would do ? $title = some title here; ? HTML HeadTitle? echo $title; ?/Title/Head or ? $title = some title here; echo Title$title/Title; ? Hope that helps Sheridan - Original Message - From: jessica lee tishmack [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 10:50 AM Subject: [PHP] set var in PHP clarified Thanks for the prompt replies...but I think I should clarify... In regular html, I would do this: !--#set var=TITLE value=some title here-- !--#include virtual=/include/header.html -- and header.html would have in it (among other things): title!--#echo var=TITLE --/title So, the title of the webpage would be some title here... How can I accomplish the same thing in PHP? Thanks, Jessica -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] RPM Install #6 still doesn't work
Under RedHat 7.1, if you installed apache and php from the RPMs, you should not have to change anything, other than maybe telling it to serve up index.php pages. The thing about MySQL from the RPM under that distro is that the server is not started by default... if you haven't already, use 'chkconfig --list' to confirm that it is actually running (I set it to run in levels 345). Later today, if you are still having problems, we can look into it more = Ben -Original Message- From: Gaylen Fraley [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 14, 2001 3:07 PM To: [EMAIL PROTECTED] Subject: [PHP] RPM Install #6 still doesn't work Ok. I've been in this industry for 32 years. I've loved O/S2, hated windoz and been intrigued with *nix. So, I have a successful web site and server under windoz/php/mysql and I decide to venture into RedHat Linux because I have heard some great things about it. I get 7.0 and install it, virgin. Apache and PHP work, but I was never able to get MySQL working, except from a command line. So, after abut 17 hours of frustration, I get 7.1 . Apache is the only thing that works. I was able to get PHP working when I did an install from scratch (tarball). But, it seems as if the RPM should work. I still could not get MySQL working working. It consistently gives an error 2002 / socket problem. Right now I have a virgin Apache and PHP4 and MySwl install from the RPM (7.1) and php will not work. As far as I can tell, I have modified my httpd.config in all the right places. Please, could someone who has a working install from the 7.1 RPM package, please post their httpd.conf lines that pertain to getting php to work? Also, if their is a library that I need to move around, please advise that too. Thanks. The MySQL problem would be a nice caveat if someone knows how to fix that too :) Regards, -- Gaylen [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] REGEXP
Why don't you explode(;,$header); ?? Ben -Original Message- From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 14, 2001 2:54 AM To: php general list Subject: [PHP] REGEXP Hi, I am trying to capture the Header from a mail for my webmail using php and pop3. The header is something like this: Content-Type: multipart/mixed; boundary=B42DA66C4EC07C9B572A58FC When I use preg_split(/[\d;]*/, $buffer), I get Content-Type: multipart/mixed; What I want is to return the whole line split by the ;. I usually try to avoid regexp (too lazy) but now I want to use it. The final result I would need is: B42DA66C4EC07C9B572A58FC so that I can search in the body of the message for the rest of the parts. Any pointers would be helpful. Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP and XHTML
echo ''.?xml version=\1.0\ encoding=\UTF-8\?.''; Also, you may set short open tags off so php is only activated between ?php and ?. -- Julio Nobrega. Because happiness is a warm gun Bang-bang shoot-shoot Daniel Rose [EMAIL PROTECTED] wrote in message 004301c10f49$a9b18fe0$0a01a8c0@w98">news:004301c10f49$a9b18fe0$0a01a8c0@w98... Hi, I have looked through the history of the list, and I see that several people have said that PHP fully supports XHTML. I have some problems using XHTML with PHP, namely parse errors, such as a parse error on the first line of every XHTML doc. ?xml version=1.0 encoding=UTF-8? Version of PHP is 4.0.6, and it was compiled like so: './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--with-gd=/usr' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-zlib' '--with-mysql' '--enable-track-vars' '--with-mcrypt' (all from phpinfo()) Does anyone have any ideas? Please CC replies as I am not subscribed to the list Sincerely, Daniel Rose -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Simple validation problem
Hello, I am trying to make shure the amount is positive and is a float. (format: $$$.$$) if( $amount == !is_float( $amount ) !eregi( ^[_a-z], $amount ) ){ print Error; } this code does not work when I the input is -25.00 What could be wrong? py p.s. I read what I could on regular expression, but obviously still learning...
[PHP] Re: please help.
Look at a folder named 'Benchmark' that comes with php's PEAR. It has a file named Time.php, and it has nice instructions about how to use it. -- Julio Nobrega. Because happiness is a warm gun Bang-bang shoot-shoot McShen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi I wanna see how long my scripts load. So, i copied this script from phpbuilder --- ?php $timeparts = explode( ,microtime()); $starttime = $timeparts[1].substr($timeparts[0],1); $timeparts = explode( ,microtime()); $endtime = $timeparts[1].substr($timeparts[0],1); echo bcsub($endtime,$starttime,6) ? -- But i am not sure where to put that part. Can i put it anywhere within my script? And bcsub() is not install on my server. What other fuctions can i use? can i just use $endtime-$starttime? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] md5 crypt question
This is all better now. I compiled with libmcrypt and php-4.0.6 at the same time, so I'm not sure exactly which caused the fix, but it works now. Also, the perl module I was using seemed to generate apache stype md5 hash, which is another reason why authenticating with postgres and md5 hashes wasn't working when just inserting hashes generated with Crypt::PasswdMD5. Php and openssl passwd -1 generate the correct system hashes. Everything is good. -jeremy On Tue, 17 Jul 2001, tc lewis wrote: On Tue, 17 Jul 2001, Jeremy Hansen wrote: On Tue, 17 Jul 2001, tc lewis wrote: try: php echo(CRYPT_SALT_LENGTH); ? php echo(CRYPT_MD5); ? or: php echo constant(CRYPT_SALT_LENGTH); ? php echo constant(CRYPT_MD5); ? you should get output of 12 and 1 (not 2 and 0) if md5 is supported in crypt(), i think. Yeah, I'm getting 2 and 0. Lame. What's the answer to this. i'm not sure. i don't see any related configure flags or php.ini settings. it seems to work with standard redhat 7.1 linux (i'm assuming you're using some redhat-ish system, as i know you): [tcl@jobo tcl]$ cat nog.php #!/usr/bin/php ?php echo(constant('CRYPT_SALT_LENGTH')); ? ?php echo(\n); ? ?php echo(constant('CRYPT_MD5')); ? ?php echo(\n); ? ?php echo(crypt('teststr', 'testsalt')); ? ?php echo(\n); ? ?php echo(crypt('teststr', '$1$testsalt$')); ? ?php echo(\n); ? [tcl@jobo tcl]$ ./nog.php X-Powered-By: PHP/4.0.4pl1 Content-type: text/html 2 1 te4c1aD5wKOnM $1$testsalt$W00xFyq3oO6fDqto9qMY00 [tcl@jobo tcl]$ any suggestions from the rest of the list? you could try using the mhash library stuff instead. blah. -tcl. -- salad. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] set var in PHP
Hello, it isn't regular html, it is only server-parsed stuff .. Server Side Includes. You won't need that in PHP, just do: ? $TITLE=This is my title.; ? htmlhead title?=$TITLE?/title blah blah blah .. SSL On Wed, 18 Jul 2001, jessica lee tishmack wrote: In html, I can do !--#set var=TITLE value=some title here-- How do I do this in PHP? Thanks, Jessica -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] please help.
try using the attached class. ? $time = new timer; $time-start(); // some code $time-stop(); $total = $time-gettime(); echo $total; ? -Original Message- From: McShen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 11:08 AM To: [EMAIL PROTECTED] Subject: [PHP] please help. hi I wanna see how long my scripts load. So, i copied this script from phpbuilder --- ?php $timeparts = explode( ,microtime()); $starttime = $timeparts[1].substr($timeparts[0],1); $timeparts = explode( ,microtime()); $endtime = $timeparts[1].substr($timeparts[0],1); echo bcsub($endtime,$starttime,6) ? -- But i am not sure where to put that part. Can i put it anywhere within my script? And bcsub() is not install on my server. What other fuctions can i use? can i just use $endtime-$starttime? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] please help.
ok thx Michael Geier [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... try using the attached class. ? $time = new timer; $time-start(); // some code $time-stop(); $total = $time-gettime(); echo $total; ? -Original Message- From: McShen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 11:08 AM To: [EMAIL PROTECTED] Subject: [PHP] please help. hi I wanna see how long my scripts load. So, i copied this script from phpbuilder --- ?php $timeparts = explode( ,microtime()); $starttime = $timeparts[1].substr($timeparts[0],1); $timeparts = explode( ,microtime()); $endtime = $timeparts[1].substr($timeparts[0],1); echo bcsub($endtime,$starttime,6) ? -- But i am not sure where to put that part. Can i put it anywhere within my script? And bcsub() is not install on my server. What other fuctions can i use? can i just use $endtime-$starttime? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Fw: Data from SQL to a string in a useable format
Ok, never got a reply yesterday, so I figured I'd resend this. can this even be done? __ How can I pull my data from my SQL db, and store it as a string so that it can be used? Specificly, I'm working with images. When the images are stored in the database, the only pre-processing that is done is: $img = addslashes(fread(fopen($userfile, r), filesize($userfile))); (* note: $userfile is the file identifier from my upload form.) I want to pull the data out of the database and store it in a string, so that I can use imagecopyresampled to create a thumbnail, but I just can't seem to get it to work please help!! Thanks, Jason
[PHP] RE: bill
Mr. Tejano: Aetna/Box 60578/LA, CA 90060-00578 457-74-9048/02 Warren Vail Group 8--40-010-2 Thank you for clearing this up. -Original Message- From: Jonathan Tejano [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 17, 2001 7:02 AM To: 'Warren Vail' Subject: RE: bill Thank you for your email. We indeed need your insurance information for billing. Alta Bates medical Center failed to forward information to us. Please provide us with your insurance carrier, their claims/billing address if under a PPO plan, your member/subscriber number, and group number (if listed in your insurance card). If you're under a HMO plan, I would need the name of the medical group. Should you be confused or have questions regarding whats noted above, please call the customer service number listed on your insurance card or email back. Thanks again. Jon Tejano Follow-up Department Bay Imaging Consultants Medical Group (925)296-7156 Email: [EMAIL PROTECTED] -Original Message- From: Warren Vail [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 9:52 AM To: [EMAIL PROTECTED] Subject: bill Don't understand why the ins. isn't covering this. Please clarify. 00109-727779, 7/11/01, listed as self-pay???Do you need more ins. info? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP based statistics/Graphs
There's also http://www.aditus.nu/jpgraph/ (never used it) On Tue, 17 Jul 2001, Rasmus Lerdorf wrote: I like Vagrant. See http://vagrant.sourceforge.net -Rasmus On Wed, 18 Jul 2001, Chris Aitken wrote: Hi everyone.. Just wondering if anyone can suggest any methods, or even pre-made packages which can be manipulated to show various statistics, charts, graphs etc on a whole range of things. What im looking to do is run a whole bunch of statistics pages for where I work. Client stats, plan popularity, monthly income etc etc. Just doing some research and figured you guys are the best place to get some info. Cheers Chris -- Chris Aitken - Administration/Database Designer - IDEAL Internet email: [EMAIL PROTECTED] phone: +61 2 4628 fax: +61 2 4628 8890 __-__ *** Big Brother *** It just shows that the dull will rule the world. And we will be watching it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] RE: bill
oopsie. - Original Message - From: Danielle Forestier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 10:02 AM Subject: [PHP] RE: bill Mr. Tejano: Aetna/Box 60578/LA, CA 90060-00578 457-74-9048/02 Warren Vail Group 8--40-010-2 Thank you for clearing this up. -Original Message- From: Jonathan Tejano [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 17, 2001 7:02 AM To: 'Warren Vail' Subject: RE: bill Thank you for your email. We indeed need your insurance information for billing. Alta Bates medical Center failed to forward information to us. Please provide us with your insurance carrier, their claims/billing address if under a PPO plan, your member/subscriber number, and group number (if listed in your insurance card). If you're under a HMO plan, I would need the name of the medical group. Should you be confused or have questions regarding whats noted above, please call the customer service number listed on your insurance card or email back. Thanks again. Jon Tejano Follow-up Department Bay Imaging Consultants Medical Group (925)296-7156 Email: [EMAIL PROTECTED] -Original Message- From: Warren Vail [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 9:52 AM To: [EMAIL PROTECTED] Subject: bill Don't understand why the ins. isn't covering this. Please clarify. 00109-727779, 7/11/01, listed as self-pay???Do you need more ins. info? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Loading values from a select tag
Hi all, I want to print all the text stored in a select tag. For example: select name=my_select option value=1Hello option value=2World option value=3Again!!! /select This is the final select, but is created dinamically with javascript. So when the sumbit button is pressed, I want that my php script output the folowing: The number of options is: X(3 in that example) The options was: value=1, text=Hello value=2, text=World value=3, text=Again!!! and so on. Thanks for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Code works in reverse order...
Hello everybody The below code is going crazy..and doing the reverse thing... when the value of $check!= for example still it shows thankyou.html page. But if I reverse the code meaning if($check!=) then insert into database..it doesn't do that it does the reverse thing. Is something wrong with the code? Thank You Dhaval Desai ?php $connect = mysql_connect(); $query = select email from newsletter where email='$email'; $execute = mysql_db_query(database, $query); $check = mysql_num_rows($execute); if($check!=) { $insert = insert into newsletter (name,email,country) VALUES ('$name','$email','$country'); $putin = mysql_db_query(database, $insert); if($putin) { header (Location: ./thankyou.html); } } else { header (Location: ./sorry.html); } ? __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Editing Files Using POST Forms
I have created a php page that accepts a variable called $file using GET. It then displays this in a textarea box. You can then edit the file and click a button to save it and it POSTS it to the same page (edit.php) on the server. This works but it adds slashes before any speech marks (). Can somebody help me with this. Below is an example of how it changes the code and the code for the page edit.php Regards, Corin Rathbone www.corin.org.uk - A page before editing: html head title/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 meta name=author content=Corin Rathbone 2001 /head body div class=headingDelete A File/div /body /html - The same page after editing: !DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01 Transitional//EN\ html head title/title meta http-equiv=\Content-Type\ content=\text/html; charset=iso-8859-1\ meta name=\author\ content=\Corin Rathbone 2001\ /head body div class=\heading\Delete A File/div /body /html - The edit.php page source: ?php include config.php; //Start Pages PHP here if(isset($save)){ $fp = fopen($file, wb) or die(Could not open file!); $worked = fwrite($fp, $contents) or die(Could not write file!); fclose($fp) or die(Could not close file!); $edit=false; $save=true; } elseif(isset($file)){ $fp = fopen($file, rb) or die(Could not open file!); $contents = fread($fp, filesize($file)) or die(Could not read file!); fclose($fp) or die(Could not close file!); $edit=true; $save=false; } else{ $edit=false; $save=false; } //End Pages PHP Here ? !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head titleEdit A File - File Explorer For ?php print($root_url);?/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 meta name=author content=Corin Rathbone [EMAIL PROTECTED] meta name=copyright content=Corin Rathbone 2001 link rel=stylesheet type=text/css href=main.css /head body !-- Start Of Page Content -- div class=headingEdit A File/div ?php if($edit){ print( Contents Of file: b ); print( $file ); print( /b\n ); print( p align=\center\\n ); print( form action=\edit.php\ method=\post\ \n ); print( input type=\hidden\ name=\file\ value=\ ); print( $file ); print( \\n ); print( input type=\hidden\ name=\save\ value=\1\ ); print( textarea name=\contents\ rows=\25\ cols=\90\\n ); print( $contents ); print( /textareabr\n ); print( input type=\submit\ value=\Save\\n ); print( /form\n ); print( /p ); } elseif($save){ print( p align=\center\\n ); print( File: b ); print( $file ); if($worked){print( /b has been saved! );} else {print( /b has bnot/b been saved! );} print( /p ); } else { print( p align=\center\bPlease Select A File To Be Save!/b/p ); } ? !-- End Of Page Content -- BRBRBR div class=copyrightcopy;a href=mailto:[EMAIL PROTECTED];Corin Rathbone/a 2001/div /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] OT Math Question
if i have four drop down menus with five values in each, and the values are the same for each of the four drop down menus, how many variations are there without duplicates, any dups, I though the formula was 5 to the 4th power minus 5, this can't possibly be right. math impaired and trying to fake it rm __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Secure Access to Remote MySQL DB
Greetings, I am developing an application that will access a MySQL database remotely from another server. I would like to be able to use a standard database connection using the 3306 port if possible for ease of development, but I certainly do not want to be sending unencrypted data between my application and the database. Is there a way to encrypt the database transactions between PHP and a remote MySQL database? Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Code works in reverse order...
Dhaval, Without looking into this further, the one thing that stands out to me (I am pretty sure) is the fact that mysql_num_rows() returns an int. So testing for (empty string) is not going to work. Try instead: ... if ($check != 0) ... -Jeremy Maziarz Email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] limiting text output
Hey all, was curious if anyone has had experience with limiting the amount of text pulled from a database and placing a link and the end of the excessive text line. ie. the description of a product could be 800 characters long, how can it be shortened to 50 -100 characters with a link to read more at the end. I was fiddling with strlength and an if else statement, but i cant really get things happenin. Any and all help would greatly be appreciated. Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] whatever.php
HI I'm using require(whatever.php)to access my variables...it works. The problem is my whatever.php page shows up on top of my current page. Is there a simple clear screen I can use??? I tried include and the same thing happens. What do I do? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] OT Math Question
Do you mean if the user selects a single value from each of the four dropdowns, but never chooses a value that has already been selected in a previous dropdown? If so, then there are 5 possible choices from the first list, 4 from the second, etc. So, 5*4*3*2 = 120. Kirk -Original Message- From: rm [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 11:21 AM To: List PHP Subject: [PHP] OT Math Question if i have four drop down menus with five values in each, and the values are the same for each of the four drop down menus, how many variations are there without duplicates, any dups, I though the formula was 5 to the 4th power minus 5, this can't possibly be right. math impaired and trying to fake it rm __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] whatever.php
is whatever.php file encloded in php tags? sounds like it is interupting it as texted. i didnt test this theory so dont kill me if i am wrong. but it is a guess - Original Message - From: Jeremy Morano [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 19, 2001 12:53 AM Subject: [PHP] whatever.php HI I'm using require(whatever.php)to access my variables...it works. The problem is my whatever.php page shows up on top of my current page. Is there a simple clear screen I can use??? I tried include and the same thing happens. What do I do? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Secure Access to Remote MySQL DB
I think that SSL is the more transparent choice. Cheers. On Wed, Jul 18, 2001 at 11:38:19AM -0600, Matthew Aznoe wrote: Greetings, I am developing an application that will access a MySQL database remotely from another server. I would like to be able to use a standard database connection using the 3306 port if possible for ease of development, but I certainly do not want to be sending unencrypted data between my application and the database. Is there a way to encrypt the database transactions between PHP and a remote MySQL database? Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] whatever.php
Did you make sure you had the ?? tags in the whatever.php enclosing the content? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] a good PHP editor
Hiya everybody, I'm relatively new to PHP and I'm looking for a good text editor on win2k for creating/manipulating php pages. Notepad is great if your in a bind, and I've tried phpedit and activestate's Komodo and both seem to have problems (crashing etc...). Anybody got any suggestions? Free/small fee programs doesn't matter Thanks Doug Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Secure Access to Remote MySQL DB
Greetings, I have seen hints at the SSL functionality in MySQL, but I have not been able to find any documentation on how exactly I am supposed to use it. Does this require special processing on the PHP end of things to activate an SSL connection to the database? Matt -Original Message- From: Mauricio T?llez Jim?nez [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 12:03 PM To: Matthew Aznoe Cc: Php-General-Digest Subject: Re: [PHP] Secure Access to Remote MySQL DB CONTENT-DISPOSITION: INLINE I think that SSL is the more transparent choice. Cheers. On Wed, Jul 18, 2001 at 11:38:19AM -0600, Matthew Aznoe wrote: Greetings, I am developing an application that will access a MySQL database remotely from another server. I would like to be able to use a standard database connection using the 3306 port if possible for ease of development, but I certainly do not want to be sending unencrypted data between my application and the database. Is there a way to encrypt the database transactions between PHP and a remote MySQL database? Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] whatever.php
yea, make your whatever.php as a php file. that happened to me before. :) Chris Schneck [EMAIL PROTECTED] wrote in message 002101c10fb4$252cafa0$[EMAIL PROTECTED]">news:002101c10fb4$252cafa0$[EMAIL PROTECTED]... Did you make sure you had the ?? tags in the whatever.php enclosing the content? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] a good PHP editor
ConTEXT...free, simple, can load HUGE files. http://www.fixedsys.com/context/ Tyler - Original Message - From: doug [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 1:16 PM Subject: [PHP] a good PHP editor Hiya everybody, I'm relatively new to PHP and I'm looking for a good text editor on win2k for creating/manipulating php pages. Notepad is great if your in a bind, and I've tried phpedit and activestate's Komodo and both seem to have problems (crashing etc...). Anybody got any suggestions? Free/small fee programs doesn't matter Thanks Doug Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] sql query successful
Hello everyone, I've been writing database enabled site for quite a while now. One thing I have never figured out it how to determine if a sql query is successful. This works: if ($connection = mysql_connect(host,username,password)) { print Successful connection: } else { print No connection; } But this won't work: if ($sql = mysql_query(SELECT * FROM table ORDER BY rand())) { print SQL executed successfully.; } else { print SQL not executed successfully.; } Can anyone tell me how I can tell if the SQL executed successfully? Is there any method besides OR DIE? Thanks, Tyler -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] a good PHP editor
I like ultraedit32 http://www.ultraedit.com Although it isn't free, the price is reasonable. - Phil Spitler [Vice President] Web Hut Design, Inc. c 704-451-1324 mailto:[EMAIL PROTECTED] -Original Message- From: doug [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 2:16 PM To: [EMAIL PROTECTED] Subject: [PHP] a good PHP editor Hiya everybody, I'm relatively new to PHP and I'm looking for a good text editor on win2k for creating/manipulating php pages. Notepad is great if your in a bind, and I've tried phpedit and activestate's Komodo and both seem to have problems (crashing etc...). Anybody got any suggestions? Free/small fee programs doesn't matter Thanks Doug Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] whatever.php
did you missplace an echo or printf somewhere? - Original Message - From: Jeremy Morano [EMAIL PROTECTED] To: chris schneck [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 11:23 AM Subject: RE: [PHP] whatever.php I checked and double checked... its in the tags -Original Message- From: chris schneck [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 2:05 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] whatever.php Did you make sure you had the ?? tags in the whatever.php enclosing the content? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] sql query successful
-Original Message- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 1:25 PM To: php-general Subject: [PHP] sql query successful I've been writing database enabled site for quite a while now. One thing I have never figured out it how to determine if a sql query is successful. This works: if ($connection = mysql_connect(host,username,password)) { print Successful connection: } else { print No connection; } But this won't work: if ($sql = mysql_query(SELECT * FROM table ORDER BY rand())) { print SQL executed successfully.; } else { print SQL not executed successfully.; } In what way doesn't this work? The above code should tell you that the query was properly formed and error-free, and was cheerfully accepted and processed by the database server. (You don't get much more successful than that...) If what you're really looking for is whether there were any rows returned by the query, then you'll want to look into the mysql_num_rows() function. --- Mark Roedel ([EMAIL PROTECTED]) || There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full. LeTourneau University ||-- Henry Kissinger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] sql query successful
I believe you should use the error function for the database you're using to check for failed queries. If you're using MySQL (which it appears that you are), you would do something like this: $sql = mysql_query(SELECT * FROM table ORDER BY rand()); if(mysql_error()) echo SQL not executed successfully.; else print SQL executed successfully.; Josh Hoover KnowledgeStorm, Inc. [EMAIL PROTECTED] Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here This works: if ($connection = mysql_connect(host,username,password)) { print Successful connection: } else { print No connection; } But this won't work: if ($sql = mysql_query(SELECT * FROM table ORDER BY rand())) { print SQL executed successfully.; } else { print SQL not executed successfully.; } Can anyone tell me how I can tell if the SQL executed successfully? Is there any method besides OR DIE?
Re: [PHP] sql query successful
What about when DELETING from a table??? It always returns true. Example...the highest ID in this table is 10: ? if ($connection = mysql_connect(localhost,mysql,mysql)) { print Connection established; $db = mysql_select_db(aanr, $connection); if ($sql = mysql_query(DELETE FROM bullitens WHERE id='1212')) { print Successful; } else { print Not successful.; } } else { print Connection NOT established.; } ? We try to delete the bulliten with id of 1212, but there is not bulliten with that ID, and it says Successful. I know I could use mysql_affected_rows(), but why doesn't this work??? Tyler - Original Message - From: Mark Roedel [EMAIL PROTECTED] To: Tyler Longren [EMAIL PROTECTED]; php-general [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 1:30 PM Subject: RE: [PHP] sql query successful -Original Message- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 1:25 PM To: php-general Subject: [PHP] sql query successful I've been writing database enabled site for quite a while now. One thing I have never figured out it how to determine if a sql query is successful. This works: if ($connection = mysql_connect(host,username,password)) { print Successful connection: } else { print No connection; } But this won't work: if ($sql = mysql_query(SELECT * FROM table ORDER BY rand())) { print SQL executed successfully.; } else { print SQL not executed successfully.; } In what way doesn't this work? The above code should tell you that the query was properly formed and error-free, and was cheerfully accepted and processed by the database server. (You don't get much more successful than that...) If what you're really looking for is whether there were any rows returned by the query, then you'll want to look into the mysql_num_rows() function. --- Mark Roedel ([EMAIL PROTECTED]) || There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full. LeTourneau University ||-- Henry Kissinger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] You (ADV)
Dear [EMAIL PROTECTED], Only reading through this will allow you to decide for yourself if you've found something worthwhile. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Dear Friend Future Millionaire: AS SEEN ON NATIONAL TV: Making over half million dollars every 4 to 5 months from your home for an investment of only $25 U.S. Dollars expense one time THANK'S TO THE COMPUTER AGE AND THE INTERNET ! == BE A MILLIONAIRE LIKE OTHERS WITHIN A YEAR!!! Before you say Bull, please read the following. This is the letter you have been hearing about on the news lately. Due to the popularity of this letter on the Internet, a national weekly news program recently devoted an entire show to the investigation of this program described below, to see if it really can make people money. The show also investigated whether or not the program was legal. Their findings proved once and for all that there are ''absolutely NO Laws prohibiting the participation in the program and if people can -follow the simple instructions, they are bound to make some mega bucks with only $25 out of pocket cost''. DUE TO THE RECENT INCREASE OF POPULARITY RESPECT THIS PROGRAM HAS ATTAINED, IT IS CURRENTLY WORKING BETTER THAN EVER. This is what one had to say: ''Thanks to this profitable opportunity. I was approached many times before but each time I passed on it. I am so glad I finally joined just to see what one could expect in return for the minimal effort and money required. To my astonishment, I received total $610,470.00 in 21 weeks, with money still coming in. Pam Hedland, Fort Lee, New Jersey. === Here is another testimonial: This program has been around for a long time but I never believed in it. But one day when I received this again in the mail I decided to gamble my $25 on it. I followed the simple instructions and walaa . 3 weeks later the money started to come in. First month I only made $240.00 but the next 2 months after that I made a total of $290,000.00. So far, in the past 8 months by re-entering the program, I have made over $710,000.00 and I am playing it again. The key to success in this program is to follow the simple steps and NOT change anything.'' More testimonials later but first, = PRINT THIS NOW FOR YOUR FUTUREREFERENCE == $ If you would like to make at least $500,000 every 4 to 5 months easily and comfortably, please read the following...THEN READ IT AGAIN and AGAIN!!! $ FOLLOW THE SIMPLE INSTRUCTION BELOW AND YOUR FINANCIAL DREAMS WILL COME TRUE, GUARANTEED! INSTRUCTIONS: =Order all 5 reports shown on the list below = For each report, send $5 CASH, THE NAME NUMBER OF THE REPORT YOU ARE ORDERING and YOUR E-MAIL ADDRESS to the person whose name appears ON THAT LIST next to the report. MAKE SURE YOUR RETURN ADDRESS IS ON YOUR ENVELOPE TOP LEFT CORNER in case of any mail problems. === When you place your order, make sure you order each of the 5 reports. You will need all 5 reports so that you can save them on your computer and resell them. YOUR TOTAL COST $5 X 5=$25.00. Within a few days you will receive, vie e-mail, each of the 5 reports from these 5 different individuals. Save them on your computer so they will be accessible for you to send to the 1,000's of people who will order them from you. Also make a floppy of these reports and keep it on your desk in case something happens to your computer. IMPORTANT - DO NOT alter the names of the people who are listed next to each report, or their sequence on the list, in any way other than what is instructed below in step '' 1 through 6 '' or you will loose out on majority of your profits. Once you understand the way this works, you will also see how it does not work if you change it. Remember, this method has been tested, and if you alter, it will NOT work!!! People have tried to put their friends/relatives names on all five thinking they could get all the money. But it does not work this way. Believe us, we all have tried to be greedy and then nothing happened. So Do Not try to change anything other than what is instructed. Because if you do, it will not work for you. Remember, honesty reaps the reward!!! 1 After you have ordered all 5 reports, take this advertisement and REMOVE the name address of the person in REPORT # 5. This person has made it through the cycle and is no doubt counting their fortune. 2 Move the name address in REPORT # 4 down TO REPORT # 5. 3 Move the name address in REPORT # 3 down TO REPORT # 4. 4 Move the name address in REPORT # 2 down TO REPORT # 3. 5 Move the name address in REPORT # 1 down TO REPORT # 2 6 Insert YOUR name address in the REPORT # 1 Position. PLEASE MAKE SURE you copy every name address ACCURATELY!
Re: [PHP] sql query successful
Tyler Longren pressed the little lettered thingies in this order... Hello everyone, I've been writing database enabled site for quite a while now. One thing I have never figured out it how to determine if a sql query is successful. This works: if ($connection = mysql_connect(host,username,password)) { print Successful connection: } else { print No connection; } But this won't work: if ($sql = mysql_query(SELECT * FROM table ORDER BY rand())) { print SQL executed successfully.; } else { print SQL not executed successfully.; } Can anyone tell me how I can tell if the SQL executed successfully? Is there any method besides OR DIE? What's wrong with or die(... ? If you get no error, the query was successful. If you take your $sql = out it *should* work. mysql_query returns TRUE or FALSE depending on whether or not the query succeeded. This isn't tested, but it should work: if (mysql_query(SELECT * FROM table ORDER BY rand())) { echo Success!; } else { echo Failure!; } Your statement above is checking to see if the fact that $sql is equal to mysql_query(SELECT * FROM table ORDER BY rand()) is TRUE, but you're using an assignment operator (=) and not a comparison operator (==), so it should always return FALSE. (Can you use an assignment operator in an if() statement?) Christopher Ostmo a.k.a. [EMAIL PROTECTED] AppIdeas.com Innovative Application Ideas Meeting cutting edge dynamic web site needs since the dawn of Internet time (1995) Business Applications: http://www.AppIdeas.com/ Open Source Applications: http://open.AppIdeas.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] a good PHP editor
Would you give the same advice if it were Zend Cache? Show some respect, please. /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Maxim Maletsky [EMAIL PROTECTED] To: 'doug' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 2:41 PM Subject: RE: [PHP] a good PHP editor | EditPlus (editplus.com - not free but easily crackable through a simple | search on astalavista.box.sk) | A great editor - believe me. | | -maxim | | | -Original Message- | From: doug [mailto:[EMAIL PROTECTED]] | Sent: Thursday, July 19, 2001 3:16 AM | To: [EMAIL PROTECTED] | Subject: [PHP] a good PHP editor | | | Hiya everybody, | I'm relatively new to PHP and I'm looking for a good text editor on | win2k for creating/manipulating php pages. Notepad is great if your in a | bind, and I've tried phpedit and activestate's Komodo and both seem to have | problems (crashing etc...). Anybody got any suggestions? Free/small fee | programs doesn't matter Thanks | | Doug Henry | | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | To contact the list administrators, e-mail: [EMAIL PROTECTED] | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | To contact the list administrators, e-mail: [EMAIL PROTECTED] | | | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] a good PHP editor
Ok I downloaded and looked at a few and the winner seems to be edit+.Thanks everybody! Doug Henry - Original Message - From: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 1:42 PM Subject: Re: [PHP] a good PHP editor Would you give the same advice if it were Zend Cache? Show some respect, please. /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Maxim Maletsky [EMAIL PROTECTED] To: 'doug' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 2:41 PM Subject: RE: [PHP] a good PHP editor | EditPlus (editplus.com - not free but easily crackable through a simple | search on astalavista.box.sk) | A great editor - believe me. | | -maxim | | | -Original Message- | From: doug [mailto:[EMAIL PROTECTED]] | Sent: Thursday, July 19, 2001 3:16 AM | To: [EMAIL PROTECTED] | Subject: [PHP] a good PHP editor | | | Hiya everybody, | I'm relatively new to PHP and I'm looking for a good text editor on | win2k for creating/manipulating php pages. Notepad is great if your in a | bind, and I've tried phpedit and activestate's Komodo and both seem to have | problems (crashing etc...). Anybody got any suggestions? Free/small fee | programs doesn't matter Thanks | | Doug Henry | | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | To contact the list administrators, e-mail: [EMAIL PROTECTED] | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | To contact the list administrators, e-mail: [EMAIL PROTECTED] | | | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] sql query successful
-Original Message- From: Christopher Ostmo [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 2:43 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] sql query successful Your statement above is checking to see if the fact that $sql is equal to mysql_query(SELECT * FROM table ORDER BY rand()) is TRUE, but you're using an assignment operator (=) and not a comparison operator (==), so it should always return FALSE. (Can you use an assignment operator in an if() statement?) Actually, you can. (See http://www.php.net/manual/en/language.operators.assignment.php) An assignment operation will return the value that was assigned. Thus, if we have if ($sql = mysql_query($query_string)) and the mysql_query call returns a non-false value, the entire expression will evaluate to true. --- Mark Roedel | The most overlooked advantage to owning a Systems Programmer| computer is that if they foul up there's no LeTourneau University | law against whacking them around a little. Longview, Texas, USA | -- Owen Porterfield -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sql query successful
Tyler Longren pressed the little lettered thingies in this order... What about when DELETING from a table??? It always returns true. Example...the highest ID in this table is 10: ? if ($connection = mysql_connect(localhost,mysql,mysql)) { print Connection established; $db = mysql_select_db(aanr, $connection); if ($sql = mysql_query(DELETE FROM bullitens WHERE id='1212')) { print Successful; } else { print Not successful.; } } else { print Connection NOT established.; } ? We try to delete the bulliten with id of 1212, but there is not bulliten with that ID, and it says Successful. I know I could use mysql_affected_rows(), but why doesn't this work??? mysql_query() is not intended to be used as a means by which you can check the number of rows that are affected. If it returned FALSE severy time your query was empty, you would have to rewrite all of your of code to eliminate errors. It only checks for the validity of your query. To ask why this doesn't work would be the same thing as asking why you can type this query from the command-line mysql client and the query succeeds without an error. It succeeds and says 0 rows. It's a valid query with zero results. A FALSE return from a programming function indicates an error condition, not the lack of results. Christopher Ostmo a.k.a. [EMAIL PROTECTED] AppIdeas.com Innovative Application Ideas Meeting cutting edge dynamic web site needs since the dawn of Internet time (1995) For a good time, http://www.AppIdeas.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]