RE: [PHP] Variable Result is not displayed
Could you include some of your code? -Original Message- When I try to run my scripts they works fine exept for the variables results that are not displayed. This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Dreamweaver MX?
Thanks everyone. I'll check it out. much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Variable Result is not displayed
make sure global variables are enabled in your php.ini -Original Message- From: J0s [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 11:52 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Variable Result is not displayed Here is an example of the test script. sample.php ? $result=$who. works as a .$what. in .$where.. He/She can be contacted at: .$web..; print result=.$result; print loading=NO; ? Nota : The variable are passed throught a Flash form. In this case, if the script is uploaded on my web site the result is : Name Test works as a Web developper in Montreal. He/She can be contacted at : My Web Site. But on my own machine the result is : works as a Web in. He/She can be contacted at :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Installation Win98/Apache error....
You missed a step in copying DLLs. I don't remember which one, but it's the dll files found in c:\php -Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 2:01 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP Installation Win98/Apache error So I'm trying to install PHP on win98 with Apache2. I got these nice instructions from... http://www.webmasterbase.com/article.php?pid=30aid=525 After I make the following addition to my httpd.conf file, I get an error when I try to start Apache again... ADDITION TO HTTPD.CONF: LoadModule php4_module c:/php/sapi/php4apache.dll ERROR WHEN STARTING APACHE: Cannot load c:/php/sapi/php4apache.dll into server: One of the library ilfes needed to run this application cannot be found. ...I checked in the sapi directory and php4apache.dll is indeed in there. One other thing - One part of the instructions said to do this... Find the file called php4ts.dll in the PHP folder and copy it to the System32 subfolder of your Windows folder (e.g. C:\Windows\System32). Well, there is no php4ts.dll file anywhere on my PC. There is however a php4ts.lib file. Maybe this has something to do with it? Thanks for your help!!! This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ucwords() usage QUICKIE
Looks like it, but you're missing the semi-colon at the end of the line. -Original Message- From: Daniel Negron/KBE [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 2:06 PM To: [EMAIL PROTECTED] Subject: [PHP] ucwords() usage QUICKIE Hi All, I am trying to figure out how to use ucwords here : if (submit) $db = mysql_connect($dbhost,$dbuname,$dbpass); mysql_select_db($dbname,$db); ucwords($sql)Is this correct ? $sql = INSERT INTO $prefix; $sql .= (first, last, email, company, address, city, state, zip, phone, fax, mobile, comments); $sql .= VALUES; $sql .= ('$first', '$last', '$email', '$company', '$address', '$city', '$state', '$zip', '$phone', '$fax', '$mobile', '$comments'); also can you do this @ field level ? Danny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] search parse?
Does anyone have a good function for parsing a search string into SQL? I know it will depend on the name of the field and table I'm searching through. Anything close will be helpful. An example search string would be: beer AND pizza NOT anchovies and the resulting search string would be select ID, Title from Products where Title like '%beer%' AND Title like '%pizza%' AND Title NOT LIKE '%anchovies%'; Another example search string would be: beer OR pizza AND movies Thanks! =) -Ed This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] integer to string
Try: $n = $soils[$i]; $soils[$i] = sprintf(%d, $n); and if that doesn't work, print out $soils[$i] to see what it is. -Original Message- $soils[$i] = sprintf(%d, $soils[$i]); But doesn't seem to work, my program returned an error. P.S. : I'm using 4.0.6 otherwise wouldn't have this problem. -Pushkar S. Pradhan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: php server on Windows
Do you have any benchmarks? -Original Message- fans). Put your site on a *nix box with apache its a heck of a lot faster This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] confused newbie on PHP and Javascript.
Hi Steve, What you're asking isn't possible. Javascript runs client-side. PHP runs server-side. You can't directly mix the two. For example, you can use Javascript to respond when people choose menu options, but you can't have Javascript communicate with PHP and pull additional information from the database for your form. You need to use a round-about approach. Have Javascript reload the page based on user input. When the page is reloaded from the server, PHP can process it (server-side). PHP can add Javascript code / data to the page arriving at the viewer's browser. The Javascript runs and operates based on this code / data. Javascript passes information to PHP by posting forms or including parameters in the url. Here's another example... You load a page for the first time... PHP processes it... if ($Name == ) $Name = Brian; echo script language='Javascript'; echo \$Name = $Name;; echo /script; The page displays on the viewers browser and Javascript responds to user form input. Based on some action, Javascript reloads the page with the following URL: mytest.php?Name=John Now PHP is receiving the variable Name and prints out different JavaScript Does this make any sense? I'm probably not sounding very clear... someone help describe this, please =) -Ed -Original Message- From: Steve Bradwell [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 11:35 AM To: 1LT John W. Holmes; Steve Bradwell; [EMAIL PROTECTED] Subject: RE: [PHP] confused newbie on PHP and Javascript. Hi thanks for the reply, I do believe I understand what client side and server side really mean although I have much to learn, but is there a way to accomplish what I'm trying to do? Maybe some kind of work around a person has found when doing this kind of thing? Thanks again, Steve -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 2:26 PM To: Steve Bradwell; [EMAIL PROTECTED] Subject: Re: [PHP] confused newbie on PHP and Javascript. I am having a problem, mostly concept wise of how, or if I can use client side Javascript in a server side php statement. Do you know what client side and server side really mean?? For the function below... function Modify_Item_Details(){ var test = document.forms[0].item.options[document.forms[0].item.selected Index].text; ? $sql = Select i.QTY_ON_HAND, u.UNIT from items i INNER JOIN; $sql.= units u ON i.Unit_Index = u.Unit_Index; $sql.= where i.Item_Index = '.echo test\n.'; $result = mysql_query($sql); while ($vars = mysql_fetch_array($result)){ echo document.forms[0].available.text='.$vars[0].';; echo document.forms[0].units.text='.$vars[0].';; } ? }//end Modify_Item Details you do realize that the PHP runs first, on the server, right?. The output is then sent to the client and the javascript is exectuted. You can't mix the two. So, when you call that Javascript function, the PHP is already done, it's not going to execute. Do a view source of your page... You can send Javascript variables to PHP by submitting a form or creating a URL to be clicked on. Either way, the page has to be refreshed/submitted in order for PHP to recieve the variable. You can send PHP variables to Javascript, too, but the PHP runs first. ? echo scriptvar test = '$test';/script; ? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: next and previous buttons performing on a query
select ID, Title from Books where ID='500'; That will give you the current set of data to display. Getting the previous and next record will depend on your sort order. Assuming ID as the sort order, store the value of ID and query for the next record: select ID from Books where ID '$ID' order by ID ASC limit 1; Previous record: select ID from Books where ID '$ID' order by ID DESC limit 1; The same approach works for the Title field. -Original Message- From: blue [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 1:05 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: next and previous buttons performing on a query www.phpbuilder.com has an excellent article on creating a results page that incorporates NEXT and PREVIOUS links/buttons so that one can navigate through the results.. i'll try to find an exact link. Wilbert Enserink [EMAIL PROTECTED] wrote in message 007001c212e1$f0f14340$0c01a8c0@pulsar">news:007001c212e1$f0f14340$0c01a8c0@pulsar... Hi all, I have this mySQL query giving me my result back. The info about the current db-record is showing. Now I want to display ' view next ' and ' view previous ' buttons on my website. which takes you to the same page but with the next record in the query result. Is there a clever way to do this? Any tips are welcome! Many regards Wilbert Enserink - Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl [EMAIL PROTECTED] - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] truncating dilema
Why not just put a Subject field? Most people use that to put a brief description of the article. Make the form field small and they'll keep their input small. Plus, you can set the maxlength value of the input field to limit things. http://www.htmlreference.com/htmlref95.html -Original Message- From: Nick Wilson [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 2:21 PM To: php-general Subject: [PHP] truncating dilema -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi everyone, I'm making an idiot proof news database for a client and do not want to include a 'description' field. I had thought to return a truncated version of the actual stories as a description. It has just occured to me though that if I'm to list maybe 100 news items with descriptions it means alot of memory right because i have 100 items containing: date title text (could be any length) I will use substr() in my php to format the descriptions but I thought I'd ask here if anyone had a *better* suggestion? Many thanks - -- Nick Wilson // www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE9CQyyHpvrrTa6L5oRAtJdAKClDX77zJsH5LUSkaRG0KP6DEpJ2wCeK9BC /WpypUV5ygtcBN/hwogsBeg= =s+ae -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Code Improvement
Why display all 5000 records and 50 fields at once? Typically, you display a sub-set of the row data and page through it to improve performance. Also, you typically display a sub-set of fields and then view individual records for full detail. -Original Message- From: Pong-TC [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 2:40 PM To: [EMAIL PROTECTED] Subject: [PHP] Code Improvement Hello All I run the simple code to display data from the database. There are around 5000 records and 50 fields. It takes around 1 1/2 min to retrieve the data to the browser. I'd like to know if we can improve my code. So, I can retrieve the data in a shorter period of time. I have codes as follows: $conn = (mssql_connect(20.23.252.3,hello,hello)) or die(Cannot connect to the database.); mssql_select_db(research,$conn); $strSQL = Select * from dss_student order by stuidterm; $rs = mssql_query($strSQL,$conn) or die(Cannot connect to the table); echo table border='0' cellspace=1tr; echo th bgcolor='#faf0e6'font face='verdana' size=2NO./font/th; while($fld = mssql_fetch_field($rs)){ echo th bgcolor='#faf0e6'font face='verdana' size=2 . $fld-name . /font/th; } echo /tr; $no_row = 1; while ($row = mssql_fetch_row($rs)){ if (($no_row % 2) == 1) echo tr; else echo tr bgcolor='#faf0e6'; echo tdfont face='verdana' size=2$no_row/font/td; for ($i=0;$i=49;$i++) echo tdfont face='verdana' size=2$row[$i]/font/td; $no_row++; } echo /table; mssql_close(); POng -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re[4]: [PHP] sessions help
Have you tried this on a separate web page to make sure it's not something server specific? Here's a script that worked from my computer with register_globals set to on and off (restarted server between tests for confirmation). If this works from your computer, could you resend the code on your page? Thanks, -Ed With register_globals=Off, I understand that you need to extract the $_POST and $_GET vars. I assumed the same for $_SESSIONS. Is this not true? No. If you use $_GET, $_POST and $_SESSION to get to those variables then there is no need to extract them into the global scope. This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re[4]: [PHP] sessions help
Hey, it worked on another server! I've been working on my local machine's server (localhost), but when I run it from a different web server, it worked fine. Any ideas about which setting(s) may be causing the problem? Nope, but I'm including a copy of my local php.ini for ya to compare with. [PHP] ;;; ; About this file ; ;;; ; ; This is the recommended, PHP 4-style version of the php.ini-dist file. It ; sets some non standard settings, that make PHP more efficient, more secure, ; and encourage cleaner coding. ; The price is that with these settings, PHP may be incompatible with some ; applications, and sometimes, more difficult to develop with. Using this ; file is warmly recommended for production sites. As all of the changes from ; the standard settings are thoroughly documented, you can go over each one, ; and decide whether you want to use it or not. ; ; For general information about the php.ini file, please consult the php.ini-dist ; file, included in your PHP distribution. ; ; This file is different from the php.ini-dist file in the fact that it features ; different values for several directives, in order to improve performance, while ; possibly breaking compatibility with the standard out-of-the-box behavior of ; PHP 3. Please make sure you read what's different, and modify your scripts ; accordingly, if you decide to use this file instead. ; ; - register_globals = Off [Security, Performance] ; Global variables are no longer registered for input data (POST, GET, cookies, ; environment and other server variables). Instead of using $foo, you must use ; you can use $_REQUEST[foo] (includes any variable that arrives through the ; request, namely, POST, GET and cookie variables), or use one of the specific ; $_GET[foo], $_POST[foo], $_COOKIE[foo] or $_FILES[foo], depending ; on where the input originates. Also, you can look at the ; import_request_variables() function. ; Note that register_globals is going to be depracated (i.e., turned off by ; default) in the next version of PHP, because it often leads to security bugs. ; Read http://php.net/manual/en/security.registerglobals.php for further ; information. ; - display_errors = Off [Security] ; With this directive set to off, errors that occur during the execution of ; scripts will no longer be displayed as a part of the script output, and thus, ; will no longer be exposed to remote users. With some errors, the error message ; content may expose information about your script, web server, or database ; server that may be exploitable for hacking. Production sites should have this ; directive set to off. ; - log_errors = On[Security] ; This directive complements the above one. Any errors that occur during the ; execution of your script will be logged (typically, to your server's error log, ; but can be configured in several ways). Along with setting display_errors to off, ; this setup gives you the ability to fully understand what may have gone wrong, ; without exposing any sensitive information to remote users. ; - output_buffering = 4096[Performance] ; Set a 4KB output buffer. Enabling output buffering typically results in less ; writes, and sometimes less packets sent on the wire, which can often lead to ; better performance. The gain this directive actually yields greatly depends ; on which Web server you're working with, and what kind of scripts you're using. ; - register_argc_argv = Off [Performance] ; Disables registration of the somewhat redundant $argv and $argc global ; variables. ; - magic_quotes_gpc = Off [Performance] ; Input data is no longer escaped with slashes so that it can be sent into ; SQL databases without further manipulation. Instead, you should use the ; function addslashes() on each input element you wish to send to a database. ; - variables_order = GPCS [Performance] ; The environment variables are not hashed into the $HTTP_ENV_VARS[]. To access ; environment variables, you can use getenv() instead. ; - error_reporting = E_ALL[Code Cleanliness, Security(?)] ; By default, PHP surpresses errors of type E_NOTICE. These error messages ; are emitted for non-critical errors, but that could be a symptom of a bigger ; problem. Most notably, this will cause error messages about the use ; of uninitialized variables to be displayed. ; - allow_call_time_pass_reference = Off [Code cleanliness] ; It's not possible to decide to force a variable to be passed by reference ; when calling a function. The PHP 4 style to do this is by making the ; function require the relevant argument by reference. ; Language Options ; ; Enable the PHP scripting language engine under Apache. engine = On ; Allow the ? tag.
RE: [PHP] Shut down server
That all depends on what kind of server you're referring to. -Original Message- Hi, I tried to shut down my server with exex(/sbin/poweroff) but nothing happened! Can someone tell me how I could make shut down the server ? Is it possible ? Thanks, Rosen This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Shut down server
This has serious security implications. Research how to create a script on your system. Set it's sticky bit to run as a standard user that has authorization to run the shutdown command using SUDO. Make sure the script works from within UNIX and then call the script from PHP using exec. I am not a security expert. Check with others to get their opinion on whether this is the best approach. -Original Message- The server is Linux Red Hat 7.2 Can someone tell me how I could make shut down the server ? Is it possible ? This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL Query Help!!!!
This is a MySQL question and best directed to the MySQL mailing lists available at: http://www.mysql.com/documentation/lists.html -Original Message- From: Chris Kay [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 4:33 PM To: PHP General List Subject: [PHP] MySQL Query Help I have a rather longer query which I would like to get all records past todays date. Here is my query $ttwo = date(YmdGi); $dbq = select(select detail.*, type.type_name, status.status_name, staff.staff_name, source.source_long, source.source_short from detail, type, status, staff, source where type.type_id = detail.detail_type status.status_id = detail.detail_status staff.staff_id = detail.detail_staff source.source_short = detail.detail_source 'detail_start_date_y,detail_start_date_m,detail_start_date_d,d etail_start_time_h,detail_start_time_m' = '$ttwo' order by detail.detail_start_date_m DESC, detail.detail_start_date_d DESC); The query works fine before I try to get all records in the furure as shown below 'detail_start_date_y,detail_start_date_m,detail_start_date_d,d etail_start_time_h,detail_start_time_m' = '$ttwo' The query does not error out it just does not give any records, and I know there are 4 records Detail_start_date_y = 4 digit year Detail_start_date_m = 2 digit month Deatil_start_date_d = 2 digit day Detail_start_time_h = 24 hour time Can anyone see what I am doing wrong? Thanks in advance. -- - Chris Kay Technical Support - Techex Communications Website: www.techex.com.au Email: [EMAIL PROTECTED] Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 Platinum Channel Partner of the Year - Request DSL - Broadband for Business -- - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL Query Help!!!!
ps... from a PHP perspective, you may find troubleshooting things like this easier by using formatting like this: $sql = select detail.*, type.type_name, status.status_name, staff.staff_name, source.source_long, source.source_short from detail, type, status, staff, source where type.type_id = detail.detail_type status.status_id = detail.detail_status staff.staff_id = detail.detail_staff source.source_short = detail.detail_source 'detail_start_date_y,detail_start_date_m,detail_start_date_d,detail_start_ti me_h,detail_start_time_m' = '$ttwo' order by detail.detail_start_date_m DESC, detail.detail_start_date_d DESC ; $dbq = select($sql); -Original Message- From: Chris Kay [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 4:33 PM To: PHP General List Subject: [PHP] MySQL Query Help I have a rather longer query which I would like to get all records past todays date. Here is my query $ttwo = date(YmdGi); $dbq = select(select detail.*, type.type_name, status.status_name, staff.staff_name, source.source_long, source.source_short from detail, type, status, staff, source where type.type_id = detail.detail_type status.status_id = detail.detail_status staff.staff_id = detail.detail_staff source.source_short = detail.detail_source 'detail_start_date_y,detail_start_date_m,detail_start_date_d,d etail_start_time_h,detail_start_time_m' = '$ttwo' order by detail.detail_start_date_m DESC, detail.detail_start_date_d DESC); The query works fine before I try to get all records in the furure as shown below 'detail_start_date_y,detail_start_date_m,detail_start_date_d,d etail_start_time_h,detail_start_time_m' = '$ttwo' The query does not error out it just does not give any records, and I know there are 4 records Detail_start_date_y = 4 digit year Detail_start_date_m = 2 digit month Deatil_start_date_d = 2 digit day Detail_start_time_h = 24 hour time Can anyone see what I am doing wrong? Thanks in advance. -- - Chris Kay Technical Support - Techex Communications Website: www.techex.com.au Email: [EMAIL PROTECTED] Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 Platinum Channel Partner of the Year - Request DSL - Broadband for Business -- - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] XML with PHP?
--xml -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 6:57 AM To: [EMAIL PROTECTED] Subject: [PHP] XML with PHP? Hey! Which PHP option should I use for compiling with the XML support. I'm using the standard XML support on the web and I found there are 4 or 5 different PHP option for XML. Which should I use? The example of the XML is .. -- clip -- ?xml version=1.0 encoding=UTF-8? NetConnectRequest xmlns=http://www.; ... BDHosts11/DBHosts Products CreditProfile blah, blah, etc. /CreditProfile /Products -- clip -- Thanks, FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Array into database
Depends on the average size of data that you're working with. You have to count how many bytes each array take up. I think the sizeof function will do this for you. -Ed -Original Message- And how should I store a serialized variable in my database? As String or as Blob? This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] unset($array[value]) does not work?
It is working. The last two tests you were running weren't actually the same, which was confusing your testing results. I've altered the code a little for ease of testing. It's included below. -Original Message- You will see that $unserialized['foo'] still exists! Can anyone explain me what I'm doing wrong? -- ? $array = array ( foo = bar, wom = bat ); echo $array[foo] . br; echo $array[wom] . br; $serialized = serialize($array); echo $serialized . br; $unserialized = unserialize($serialized); echo $unserialized[foo] . br; echo $unserialized[wom] . br; echo hr; $keys = array_keys ($unserialized); echo $keys[0] . br; echo $keys[1] . br; echo hr; if (key_exists(foo, $unserialized)) { echo foo exists!br; } if (key_exists(wom, $unserialized)) { echo wom exists!br; } echo hr; unset ($unserialized['foo']); if (key_exists(foo, $unserialized)) { echo foo exists!br; } if (key_exists(wom, $unserialized)) { echo wom exists!br; } ? This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] sending 1000 emails to subscribed members via php?
Kind of an off-shoot question, but has anyone created functions to interface PHP and one of the popular mailing list management software packages like Majordomo or Mailman? -Original Message- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 10:29 AM To: andy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] sending 1000 emails to subscribed members via php? On Wed, 12 Jun 2002, andy wrote: I am wondering whats wrong with my php script. I am trying to write a newsletter to 150 members. Therefore I did seperate the adresses with a , After about 1 minute php gave up telling me mail has failed. Is there a restriction on sening mail via mail(xx) via php? Anyway what do I do if I would have 1 members. This might take lots of cpu?! So I would like to keep it via my webinterface, but be able to email to all members. Use PHP to manage a list of subscribers that is in a format acceptable to your MTA (.qmail, sendmail alias file, etc.). Then you can just use one call to mail() and let your MTA take care of it, which is what it's made for (and not what PHP is made for). miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Forum / Web Mail Combined?
Ilia and I were discussing FUDForum and general forum features. That made me wonder... Are there forums that integrate pop3 web mail support? -Ed This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] form post
No, because PHP is server-side. -Original Message- From: Kris Vose [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 11:28 AM To: [EMAIL PROTECTED] Subject: [PHP] form post Is there a way to post input types that are hidden with out using a html form in php? I know you can do it in java script with Form.submit(). So... if I have three hidden fields can I post them without pressing a button that uses a form by using a php function? Thanks in advance. Kris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Querying for MAX
select MAX(fieldname) from table; You can also insert data in tables with auto_increment fields to account for yourneed to insert old member ids. insert into tablename (ID, Name) values ('$OldID', '$Name'); -Original Message- From: César Aracena [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 11:36 AM To: 'PHP DB List'; PHP General List Subject: [PHP] Querying for MAX I'm sorry if this mensaje is posted twice. I sent it yesterdays, but then my ISP had problems with e-mail and I lost dozens of them and don't know if sent OK. Hi all, What I'm trying to do here is not inside PHP nor MySQL books I have. I need to query the DB to look the max result in a column. That is, if I have affiliate members with ID going from 1 to 10, get the query to know that the last member added was 10 so I can add member 11 without using auto_increment, because I need to insert old members too which already have ID numbers. Is that possible? Thanks in advance, Cesar Aracena mailto:[EMAIL PROTECTED] CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Automatic user login under NT
Sure, never mind about Rasmus descrimination towards Windows users. Rasmus always has been bitter with users asking for support, especially if they want to run PHP under Windows. Although it seems counter-productive, I can certainly respect Rasmus having his own opinion. He has provided quick and helpful responses to many of my questions, and I'm pretty sure I'm not the only one he's helped. That garners even more respect - IMHO. PHP developers should be thankful of its support under Windows because that allowed to keep jobs still working on PHP, ie eventually not having to move to other languages. I think this last point shows that this a battle between ASP and PHP - not necessarily an OS / platform war. More books, support, programming tools (libraries, editors, etc.) and jobs based around the PHP programming language would help tremendously. To write PHP extensions on Windows I think Visual C++ is more appropriate. Does gcc (or some other free C programming language) for Windows exist? -Ed This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] while...
Why not use while to loop through the shopping cart and add items to the message variable? $message = Here is your order: ; while ($Row = mysql_fetch_array($Results)) $message .= item description information; $message .= Thanks for your order... ; -Original Message- From: Phil Reid [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 1:27 PM To: [EMAIL PROTECTED] Subject: [PHP] while... I have a function in my script which sends an e-mail to my client company with details of a shopping cart order. I was wondering if it is possible to use a while loop inside the mail function so that I can send details of multiple items in one e-mail. Here is the code I am using. And bear in mind that I am a newbie to PHP, so if the mistake is obvious you will need to forgive me. $message = ---Client Information---\nUsername: $result[username]\nE-Mail Address: $result[email]\nContact Method: $contactoption\nForename: $result[forename]\nSurname: $result[surname]\nCompany: $result[company]\nHouse Number or Name: $result[address1]\nAddress Line 2: $result[address2]\nAddress line 3(optional): $result[address3]\nLocality: $result[local]\nCity: $result[city]\nPostcode: $result[postcode]\nHome Telephone: $result[homephone]\nWork Phone: $result[workphone]\nMobile Phone: $result[mobilephone]\nID: $result[id]\n--Order Details--while ($shoppingrow = mysql_fetch_array($shoppingresult))\nGrade: $shoppingrow[0]\nLength: $shoppingrow[1]; $extra = From: $result[forename]\r\nReply-To: $result[email]\r\n; mail ([EMAIL PROTECTED], James Laird Website Order, $message); If anyone can be of assistance it would be very much appreciated. Regards, Phil Reid This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] including functions, passing objects I created
I'm not sure I completely understand what you're asking, but taking a guess... ... assuming you're just wanting to work with the data... ... and assuming you're creating a results set from your db query, start with this code: $Results = mysql_query($sql, $DBLink); Within your function, you can specify a global variable: function ProcessData() { global $Results; } - or - You can copy the results to an array and pass that around, like this: $data = array; $Results = mysql_query($sql, $DBLink); while ($Row = fetch_array($Results)) $data[] = $Row[]; ProcessData($data); function ProcessData($UserData) { ... processing ... } -Original Message- From: Leotta, Natalie (NCI/IMS) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 2:00 PM To: PHP General List Subject: [PHP] including functions, passing objects I created I have a line class that I'm using to draw a line graph of up to 5 lines. Since I query the db for each of those lines (with a # as lineNum), my code to take everything out of the fetch_arrays is fairly cumbersome. I use this code in 4 different programs (the graph, the printable graph, the data table, and the accessible [D]). To avoid code duplication, I'd really like to be able to pass $sql and the 5 lines to a function in a different file, that all 4 of my programs can use. I have tried both function runSQL ($sql, $line1, $line2...) { ... } and function runSQL ($sql, $line1, $line2...) { ... return array ($line1, $line2...); } but both ways timeout. Is there any way for me to put data into my line objects from a function? I know that the include is working because I have a test function that just prints out Hello. I've checked the manual, but it doesn't say anything about having a user-made object as a param or a return. Thanks for any info you may have! -Natalie Natalie S. Leotta Information Management Services, Inc. (301) 680-9770 [EMAIL PROTECTED] This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Converting week number to unix timestamp
You're looking for the mktime function. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 6:42 AM To: [EMAIL PROTECTED] Subject: [PHP] Converting week number to unix timestamp How can I convert the week number(i.e. 1 - 52) to a UNIX Timestamp? Thanks JJ Harrison [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www.tececo.com http://www.tececo.com This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much.
RE: [PHP] how can i insert date
http://www.php.net/manual/en/function.mktime.php -Original Message- From: suman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 3:20 PM To: [EMAIL PROTECTED] Subject: [PHP] how can i insert date hi i have a date,month and an year what is the function in php that i can i use to convert the 3 vars into a date and insert into a postgres db. bye suman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Extracting from an Array
$sql = select fieldname from tablename; $Results = mysql_query($sql, $DBLink); $Row = mysql_fetch_array($Results); $fieldname = $Row[fieldname]; $Date = explode(-, $fieldname); $Year = $Date[2]; -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 4:11 PM To: [EMAIL PROTECTED] Subject: [PHP] Extracting from an Array I have a db field, type varchar, that is actually a 'date' string formatted as dd-mm-. I used type 'varchar' (rather than type 'date') since I had to accomplish other things with it. Now, however, I do need to extract the Year (the last four digits in the array). I've tried to access the array $_SESSION['expiry'] but I don't know how to explode this array to extract all characters in last item after the last separator : i.e. '-'. I've used - as the separator, but I just get the first number of the last part of the array, i.e.: '-Y'. Is there a way of extracting all characters in that array? I've tried a bunch of combinations, but I obviously don't understand the basic mechanics of array manipulation or 'slicing'. If someone could point me to a good resource, or explain what I'm doing wrong, I would greatly any assistance. Tia, Andre This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] F5 problem...
Create seperate documents: one to display the form and another to process the form. add.php // displays new form add_handler.php // process form input On the form processing, check for the presence of HTTP_POST_VARS before proceeding. if (isset($HTTP_POST_VARS)) { ### process form ### } else header(Location: add.php); -Original Message- From: WISTA.pl [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 3:29 PM To: [EMAIL PROTECTED] Subject: [PHP] F5 problem... Hello group, I need a good solution to prevent sending form data to server after hiting refresh. How can PHP know that user hit refresh and sent data that already have been stored in database (without querying database)? Remek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How do I stop foreach if $menu not set??
Change introduction to a variable with $ in front of it or put it in quotes introduction. What Can I do to stop the foreach function from working if $menu is not set?? ? if ($menu==(introduction)) {$sub = array( 'overview.php' = 'Overview', 'moreinfo.php' = 'More Info' ); } This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] 405 Method Not Allowed with Post Request on PWS
Could you post an example of the code you're working with? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 10:32 AM To: [EMAIL PROTECTED] Subject: [PHP] 405 Method Not Allowed with Post Request on PWS I'm running PHP 4.2.1 and PWS on my Windows98 system and I think I'm configured correctly, but the first time I tried to submit a Post request I got a '405 Method Not Allowed' error (full error at the bottom of this email). I've searched and found lots of similar posts but so far nothing that solves my problem. Can anyone help? Thanks in advance. Jesse HTTP Error 405 405 Method Not Allowed The method specified in the Request Line is not allowed for the resource identified by the request. Please ensure that you have the proper MIME type set up for the resource you are requesting. Please contact the server's administrator if this problem persists. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] addslashes for db search?
Can you put things in standard quotes? 'Aimburu -Original Message- From: andy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 12:44 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] addslashes for db search? Hi there, I have some db records starting with a ' E.g: 'Aimburu Now I am wondering how to retrieve this records. without a addslashes it returns an error. So I did add a slash, but then it does not find this record. I tryed this query: ...like '\'Aimburu %' ... Do I have to change this db entries, and if how? How should they look like and is there a good method to change all this thousands of records at once? Thanx in advance, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Arrays
Create two database tables. One for categories and one for links. Here are the fields you want for categories: - ID - ParentID - Title The ParentID field allows you to create a hierarchy of categories - one category and it's sub-categories. For example: ID ParentIDTitle 1 0 Home 2 1 Books 3 1 Movies 4 2 Sci-Fi 5 2 Adventure 6 3 Sci-Fi 7 3 Adventure Will create the following hierarchy: Home (0) | - | | Books Movies | | - - | | | | Sci-Fi Adventure Sci-Fi Adventure Your Links table will have the following fields: - ID - ParentID - Title Create forms for adding, editing, and deleting categories. Create forms for adding, editing, and deleting links. Set up a main page the CatID should be 0 at this point. List categories with ParentID = 0 and have a link to add categories and links. The add category form will store the current CatID as ParentID. The add link form will operate the same way. Then it's just an issue of creating a page that lists all of the categories and links that have the current CatID as the ParentID. When you list them, create links for them to the same page that references the ID a href='index.php?CatID=?php echo $Row[ID];?'?php echo $Row[Title];?/a and just loop through that for all of the result set and you're on your way... ok... I'm pretty sure this might be somewhat vague... sorry, I'm trying to help as much as I can with only a short amount of time at the moment. Feel free to ask questions, but try to research this and see how much you can figure out on your own first =) -Ed -Original Message- From: Daniel Broome [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 4:08 PM To: Lazor, Ed Subject: Re: [PHP] Arrays I dont know how to explane this.. what I need to do is, I have a menu with sub links that are desplayed when the topic is clicked. what I need to do is create a script that is easy to edit, at the moment I am having to write all the HTML inside the PHP script.. e.g $sub=lilink goes here/li etc. for each topic I have a script. What I would like to do is say, if $menu = contact foreach array in topic echo thier $link and $name I think I can do it myself but I need help on what commands I can use and what is the best way to use them. thanks for helping. Dan - Original Message - From: Lazor, Ed [EMAIL PROTECTED] To: 'Dan' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 11, 2002 10:45 AM Subject: RE: [PHP] Arrays Get the number of items in the array using the count function and then use a for statement to loop through them from start to finish. Here's an example: $Total = count($link); for ($i = 0;$i $Total;$i++) print lia href='.$link[$i].'$name/a/li; Of course, the link names will all be the same, so you'll probably want to store that in the array as well... for ($i = 0;$i $Total;$i++) print lia href='.$link[$i][url].'.$link[$i][name]./a/li; -Original Message- From: Dan [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 3:01 PM To: [EMAIL PROTECTED] Subject: [PHP] Arrays I'm trying to get my head around arrays and how to munipulate them. what I need to do is add html around the arrays eg. lia href='.$link(0).'.$name./a/li; I have my head around that but I the number of lines the I need to create is going to change so I need the script to repeat untill all the arrays are used. -- - Daniel Broome, siliconBLUE Ltd, Web Author, http://siliconblue.com Mob: 64-21-178-5120 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ** ** This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately
RE: [PHP] Installation and/or configuration problems w 4.2.1 on NT
I don't know the answer, but... It sounds almost like a server configuration issue. Almost as if the web server (Apache?) doesn't have the php extension configured correctly. -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 3:48 AM To: [EMAIL PROTECTED] Subject: [PHP] Installation and/or configuration problems w 4.2.1 on NT Hi all, I have PHP running happily on three of my servers (NT/2000/Linux) and need to set it up on NT on a server 400 miles away. I have remote access to the server. I have followed the instructions for both the ISAPI version and the CGI version with no success. This is the error message I get when I try to call phpinfo.php: HTTP Error 401 401.3 Unauthorized: Unauthorized due to ACL on resource I'm now just about to start pulling my hair out, so can someone help before I'm totally bald. This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] get pwd on windows
Will getcwd() work for you? Also, try phpinfo() to find out which variables are set. -Original Message- From: Shane Wright [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 10:45 AM To: [EMAIL PROTECTED] Subject: [PHP] get pwd on windows -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Ok, I need to write this little script to run on a Windows box (don't ask...), but I'm getting completely shafted by the inconsistent use of long filenames. I need to get the current directory, but it must have long filenames and not be chopped to xxx~1 or anything. $SCRIPT_FILENAME is not set, there is no pwd utility, nothing is set in the environment and realpath('./') returns cropped firectory names. Is there a way to do this or am I condemned to bang my head against a wall and swear some more? Cheers - -- Shane http://www.shanewright.co.uk/ Public key: http://www.shanewright.co.uk/files/public_key.asc -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9Bjcw5DXg6dCMBrQRAjjbAJ4iz2jRJ5rMzkV7Md5GHpTd3YcX1wCfZb6B 44Qwj0u6jdfNpGtf+LTEX+w= =HgUp -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] matrix functions
I think this will work. You'll have to test it to confirm: $A[0][0] = x; $A[0][1] = x; $A[0][2] = x; $A[0][3] = x; $A[0][4] = x; $A[1][0] = 0; $A[1][1] = 0; $A[1][2] = 0; $A[1][3] = 0; $A[1][4] = 0; $B = $C = array(); $B = $A[0]; $C = $A[1]; $A[0] = $C; $A[1] = $B; -Original Message- From: johannes reichardt [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 8:32 PM To: [EMAIL PROTECTED] Subject: [PHP] matrix functions hi list, i have a question regarding a class for matrix modifications so i dont have to re-invent the wheel ;) i would like to do things like this: matrix with 5*5 colums/rows x x x x x 0 0 0 0 0 x x x x x x x x x x x x x x x x x x x x x x x x x 0 0 0 0 0 x x x x x x x x x x maybe that is incredebly stupid and simple but my brain doesnt tell me anything right now - how can i transform colums/rows quickly and efficient? Any help appreciated! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Switching from HTTPS to HTTP using PHP?
Isn't it just an issue of whether you call http: or https: ? -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 11:27 AM To: [EMAIL PROTECTED] Subject: [PHP] Switching from HTTPS to HTTP using PHP? After completing most of the coding for my site, I would like to use https for restricted areas that require login. In short tests, I've discovered that, yes, I can engage the encrypted mode while calling these pages, but I've also discovered that it stays in the https mode even when it passes to once non-restricted pages. I'm not sure whether that is a problem, but . . . I gather this is normal behavior since I had requested https. But is it possible to unrequest ? My question is simple: is there a way to get out of or turn off https once it has been initiated -- using PHP? Since I have limited or no experience with https, any pointers, advice, or admonitions would be greatly appreciated. And they say, Ignorance is bliss -- I'm not too sure about that : Tia, Andre -- Please pray the Holy Rosary to end the holocaust of abortion. Remember in your prayers the Holy Souls in Purgatory. May God bless you abundantly in His love! For a free Cenacle Scriptural Rosary Booklet: http://www.webhart.net/csrb/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Switching from HTTPS to HTTP using PHP?
I'm pretty sure it's just an issue of using HTTPS for encrypted pages and HTTP for unencrypted. For example: http://www.example.com is unencrypted and pulls from port 80 on the web server. Whereas, https://www.example.com would be encrypted and come from port 443 on the web server. You can tell whether you're in encrypted mode or not by checking the variable: $_SERVER['HTTPS'] == on One thing to check, anchors with no protocol specified default to the current protocol. If you're in an encrypted page and have a link like this: a href='/index.php'Home Page/a The protocol will default to https and this may be the source of the problem you're experiencing. -Ed - Hi Ed, Maybe it's just one of those slow days, brain-wise. But I have a 'problem' with https remaining in that mode even on pages that haven't specifically requested it. That was not my understanding how it worked. Now, if I have to call http on pages that do not need https, then how would I be able to distinguish whether or not the mode is https or not. [I'm thinking of my bank's secure pages -- after I'm finished with the secure stuff, I get booted out of https. I suppose that's what I expected would happen (only pages calling https would be in it.) Sigh . . . more reading to do : Regards, Andre This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] multi-line textfields don't post
Give us a copy of the code so we can tell what you're talking about. -Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 12:10 PM To: [EMAIL PROTECTED] Subject: [PHP] multi-line textfields don't post Whenever I use a mult-line textfield, the data inside doesn't transfer over. But single-line textfields work just fine. how do i fix this? This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Parse an email message for content
You'll need to have a cgi version of PHP to use in cronjobs and you'll need to use http://www.php.net/manual/en/function.preg-grep.php Good luck =) -Original Message- From: Jonathan Duncan [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 12:48 PM To: [EMAIL PROTECTED] Subject: [PHP] Parse an email message for content I am trying to display on a web page a daily message from a mailing list that I am on. What I want is to have a script run on my server each day at a certain time that reads the mail file that contains the daily email message, takes the Article Titles and makes them the link text to be used with the link that is provided and then have the article abstract listed below. Can anyone point me in the correct direction on how I can learn how to do this? Thank you very much, Jonathan Duncan The daily email message I get comes in the following format: *-*-*-* Start Email Message *-*-*-* EMAIL HEADERS Bulleted list of article titles -article 1 -article 2 = (That is 5 equal characters) Article 1 Title See http://some.server.com/path/to/article.html a href=http://some.server.com/path/to/article.html;Link/a See http://additional.server.com/path/to/article.html a href=http://additional.server.com/path/to/article.html;Link/a Article 1 abstract. This gives a brief excerpt of the article. = (That is 5 equal characters) Article 2 Title See http://some.server.com/path/to/article.html a href=http://some.server.com/path/to/article.html;Link/a See http://additional.server.com/path/to/article.html a href=http://additional.server.com/path/to/article.html;Link/a Article 2 abstract. This gives a brief excerpt of the article. - Copyright text ends the message -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re[2]: [PHP] Parse an email message for content
Good point. -Original Message- LE You'll need to have a cgi version of PHP to use in cronjobs Not entirely true; you can run a script off your server as well, using lynx -dump http://server/path/to/file as the line in crontab - Julie This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help with header function
I'm pretty sure it was the lack of a space in the header field between Location: and the actual url. -Original Message- The only thing I can think of is that you have a syntax error in the header. -Kevin This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help with header function
LOL Yea, it's always much easier if we have actual code to work from rather than taking guesses in the dark. -Original Message- Why do I get the feeling I'm playing that mind bender game where you have to guess the right combination within so many turns? LOL This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Compare 2 resultsets of db-query
What you're asking is considered a UNION. I'm not sure which database you're using, so I can't tell if it supports UNIONs or not. If you're using MySQL, UNIONs are supported in version 4.0-alpha. Another approach is storing the results of both queries in single array and then pulling it from there when you need to work with it. Then again... you don't seem to be sorting the results, so you could just as easily start the table, run the db query, dump the results, run another query and dump the results, and then close the table. I don't know if what I just said makes sense, so here's a psuedo example: table ?php $sql = query#1; $Results = mysql_query($sql, $DBLink); while ($Row = mysql_fetch_array($Results) ) { print tr; print td.$Row[0]./td; print td.$Row[1]./td; print td.$Row[2]./td; print /tr; } $sql = query#1; $Results = mysql_query($sql, $DBLink); while ($Row = mysql_fetch_array($Results) ) { print tr; print td.$Row[0]./td; print td.$Row[1]./td; print td.$Row[2]./td; print /tr; } ? /table -Original Message- From: Danny Kruitbosch [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 1:09 PM To: [EMAIL PROTECTED] Subject: [PHP] Compare 2 resultsets of db-query Hi, I've two queries on the same table. They have the following structure: Query1: SELECT FIELD1, COUNT(FIELD2) AS TOTAL from TABLE GROUP BY FIELD1 Query2: SELECT FIELD1, COUNT(FIELD2) AS SUB from TABLE WHERE FIELD2=1 GROUP BY FIELD1 Now I want to print a table that prints the values of FIELD1, TOTAL and SUB. Query 1 returns more rows as query 2. Field1 is the same in both queries so I should be able to 'link' the results of both queries together. How do I do this?? Thanks! Danny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Parse an email message for content
Exploding at the = is a good idea. I'd just fread the file into a variable, explode it, and then egrep up to the first delimeter. I'm not sure if this is the best approach... but it's the most likely approach I'd take if I were working on this. =) --- I am looking for an idea on how to actually read the email files. I have been reading about fread for reading the file and then I have considered doing an fseek to start reading where the email headers stop, and then explodeing the contents of the file separated by the = delimiter that comes in the message. However, I do not know where to start. Any pointers? This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Can a php script be placed within a stylesheet?
CSS in this sense is client side. As long as the PHP output is valid style codes, you should be ok. -Original Message- On Mon, 10 Jun 2002, Andrew Brampton wrote: Yes you can place one in a style sheet you just need to tell apache (or whatever) that .css should be parsed by PHP, this can be done via a .htaccess or something similar... Here is a example in a .htaccess file: AddType application/x-httpd-php .css But wouldn't that prevent it from being parsed as a CSS file? This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Parse an email message for content
Which documentation should we check to get information on the undocumented features? ;) ps... I'm joking. -Original Message- while not documented, PHP now has the mail-parse functions (see documentation for function list) This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Arrays
Get the number of items in the array using the count function and then use a for statement to loop through them from start to finish. Here's an example: $Total = count($link); for ($i = 0;$i $Total;$i++) print lia href='.$link[$i].'$name/a/li; Of course, the link names will all be the same, so you'll probably want to store that in the array as well... for ($i = 0;$i $Total;$i++) print lia href='.$link[$i][url].'.$link[$i][name]./a/li; -Original Message- From: Dan [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 3:01 PM To: [EMAIL PROTECTED] Subject: [PHP] Arrays I'm trying to get my head around arrays and how to munipulate them. what I need to do is add html around the arrays eg. lia href='.$link(0).'.$name./a/li; I have my head around that but I the number of lines the I need to create is going to change so I need the script to repeat untill all the arrays are used. -- - Daniel Broome, siliconBLUE Ltd, Web Author, http://siliconblue.com Mob: 64-21-178-5120 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dynamic pull-down menus?
Does anyone know how to create a web page with more than 2 selection fields that Interact? In my particular case, I'm trying to create a series of pull-down menus. The first selection is the choice of hardware class (workstation, server, laptop, pda, etc.). The second selection is manufacturer. The third is hardware components (video, hard drive, motherboard, etc.). The last selection chooses between different types of information of information (Overview, Tech Specs, Drivers, etc.). My searches on the net have drawn up examples that typically work with two selection fields interacting. The best article on this was from Leon Atkinson: http://www.zend.com/zend/tut/drop-down.php I also found an example that does use 3 selection fields, but it appears to be in ASP: http://www.quickgallery.com/case/storesearch/ Any ideas on how to go about this? Thanks, -Ed This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] dynamic pull-down menus?
That sounds very close to what I'm trying to do. Is it necessary to reload the page every time a selection is made? Do you have examples of this that work with multiple pull-down menus? -Original Message- From: Richard Baskett [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 2:48 PM To: Lazor, Ed; PHP General Subject: Re: [PHP] dynamic pull-down menus? Usually people do this with javascript, but you could use javascript/php/mysql mysql for the data, php to create the dynamic drop down menus and javascript to refresh the page once someone has picked an option. Rick We do not have to visit a mad house to find disordered minds; our planet is the mental institution of the universe. - Unknown From: Lazor, Ed [EMAIL PROTECTED] Date: Fri, 7 Jun 2002 14:40:45 -0700 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: [PHP] dynamic pull-down menus? Does anyone know how to create a web page with more than 2 selection fields that Interact? In my particular case, I'm trying to create a series of pull-down menus. The first selection is the choice of hardware class (workstation, server, laptop, pda, etc.). The second selection is manufacturer. The third is hardware components (video, hard drive, motherboard, etc.). The last selection chooses between different types of information of information (Overview, Tech Specs, Drivers, etc.). My searches on the net have drawn up examples that typically work with two selection fields interacting. The best article on this was from Leon Atkinson: http://www.zend.com/zend/tut/drop-down.php I also found an example that does use 3 selection fields, but it appears to be in ASP: http://www.quickgallery.com/case/storesearch/ Any ideas on how to go about this? Thanks, -Ed This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] convertion from string to time substracting
I got a mysql database, where two of the fields of a table record times as CHAR(8) in the format hh:mm:ss I want to take this two times and get the difference between them in seconds, for example 12:01:30 - 12:00:00 = 90 I looked up at the doc in the php.net website and couldn't get on how to do this... should I use the strtotime function? ?php function TimeDifference($SourceA, $SourceB) { $TimeA = explode(:, $SourceA); $TimeB = explode(:, $SourceB); $SecondsA = ($TimeA[0] * 60 * 60) + ($TimeA[1] * 60) + $TimeA[2]; $SecondsB = ($TimeB[0] * 60 * 60) + ($TimeB[1] * 60) + $TimeB[2]; $TimeDifference = $SecondsB - $SecondsA; return $TimeDifference; } $Start = 12:00:00; $Stop = 12:01:30; print The time difference is . TimeDifference($Start, $Stop) . seconds.br; ? This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] dynamic pull-down menus?
Cool. Thanks Dave. I'm exploring this stuff in another window. I'll check out irt.org. -Original Message- From: David Freeman [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 4:45 PM To: 'Lazor, Ed'; 'Richard Baskett'; 'PHP General' Subject: RE: [PHP] dynamic pull-down menus? That sounds very close to what I'm trying to do. Is it necessary to reload the page every time a selection is made? I've found examples of the javascript side of it on www.irt.org that helped last time I did this sort of thing. The php/sql stuff is a matter of figuring out what you need to extract and refining your queries with each new menu to get the right data. The need for page reload sorta depends on how much you want to load up the page - the more select menus you have the more possible iterations you get and, therefore, the more data you need to include in your page. Beyond a certain point you may find that you're better off doing a page reload and refreshing your select data rather than including it in the original page. Do you have examples of this that work with multiple pull-down menus? Once you have a double selection it shouldn't be a big task to extend. You may find it easier to start with by just using html/javascript and then adding the php/sql once you know the html/javascript is working fine - just keeps complexity down while you're working it out. CYA, Dave This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how do you parse this?
I have a file with this: ullia href=http:\\www.someaddress.comSomeSite/a This is a description of the site./ul I'm trying to parse out the address, site name, and description into separate variables. How can I do this? Thanks, -Ed This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] i cannot pass variables to php script...
Make sure enable track vars is enabled. Try specifying global $arg before you access it. Try using phpinfo(); in your script. That will display all available variables. -Original Message- From: efa [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 1:04 PM To: [EMAIL PROTECTED] Subject: [PHP] i cannot pass variables to php script... Hi! I have a problem with passing variables to php script with simple GET. example: --- hello.html - htmlheadtitle=hello/head body a href=hello.php?arg=worldhello/a /body /html --- hello.php -- ? printf(arg=$argbr); ? output from clicking on the link is: arg= I should mention that I use mod_userdir and the script/html are lying in home directory for the user ( /home/username/public_html/...), and URL=http://server/~username/hello.html I am attaching output of phpinfo() and a copy of httpd.conf .htaccess file is empty btw. Cheers -- /admir efendic, stockholm, sweden This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Verisign / Payflow Pro
Hi =) I saw PHP has built-in support for Cybercash, but that Verisign has purchased them. It looks like I'll have to go with Payflow Pro, but I'm wondering if PHP has built-in support, available modules, or what the best approach is. Any recommendations? Thanks, -Ed This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Can anyone jog my memory on HTTP_REFERER Javascript location:replace?
If I understand what I think you're asking, you're trying to access the results in Javascript of something the PHP script processed... use your php script to spit out some javascript. For example: print script language='javascript'\n; print $Result = .$Results.;\n; print /script; -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 2:09 PM To: [EMAIL PROTECTED] Subject: [PHP] Can anyone jog my memory on HTTP_REFERER Javascript location:replace? Hi! I had found a way around the problem and it work, but when I enabled the web security features, it messed up. So, with some debugging and I found the problem and I'm not sure how to find a way around it. You see I use page1.php to do certain features but the problem is that PHP execution get done before the file (non-PHP programming) in passthru('...') get done later. So, I can't get the result before PHP finish executing. There, I came up with the Javascript where the non-PHP scripting can spit out the Javascript code and the Javascript take care of it. It work so well. To my dismay, the PHP pick up the HTTP_REFERER doesn't work because HTTP_REFERER was all blank when Javascript use location.replace(''); code. So, it messed up the webpage. Is there a way to get the HTTP_REFERER code? Or a different Javascript code? I mean there's no way to get the PHP execution to pause while the non-PHP programming get done first. Is there? Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Server crashing?
I'm starting to have a horrible time of pulling web pages from the server. I checked and found the following entries in the MySQL database server log. The error doesn't occur all the time, but it occurs a lot and only when communicating to the server through PHP. Any idea of what's going on? Or any idea of how to get more information about the problem? 020204 8:20:54 Aborted connection 22 to db: 'AtFantasy2' user: 'apache' host: `localhost' (Got an error reading communication packets) 020204 8:20:54 Aborted connection 21 to db: 'sessions' user: 'afsessions' host: `localhost' (Got an error reading communication packets) 020204 8:20:54 Aborted connection 30 to db: 'ads' user: 'banners' host: `localhost' (Got an error reading communication packets) 020204 8:20:54 Aborted connection 18 to db: 'sessions' user: 'afsessions' host: `localhost' (Got an error reading communication packets) 020204 8:20:54 Aborted connection 19 to db: 'AtFantasy2' user: 'apache' host: `localhost' (Got an error reading communication packets) 020204 8:20:54 Aborted connection 31 to db: 'ads' user: 'banners' host: `localhost' (Got an error reading communication packets) MySQL version 3.32.33 Apache version 1.3.23 PHP version 4.1.1 This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can this be done in PHP?
I'm trying to understand how this banner exchange works and whether it can be done in PHP. Here's the HTML you put on your web page: a href=http://rpgx.rpgconsortium.com/xchange/engage.cgi?advert=NonSSIpage=XX img src=http://rpgx.rpgconsortium.com/xchange/engage.cgi?id=atfantasypage=01; border=0 width=468 height=60/a It... - displays a random banner image - takes you to the site relating to the displayed image How does it do that? Any ideas on how to do this in PHP? -Ed This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- 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 and Apache authorization: how to logout. Help!
Even with a javascript function opening a new window and closing the old? -Original Message- From: Matthew Walker [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 3:42 PM To: Aras Kucinskas; [EMAIL PROTECTED] Subject: RE: [PHP] PHP and Apache authorization: how to logout. Help! I've done some investigating on my own. There is no way to do this. Period. Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Matthew Walker Sent: Friday, February 01, 2002 3:37 PM To: Aras Kucinskas; [EMAIL PROTECTED] Subject: RE: [PHP] PHP and Apache authorization: how to logout. Help! Does anyone have the answer for this question? I need it too... Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Aras Kucinskas [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 10:39 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP and Apache authorization: how to logout. Help! My site is in directory which is protected with .htaccess file. I want to develope a logout function, which can reset Apache authorization. What to do? HTTP header... unset $PHP_AUTH_USER ... Any suggestions Sorry for my English :) Aras -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002 -- 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] This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- 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]