[PHP] creating prev next link
I have a search page display results in the format Search results -- Product ID NameMore Info -- 1Egg link_to_more_info 2Apple link_to_more_info 3oil link_to_more_info 6meat link_to_more_info ........ I am also putting the results in a array.. and putting the array into a session.. When someone click on one of the product for more info, how can i create a prev next link to go to other product pages .. rather than clicking back button and then clicking on the link_to_more_info? Just say, Dave clicks on the apple to find out more info of this product.. on the product page how do i generate a prev link to take Dave to Egg details and next to take Dave to oil and once Dave is reading oil product details.. he should have prev link to Apple and next to meat any suggestion how i can creating this nav links from the array?? many thanks Huzz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Get image file size
How can I get the file size of an image in KB, I know how to get the width and height of an image using the getimagesize(); but not sure how to get the image file size. Many thanks in advance. awlad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strange crypt() problem
If I use MD5 based encryption...would i have similar problem in the future when i move the codes around to different server? - Original Message - From: Jeff Harris [EMAIL PROTECTED] To: Sævar Öfjörð [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, June 20, 2003 12:06 AM Subject: RE: [PHP] strange crypt() problem It looks like Some operating systems support more than one type of encryption. In fact, sometimes the standard DES-based encryption is replaced by an MD5-based encryption algorithm. The encryption type is triggered by the salt argument. At install time, PHP determines the capabilities of the crypt function and will accept salts for other encryption types. If no salt is provided, PHP will auto-generate a standard two character salt by default, unless the default encryption type on the system is MD5, in which case a random MD5-compatible salt is generated. PHP sets a constant named CRYPT_SALT_LENGTH which tells you whether a regular two character salt applies to your system or the longer twelve character salt is applicable. The first server you were using was using DES, this new server is using MD5. Since hashes are one-way algorithms, you appear to be SOL. However, you might be able to work something with mcrypt and someone who knows anything about it. http://www.php.net/manual/en/ref.mcrypt.php Jeff On Jun 19, 2003, Sævar Öfjörð claimed that: | |Well, if you don't find another solution for this, you could generate |random passwords for each member and mail them to them. Then you would |md5() them and update the DB with new md5()'ed passwords... This is not |the easy way out so I hope someone finds out why the crypt() is behaving |strangely. | |Sævar - ICELAND | |-Original Message- |From: Huzz [mailto:[EMAIL PROTECTED] |Sent: 19. júní 2003 22:43 |To: [EMAIL PROTECTED] |Subject: Re: [PHP] strange crypt() problem | |I already have about 1000 members their password crypted using crypt(); |would they able to login using their password or they have to change it |again?? | |Thanks | | |SævË Ölêöyp [EMAIL PROTECTED] wrote in message |news:[EMAIL PROTECTED] |Try using md5() instead because it is more widely supported than crypt() |and it leaves no room for errors. | |Hope it helps, |Sævar ICELAND | | |-Original Message- |From: Huzz [mailto:[EMAIL PROTECTED] |Sent: 19. júní 2003 21:43 |To: [EMAIL PROTECTED] |Subject: [PHP] strange crypt() problem | |I have this bit of code to crypt user password in user registration as |shown |below. | | $cryptpass=crypt($makepass); |which generated crypted password like eg 37Q9fppLHc4fQ with php 4.0 | |And am using the codes below to check for valid login.. |// $pass - from login page |// $dbpass - from the database | $pass=crypt($pass,substr($dbpass,0,2)); |} |if (strcmp($dbpass,$pass)) { |return(0); |} | | |Recently i have moved the same file to a new server with php 4.3.1 the |problem is the same piece of codes above generates completely differen |crypted value eg.$1$RjZHv7qx$h/L9ZUNT48rilHB6fGoMP/ .. hence the login |codes above does not work... :( | |Please someone tell me that i am not going mad | |please help |huzz | -- Registered Linux user #304026. lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] unique random id
How do i generate a unique random number? thanks awlad
Re: [PHP] [Newman] Passing an image through a php file.
try this: ?php header(Content-type: image/jpeg); fopen (d:/crushme/images/1.jpg, r); ? - Original Message - From: Mark Tehara [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Thursday, June 19, 2003 10:58 AM Subject: [PHP] [Newman] Passing an image through a php file. I would like to pass an image throught http://server/newman/ImageTEST/image.php 1. I need the headers (Assuming) ? header(Content-type: image/jpeg); ? would make the computer think its a image file. 2. load the image using fopen (d://crushme//images//1.jpg, r); ?php header(Content-type: image/jpeg); fopen (d://crushme//images//1.jpg, r); ? The image http://server/newman/ImageTEST/image.php; cannot be displayed, because it contains errors. This returns this error (above) Yes 1. Image is in the right location. Yes 2. I'm stuck. Any Suggestions would be very good. / Mark / -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help me compose myself... I'm about to kill Microsoft....
try something like this, not sure if this what you want create a random value like $random = rand(); then attach it to the each page.. like index.php?random=$random good luck - Original Message - From: Daniel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 19, 2003 11:34 AM Subject: [PHP] Help me compose myself... I'm about to kill Microsoft ARGH! I'm losing my marbles here! I'm developing a small CMS for IE, but IE is teasing me! It insists on using its cached files instead of those I'm working on. I've set the cache size to 0, Check for newer versions of stored pages: to Every visit to the page, and even put this at the top of my PHP scripts: header( Last-Modified: . gmdate( D, d M Y H:i:s, filemtime( $_SERVER['SCRIPT_FILENAME'] ) ) . GMT ); It just keeps on using the cached files! WHY?!??! I'm in TEARS here! Help!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] typecasting .. easy?
try $formatted = number_format($amount,2); - Original Message - From: Roy W [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 19, 2003 12:41 PM Subject: [PHP] typecasting .. easy? $amount is a calculated number If $amount equals for example 52., how do I get that to print as 52.00 similarly, if amount = 52.5 how do I get that to print as 52.50 Thanks! (looked at all sort of type casting manual stuff to no avail) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dealiong with quote's in SQL strings
addslashes (PHP 3, PHP 4 ) addslashes -- Quote string with slashes Description string addslashes ( string str) Returns a string with backslashes before characters that need to be quoted in database queries etc. These characters are single quote ('), double quote (), backslash (\) and NUL (the NULL byte). - Original Message - From: Petre Agenbag [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 13, 2003 2:43 PM Subject: [PHP] dealiong with quote's in SQL strings Hi List I recently installed 4.3.1 and enabled the magic_quotes_gpc to deal with quotes in mysql inserts. However, I think I have run into a problem that might be related, and was wondering if there is an easy way to fix it: I have a script that gets user input from a drop-down, on the action page I search a mysql table for the row matching the selection made previously. What I do then is to extract the result of that select * from table where data = form_selection and then to re-insert the data into the table ; note, re-insert, NOT UPDATE ( the app cals for a new row to be added with the updated data, so the old row stays intact and a new row is added that contains some of the old row's data plus some new stuff I add). So, the new insert sql looks as per usual insert into table (`var1`,`var2`,`var3`,`var4`,...) values ('$var1','$var2',); where $var1, $var2 etc is either inherited from the extract of the first querie's result set, or overwritten with my newly generated values. The problem now comes in with this: If one or more of the extracted variables containes something like O'Healy or something similar that causes trouble with the quotes in the new INSERT sql, well, you see the problem... And I don't want to have to go and addslashes to all my extracted variables, because there really are a whole heap of them. So, is there another php.ini setting that I'm missing to help me with this, or maybe a function that will addslashes to all my extracted vars? I'm lazy, shoot me! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what can i store in the DB
You can store image as BLOB in DB I would recomend you download mysql manual from www.mysql.com, very useful awlad - Original Message - From: - [ Paul Ferrie ] - [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 11:46 AM Subject: [PHP] what can i store in the DB Hi guys, I am not really an expert in this I just learn what I need to know when I need to know it. I am building a flash tutorials section for my site http://www.innovativedesigns.org.uk The section is my first real attempt at using php+mysql without having to check the books or reference files :) Anyway here is my question: Can images be stored in the DB I am thinking no. This would me a long way round what I am trying to do. cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what can i store in the DB
Paul check the tutorial on Storing Images in Database http://codewalkers.com/tutorials/35/2.html good luck.. BTW cool flash work :) - Original Message - From: - [ Paul Ferrie ] - [EMAIL PROTECTED] To: Awlad Hussain [EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 12:05 PM Subject: Re: [PHP] what can i store in the DB I did use www.mysql.com Search querystoring images, store image, image storing it didnt come back with very much, so the post on php was my last resort. thanx for the quick reply Paul - Original Message - From: Awlad Hussain [EMAIL PROTECTED] To: [EMAIL PROTECTED]; - [ Paul Ferrie ] - [EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 11:56 AM Subject: Re: [PHP] what can i store in the DB You can store image as BLOB in DB I would recomend you download mysql manual from www.mysql.com, very useful awlad - Original Message - From: - [ Paul Ferrie ] - [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 11:46 AM Subject: [PHP] what can i store in the DB Hi guys, I am not really an expert in this I just learn what I need to know when I need to know it. I am building a flash tutorials section for my site http://www.innovativedesigns.org.uk The section is my first real attempt at using php+mysql without having to check the books or reference files :) Anyway here is my question: Can images be stored in the DB I am thinking no. This would me a long way round what I am trying to do. cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] prevent modifying querystring
for example i have form with a dropdown selection as shown below. FORM action=action.php SELECT name=total OPTION1/OPTION OPTION2/OPTION OPTION3/OPTION OPTION4/OPTION OPTION5/OPTION /SELECT /FORM Just say I have a function to generate form fields based on the total variable from above... so function generate($total){ for ($total = 1; $i = $total; $i++) { print input type=text name=$total\n; } } how do you prevent someone modifying querystring like: page.php?total=100 and hitting ENTER Now rather than 5 options you have 120 options... How do you tackle this problem?? any suggestion? Thanks Awlad ___ Sheridan Phoenix Company The Business Centre Kimpton Road Luton Bedfordshire LU2 0LB Email: [EMAIL PROTECTED] Phone: 01582 522 330 Fax:01582 522 328 ___ This electronic transmission is strictly confidential and intended solely for the addressee. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission. If you have received this transmission in error it would be helpful if you could notify The Sheridan Phoenix Company Ltd as soon as possible. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of The Sheridan Phoenix Company Ltd.
Re: [PHP] prevent modifying querystring
Thanks for your recommendations, what if they use page.php?$_POST[$total]? instead of $toal?? wouldn't the outcome be the same? is there good article on this subject? I think this is quite important in developing secure application, I have googled but no luck Thanks again awlad - Original Message - From: Chris Hayes [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 3:34 PM Subject: Re: [PHP] prevent modifying querystring 1st step: read out form results from $_POST['total'] (possible since PHP 4.10), not from $total. Variables added to the url will not be in the $_POST array but in $_GET. When reading the form result, make sure the referering page is from your own site, or else they can simply make their own form. To increase security, add a hidden field with some random value to the form, and put the same value in a session variable. Only accept the form result when both match. Some even add a timer. At 16:25 11-6-03, you wrote: for example i have form with a dropdown selection as shown below. FORM action=action.php SELECT name=total OPTION1/OPTION OPTION2/OPTION OPTION3/OPTION OPTION4/OPTION OPTION5/OPTION /SELECT /FORM Just say I have a function to generate form fields based on the total variable from above... so function generate($total){ for ($total = 1; $i = $total; $i++) { print input type=text name=$total\n; } } how do you prevent someone modifying querystring like: page.php?total=100 and hitting ENTER Now rather than 5 options you have 120 options... How do you tackle this problem?? any suggestion? Thanks Awlad ___ Sheridan Phoenix Company The Business Centre Kimpton Road Luton Bedfordshire LU2 0LB Email: [EMAIL PROTECTED] Phone: 01582 522 330 Fax:01582 522 328 ___ This electronic transmission is strictly confidential and intended solely for the addressee. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission. If you have received this transmission in error it would be helpful if you could notify The Sheridan Phoenix Company Ltd as soon as possible. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of The Sheridan Phoenix Company Ltd. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and flash chat program
How about using session??? - Original Message - From: Russell P Jones [EMAIL PROTECTED] To: Matt Palermo [EMAIL PROTECTED] Cc: 'PHP General' [EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 3:11 PM Subject: RE: [PHP] php and flash chat program The best way I can see to answer this would be to use the body onUnload=function() in javascript and just have that function run what you need. You could have php put the screen name into some variable in the javascript and then onUnload (the user either closes the browser or changes the page) run the function that tells whatever your delete username program is to remove that user from the list -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Good Hosting company
anyone knows any good cheap hosting company in UK/US?? with good support. Many thanks awlad ___ Sheridan Phoenix Company The Business Centre Kimpton Road Luton Bedfordshire LU2 0LB Email: [EMAIL PROTECTED] Phone: 01582 522 330 Fax:01582 522 328 ___ This electronic transmission is strictly confidential and intended solely for the addressee. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission. If you have received this transmission in error it would be helpful if you could notify The Sheridan Phoenix Company Ltd as soon as possible. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of The Sheridan Phoenix Company Ltd.
[PHP] categorise list
I am dispalying data from mysql database using the codes below: $while($row=mysql_fetch_array($result)) { echo $row[name]; } How can i format the above data in this format as shown below? in alphabetical order A ---click to go up Apple Armchair B ---click to go up Basket Baseball C ---click to go up Car and so on any suggestions?? Many thanks, awlad ___ Sheridan Phoenix Company The Business Centre Kimpton Road Luton Bedfordshire LU2 0LB Email: [EMAIL PROTECTED] Phone: 01582 522 330 Fax:01582 522 328 ___ This electronic transmission is strictly confidential and intended solely for the addressee. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission. If you have received this transmission in error it would be helpful if you could notify The Sheridan Phoenix Company Ltd as soon as possible. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of The Sheridan Phoenix Company Ltd.
[PHP] $HTTP_POST_VARS
Whats the advantage (or shall i say disadvantage )of passing form variables to a function like shown below: function function_name($var,$var1,$var2) { } rather than passing the $HTTP_POST_VARS array to the fuction like: function function_name($HTTP_POST_VARS) { } Is any better than other? or both the same? awlad
[PHP] Mutile select search engine
I have a advance search page, similar to this http://www.shaadi.com/partner_search/matrimonial_search/advancedmarriagesearch.php (mine on local server). I can create the sql statement for it ...the only problem i have is passing the all variables from page to page in record navigation..(I use function for the record navigation) for example if the query retrive 20 records and i am dispalying 10 records per page... when i click on next page.. the search result would be completely different from the first page.. :( Has anyone done similar search page?? any help would be greatly appriciated... and many thanks for responding to my early question. Regards, Awlad ___ Sheridan Phoenix Company The Business Centre Kimpton Road Luton Bedfordshire LU2 0LB Email: [EMAIL PROTECTED] Phone: 01582 522 330 Fax:01582 522 328 ___ This electronic transmission is strictly confidential and intended solely for the addressee. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission. If you have received this transmission in error it would be helpful if you could notify The Sheridan Phoenix Company Ltd as soon as possible. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of The Sheridan Phoenix Company Ltd.
[PHP] Creating alphabetical index links
How i do create alphabetical index links with data in a table? for example i have table like this: category - apple bread cornflakes doughnut egg with the above records i want to create alphabetical links like click on the letter to check its listing [A] - [B] - [C] - [D] - [E] so if someone clicks on [B] the link should take them to bread section. Many thanks awlad ___ Sheridan Phoenix Company The Business Centre Kimpton Road Luton Bedfordshire LU2 0LB Email: [EMAIL PROTECTED] Phone: 01582 522 330 Fax:01582 522 328 ___ This electronic transmission is strictly confidential and intended solely for the addressee. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission. If you have received this transmission in error it would be helpful if you could notify The Sheridan Phoenix Company Ltd as soon as possible. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of The Sheridan Phoenix Company Ltd.
[PHP] Array
What wrong with this code? i am tryin to create an array from the while loop, but i only get one value :( while($rowmenu = mysql_fetch_array($resultmenu)){ while (list($k, $v) = each ($rowmenu)) { $val[$k] = $v; } } Basically the $rowmenu returns more than one records.. and i want to put the keys and vlaues of $rowmenu into an array any idea?? awlad ___ Sheridan Phoenix Company The Business Centre Kimpton Road Luton Bedfordshire LU2 0LB Email: [EMAIL PROTECTED] Phone: 01582 522 330 Fax:01582 522 328 ___ This electronic transmission is strictly confidential and intended solely for the addressee. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission. If you have received this transmission in error it would be helpful if you could notify The Sheridan Phoenix Company Ltd as soon as possible. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of The Sheridan Phoenix Company Ltd.
Re: [PHP] How can I check form variables in $_POST to make sure they are theright format?
whats the different between currency and number??? aren't they both number? are you trying to check if the number format is in currency like 2 decimal place or something?? - Original Message - From: Dan Anderson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 06, 2003 4:45 PM Subject: [PHP] How can I check form variables in $_POST to make sure they are theright format? Is there a way to check form variables provided in $_POST once a user submits the form to make sure they are currency or numbers? Thanks, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best open source banner advertising application
John, Since you have used both systems, would you kindly share with us whats pro cons of them both systems?? I have used phpadsnew and like their user interface.. very neat.. not much sure about oasis. Thanks - Original Message - From: John Wards [EMAIL PROTECTED] To: Randum Ian [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 2:50 PM Subject: Re: [PHP] Best open source banner advertising application On Wednesday 04 Jun 2003 2:41 pm, Randum Ian wrote: The best one without a shadow of a doubt would be phpnewads. I would have to disagree on that one ;-) http://oasis.sourceforge.net/ It wipes the floor with phpadsnew, I have used both. But it can be a bit overkill if you are only a small site. Cheers John Wards SportNetwork.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best open source banner advertising application
Thanks John :) - Original Message - From: John Wards [EMAIL PROTECTED] To: Awlad Hussain [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 3:25 PM Subject: Re: [PHP] Best open source banner advertising application On Wednesday 04 Jun 2003 3:07 pm, Awlad Hussain wrote: Since you have used both systems, would you kindly share with us whats pro cons of them both systems?? I have used phpadsnew and like their user interface.. very neat.. not much sure about oasis. oooh errr put on the sport... Pros for PhpAdsNew: Simple to install Simpleish admin area. Runs on anything that runs apache/php Pros For Oasis Very powerfull and intergrates great into our major website (which phpadsnew didn't) Fast as bits. More features than phpadsnew (traffic shaping for one which is rather handy) Pdf reports (Not sure if phpadsnew does that but I can't think of it.) Can be set up to cluster so has the ablility to handle unlimited page views. 120+ page manual Cons for Phpadsnew. To simple... Slows our system down due to the number of requests we were pushing to it. We do 150-200 thousand page views a day but when running phpadsnew we had about 4 or 5 different advert loactions so it was producing about 1 million requests a day for adverts. Cons for Oasis. Install not for the wary Need root access Has trouble with FreeBSD shared memory (Took our server down a few times so we had to stop using it, we are now on linux and are busy installing it again) 120+ page manual HTH Cheers John Wards SportNetwork.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cookies - recomendation please
PHP Manual has good section on cookie... have you tried the manual? good luck awlad - Original Message - From: Ryan A [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 01, 2003 1:56 PM Subject: [PHP] Cookies - recomendation please Hi everyone, Some time back I had no idea about sessions and I asked this list to give me a few links on the web where i can learn about them, thanks to you guys I understand sessions and use them without any problem. Now I have the same problem with cookies, I of course first went to our friend (google) and asked him about cookies in PHP, the problem is I got a hell of a lot of answers from himwhich one is good? I am a total newbie when it comes to cookies so can you recomend any one (or two) URL/s which gives a step by step totural on using cookies in PHP? hopefully in baby steps if cookies are too complicated. Thanks, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: About Guest Book\'s messages....
using style=TABLE-LAYOUT:fixed does not wrap the text - Original Message - From: hui [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 3:13 PM Subject: [PHP] Re: About Guest Book\'s messages do it in your html code, you use a table for the message text? add this: table width=460 style=TABLE-LAYOUT:fixed style=TABLE-LAYOUT:fixed it works. :) Fongming [EMAIL PROTECTED] дÈëÓʼþ news:[EMAIL PROTECTED] Hi, Sir: There may be someone leave a message like following: U and it expand the width of the table on my web page and make pages ugly I used wordwrap($word,40,\n,1) to prevent it, but my system is BIG5 ,two bytes, Sometimes this method would destroy the structure of the two-bytes word. Any one has good ideas and could help me with that ? Thanks --- Fongming from Taiwan. -- ¡»From: ¦¹«H¬O¥Ñ®ç¤p¹q¤l¶l¥ó1.5ª©©Òµo¥X... http://fonn.fongming.idv.tw [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP redirect
Try this header(LOCATION: page2go.php); - Original Message - From: Angelo Zanetti [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 29, 2003 9:46 AM Subject: [PHP] PHP redirect Hi guys what is the function in PHP for directing a php page?? thanx in advance Angelo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading entire directory, with or without compression ...
I found this link that has a stand alone java application that will allow to to upload a folder... if that what you want? or you want it to be embedded in your webpage? http://support.softartisans.com/docs/JFile/prog_g_recursive.htm hope you find it useful -awlad - Original Message - From: David T-G [EMAIL PROTECTED] To: PHP General list [EMAIL PROTECTED] Cc: Kenn Murrah [EMAIL PROTECTED] Sent: Thursday, April 03, 2003 11:37 AM Subject: Re: [PHP] uploading entire directory, with or without compression ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php.ini doesn't exit
I think php.ini file must exist.. otherwise php will not work. - Original Message - From: Javier Carreras [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 11:01 AM Subject: [PHP] Php.ini doesn't exit Hi all, Where does PHP get its settings if php.ini file doesn't exist? BTW- I want to enable sockets that are not enabled. Could I do that without creating a php.ini file? Regards, Javi. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] last questions
someone has asked the same question today about validating email, do a search i'll find the reply. - Original Message - From: Haseeb Iqbal [EMAIL PROTECTED] To: PHP General list [EMAIL PROTECTED] Sent: Friday, March 28, 2003 4:02 AM Subject: [PHP] last questions thanx to all those who replied to my previous question. 1 more question.i need help with reqular expressions.i want to check valid (email) usernanes for my mail server .i.e. Qmail. any help welcome. thanx in advance Haseeb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] can i ask?
These lines already exist in httpd.conf file, you may need to change the path or uncomment them. - Original Message - From: M.N. Ikhwan S. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 12:49 AM Subject: [PHP] can i ask? ScriptAlias /php/ c:/php/ AddType application/x-httpd-php .php Action application/x-httpd-php /php/php.exe i'm using apache 2.0 as my web server. and i'm about to ask these question, where am i going to put these three lines? under what line in httpd.conf? ikhwan - Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Formatting code.
Good article on coding standard at www.phpfreaks.net Is there any documents on how code should be layed out? -- Philip J. Newman. Head Developer [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dynamic Form
use javascript - Original Message - From: Keven Jones [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 24, 2003 4:32 PM Subject: [PHP] Dynamic Form Hi, Can someone tell me if I can use php to accomplish the following: I would like to create a form that can: A. Total the sum of a certain number of numerical fields, Before the user clicks submit B. Automatically fill in sections of a form based on selections made by the user. As an example, if my user selects option A, then a certain numerical code is filled into a given section of the form. We are just trying to make the forms user friendly. Can I do this in php or will it require javascript as well? Thanks _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Built in source encode function..
I think PHP should have a built in ability tp encode source code, so if someone wish to protect their source code they should be able to. I hear lot of people worried about other people nicking their codes. But i also think this could kill the idea of open source. What do you guys think? -awlad
[PHP] Cookie or Session??
Managing user login Whats the best option to use.. cookie?? or session?? Currently i am using cookies and sometime user complain they can't login, what would you suggest? -awlad
Re: [PHP] Cookie or Session??
Thanks Mike, I think using session will solve the problem of some user having difficulties in loign. - Original Message - From: Mike Brum [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 21, 2003 4:12 PM Subject: RE: [PHP] Cookie or Session?? It really depends on what you want to do. Cookies are client-side information and thus you can run into issues where clients don't allow cookies, have cookie-blocking apps or have outdated software that doesn't support them (though the latter continues to become less of an option as time passes). Sessions are server-side information that allows you a lot more control of the information and allows better manipulation of it. PHP has really nice session management and makes using them quite painless. The only downside really is that it adds more load to your servers. If you have a machine that's not under insane load all the time, you might want to give sessions a try. Once everything's configged properly (which shouldn't be hard at all - and it might even be turned on already!), to get a user to log in, all you'll need to do is perform the DB password authentication and then pass the session information from script to script. Good luck. -Mike -Original Message- From: Awlad Hussain [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 11:00 AM To: [EMAIL PROTECTED] Subject: [PHP] Cookie or Session?? Managing user login Whats the best option to use.. cookie?? or session?? Currently i am using cookies and sometime user complain they can't login, what would you suggest? -awlad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Random array values from associative
I have an associative like array[name]=hello; I am trying to get two random values from the array, the key name and the value, but using the codes below from the PHP manual i am getting the inex key value rather than the name. $rand_keys = array_rand ($input, 2); print $input[$rand_keys[0]].\n; print $input[$rand_keys[1]].\n; so instead of getting two random values like key=name value=hello i am getting key=0 and value=hello. How do i get the name of the key not the index number? Thanks in advance -awlad
Re: [PHP] Random array values from associative
Thanks for your reply, I now have only the keys but I need both keys and the value. ?? any suggestions? - Original Message - From: Ernest E Vogelsinger [EMAIL PROTECTED] To: Awlad Hussain [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, March 18, 2003 11:45 AM Subject: Re: [PHP] Random array values from associative At 12:40 18.03.2003, Awlad Hussain said: [snip] I have an associative like array[name]=hello; I am trying to get two random values from the array, the key name and the value, but using the codes below from the PHP manual i am getting the inex key value rather than the name. $rand_keys = array_rand ($input, 2); print $input[$rand_keys[0]].\n; print $input[$rand_keys[1]].\n; so instead of getting two random values like key=name value=hello i am getting key=0 and value=hello. [snip] array_rand only operates on the value side of an array. To retrieve random keys from an associative array, use array_keys() of the assoc. array as input rather that the assoc. array itself: $rand_keys = array_rand (array_keys($input), 2); print $input[$rand_keys[0]].\n; print $input[$rand_keys[1]].\n; -- O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] String Replace
I have a string with underscore in the middle.. like This_That which function do i use to replace the _ with space? eg to This That the string is in a variable.. I know its really simple but just don't know which function to use. any suggestion? -awlad
Fw: [PHP] newbie
http://www.phpfreaks.com http://www.phpbilder.com Best way to learn is to start writting small program like guestbook, if you get stuck just ask :) Use the PHP manual too... -awlad - Original Message - From: Robin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 11, 2003 8:01 AM Subject: [PHP] newbie Hello Please could somebody point me in the right direction for learning about PHP? Any links would be greatfully appreciated! Thanks Robin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] JAVASCRIPT
i think you're not calling the the javascript validation function when you're submiting the form you need to call the function like this: form method=post action=registration1.php onsubmit=return Field_Validator(this) try this code below, hope this will help -awlad html body script Language=JavaScript !-- function Field_Validator(form) { if (form.name.value == ) { alert(Please fill in the name field.); form.name.focus(); return (false); } return (true); } //-- /script form method=post action=where_ever_you_want.htm onsubmit=return Blank_TextField_Validator(this) p name br input type=text name=name br input type=submit value=Submit /form /body - Original Message - From: Diksha Neel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 07, 2003 12:33 PM Subject: [PHP] JAVASCRIPT dear all, hi! in my php script registration1.php, i have written javascript for form validation i.e. for checking if the mandatory fields are filled correctly or not. but on clicking the submit button, i get connected to the next page without the form getting validated!! i guess i have made a silly mistake somewhere but am not able to figure out where and what. attaching registration1.php. please help. thanks. regards, diksha. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] attaching php-action to form-button
did you try to include them as hidden variables? if not, try including them as hidden vars awlad - Original Message - From: Michiel van Heusden [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 07, 2003 11:59 AM Subject: [PHP] attaching php-action to form-button my problem is this I have some variables defined which i'm sending through get form name=form1 method=get action=result.php // input's etc /form now I have $var1 defined in my PHP and I want to send it through that GET as well is there a way to do this? so it's not a user-defined but php-defined var, which i need to send through the form any help appreciated -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] JAVASCRIPT
Diksha, please don't post the same question many times, doing this may reduce the change of getting an answer.. -awlad - Original Message - From: Diksha Neel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 07, 2003 12:45 PM Subject: [PHP] JAVASCRIPT dear all, hi! in my php script registration1.php, i have written javascript for form validation i.e. for checking if the mandatory fields are filled correctly or not. but on clicking the submit button, i get connected to the next page without the form getting validated!! i guess i have made a silly mistake somewhere but am not able to figure out where and what. attaching registration1.php. i tried attaching this page a couple of time but it got delivered with the attachment! i am very sorry for the inconvenience caused to you all. please help. thanks. regards, diksha. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] javascript
Yeah, before sending it. Just wondering what the advantage is in validating before sending. so that the user does not submit any crap.. good example is email validation :) awlad - Original Message - From: Liam Gibbs [EMAIL PROTECTED] To: php list [EMAIL PROTECTED] Sent: Friday, March 07, 2003 1:55 PM Subject: Re: [PHP] javascript If you want to validate form data before sending it, javascript is the choise. Yeah, before sending it. Just wondering what the advantage is in validating before sending. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] creating class
I am very new to class, trying out this class, but it doesn't seem to display anything? what i am donig wrong? ?php class site_init { var $midgard; // array function site_init() { echo $this-midgard[host]; } ? i called this class by $new_midgard = site_init; it does not seem to print anything.. why? anyone any idea? awlad
[PHP] assign gobal values in class?
can you assign global value in a class like: class test{ global $arr; } anyone?
Re: [PHP] convert .asp page .php
http://www.asp2php.com/ - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:42 AM Subject: [PHP] convert .asp page .php Hi all, I joined your list hoping to find-out how to convert a .asp page to .php I do realize that I am off the mark on this and there is much to learn in this area. Perhaps one of you could point me to a place where I get small sample pages in php so that I can get started with .php in a simple way. My problems are: 1 I want to have a page which will send me emails You know, a kind of form where one types the message in and then click send and off it goes to an specified email address 2 I need the below page which is mirrored from a Win environment to be converted to a .php page on my Linux 8.0 system Well If this is asking for too much, then please forgive this post. regards Metta script LANGUAGE=javascript !-- function ValidateFields() { if (document.frmSubscription.cboSalutation.value==) { alert(Select Saluation); document.frmSubscription.cboSalutation.focus(); return false; } if (document.frmSubscription.txtName.value==) { alert(Enter Name); document.frmSubscription.txtName.focus(); return false; } if (document.frmSubscription.txtAddress.value==) { alert(Enter Address); document.frmSubscription.txtAddress.focus(); return false; } if (document.frmSubscription.txtCity.value==) { alert(Enter City Name); document.frmSubscription.txtCity.focus(); return false; } if (document.frmSubscription.txtCountry.value==) { alert(Enter Country Name); document.frmSubscription.txtCountry.focus(); return false; } if (document.frmSubscription.txtEmail.value==) { alert(Enter Email Address); document.frmSubscription.txtEmail.focus(); return false; } else { var intPos; intPos = frmSubscription.txtEmail.value.search(/^[a-z0-9](\.\w|\w)[EMAIL PROTECTED](\.\w|\w) *\.[a-z]{2,3}$/i); if(intPos==-1) { alert(Enter Valid Email Address); document.frmSubscription.txtEmail.focus(); return false; } } frmSubscription.SubClicked.value=Ok; return true; } //-- /script HTML HEAD META NAME=GENERATOR Content=Microsoft FrontPage 4.0 TITLESubscription Form/TITLE SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript !-- function radMember_onclick() { frmSubscription.radAM(0).disabled=true; frmSubscription.radAM(1).disabled=true; } //-- /SCRIPT /HEAD BODY pfont color=#FF8000 size=5 face=ArialSubscription Form/font/p!--form method=post action=Subscription.asp name=frmSubscription LANGUAGE=javascript onsubmit=return ValidateFields()-- form method=post action=Subscription.asp name=frmSubscription LANGUAGE=javascript onsubmit=return ValidateFields() input type=hidden name=SubClicked table border=0 cellpadding=0 cellspacing=0 width=540 height=900 tr td width=25% height=10/td td width=25% height=10/td td width=25% height=10/td td width=25% height=10 font face=Verdana size=1Address all correspondence to:/fontbr font face=Verdana size=1Buddhist Publication Societybr 54, Sangharaja Mawathabr Kandy,br Sri Lanka/font/p /td /tr tr td width=100% height=22 colspan=4HR /td /tr tr td width=100% colspan=4 height=34 font face=Verdana size=2Annual subscription (valid for one calendar year): Air Mail U.S. $20.00; Pounds Sterling 12.50./font/td /trtr td width=100% colspan=4 height=10 tr td width=100% colspan=4 height=66font face=Verdana size=2 Remittances may be sent by personal cheque, international money order or bank-draft made payable to: Buddhist Publication Society. Please mark all cheques etc.:br A/C Payee Only, Hongkong amp; Shanghai Banking Corporation Ltd. Kandy. Account number 002-017689-025./font/td /tr tr td width=100% colspan=4 height=10/td /tr tr td width=100% colspan=4 height=34font face=Verdana size=2Members will receive BPS Book Publications and News once in every six months as long as membership remains valid./font/td /tr tr td width=100% colspan=4 height=10 tr td width=100% colspan=4 height=34font face=Verdana size=2A discount of 10% is given to members (on BPS titles only). Membership number should be quoted when requesting a discount./font/td /tr tr td width=100% colspan=4 height=10/td /tr tr td width=100% colspan=4 height=10 font size=4 /fontFONT face=Verdanafont size=2The fields in * are mandatory!/font/FONT /td /tr tr td width=100% colspan=4 height=10 HR /td /tr tr td width=25% height=22font face=Verdana size=2Salutation*/font/td td width=75% height=22 colspan=3font face=Verdana select name=cboSalutation option value = selected option value=MrMr./option option value=MsMs./option option value=MrsMrs./option
[PHP] Automatic Table Creation
I have a mysql table containing about 100 record, alphabetically ordered. How would i display them in browser in a 3 columns, doesn't matter how long the rows is as the number of records will grow in the database table. the records should be in alphabetically order, for example: aaa bbbaccca aab cccb aac bbbc aad bbbdcccd any idea anyone? awlad ___ Sheridan Phoenix Company The Business Centre Kimpton Road Luton Bedfordshire LU2 0LB Email: [EMAIL PROTECTED] Phone: 01582 522 330 Fax:01582 522 328 ___ This electronic transmission is strictly confidential and intended solely for the addressee. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission. If you have received this transmission in error it would be helpful if you could notify The Sheridan Phoenix Company Ltd as soon as possible. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of The Sheridan Phoenix Company Ltd.
Re: [PHP] Automatic Table Creation
Thanks Jonathan, I'll have a go with your codes. Thanks very much awlad - Original Message - From: Jonathan Pitcher [EMAIL PROTECTED] To: Awlad Hussain [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, March 03, 2003 4:17 PM Subject: Re: [PHP] Automatic Table Creation Awlad, I would guess you are trying to create an HTML table to display the records. $Row = The results returned from. mysql_fetch_array(). $Total = count($Row); $TotalInEachRow = round(($Total/3)); if (($TotalInEachRow * 3) $Total) { $TotalInEachRow ++; // Planning for the Remainder items. } $HTML = TABLE; // HTML string that holds the table $ColumnCount = 0; // For knowing the Number of Columns. for ($C=0; $C$Total; $C++) { if ($ColumnCount == 0) { $HTML .= TR; } $HTML .= TD.$Row[$C][DatabaseFeildName]./TD: $ColumnCount ++; if ($ColumnCount == 3) { $HTML ./TR; $ColumnCount = 0; } } if ($ColumnCount 0) { for ($C=$ColumnCount; $C=3; $C++) { $HTML .= TDnbsp;/TD; } $HTML .= /TR; } $HTML .= /TABLE: That should do it for you. I typed this code directly into the email so be forwarned about copy and pasting it. Hope this helped. Jonathan Pitcher On Monday, March 3, 2003, at 08:58 AM, Awlad Hussain wrote: I have a mysql table containing about 100 record, alphabetically ordered. How would i display them in browser in a 3 columns, doesn't matter how long the rows is as the number of records will grow in the database table. the records should be in alphabetically order, for example: aaa bbbaccca aab cccb aac bbbc aad bbbdcccd any idea anyone? awlad ___ Sheridan Phoenix Company The Business Centre Kimpton Road Luton Bedfordshire LU2 0LB Email: [EMAIL PROTECTED] Phone: 01582 522 330 Fax:01582 522 328 ___ This electronic transmission is strictly confidential and intended solely for the addressee. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission. If you have received this transmission in error it would be helpful if you could notify The Sheridan Phoenix Company Ltd as soon as possible. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of The Sheridan Phoenix Company Ltd. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Capitalising Personal Names
Have a javascript alert like Are you 100% sure you haven't typed your name wrong :) Other option is to create name dictionary then compare.. - Original Message - From: Joshua Moore-Oliva [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 28, 2003 11:35 AM Subject: Re: [PHP] Capitalising Personal Names What is someone spells their name Desilva? On February 28, 2003 06:21 am, Justin French wrote: What about DeSilva And McSomething? Justin on 28/02/03 10:11 PM, Danny Shepherd ([EMAIL PROTECTED]) wrote: Hi, Well it's hardly rocket science - a flick through the manual and I came up with : $name=ucwords(strtolower($name)); HTH Danny. - Original Message - From: Geoff Caplan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 28, 2003 10:31 AM Subject: [PHP] Capitalising Personal Names Hi folks, I need to clean up the capitalisation of user-entered personal names. Once you start thinking about it, you realise it is a non-trivial issue, but previous discussions on the list presented only very partial solutions. In Perl, there are Cpan modules such as namecase and nameparse which handle this quite well. Does anyone have anything similar in PHP? Thanks -- Geoff Caplan Advantae Ltd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cookie problemes (solved with javascript)
Thanks Kale, I'll have a go with your code - Original Message - From: kale [EMAIL PROTECTED] To: Php. Net [EMAIL PROTECTED] Cc: 'Awlad Hussain' [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 9:29 AM Subject: RE: [PHP] cookie problemes (solved with javascript) I not a expert in javascript but this code is working. I guess it is easy to change some line of code to work for your neads. Kale // kale's code _ ? $ID = kale; $n_sessid = $ID._Sessid; session_start(); $sessid = session_id(); if(isset($Read)){ print $HTTP_COOKIE_VARS[$n_sessid]; } ? script language=JavaScript function setCookie(name, value) { var the_name = name; var the_value = value; var the_cookie = the_name + = + escape(the_value); var the_date = new Date(December 31, 2050); var the_cookie_date = the_date.toGMTString(); the_cookie = the_cookie + ;expires= + the_cookie_date; document.cookie = the_cookie; alert(Thanks, now go to the next page.); } /script form name=insertCookie method=post input type=submit name=Cookie value=Cookie onClick=setCookie('?print $n_sessid;?', '?print $sessid;?') input type=submit name=Read value=Read /form __ // end kale's code __ -Original Message- From: Awlad Hussain [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 11:15 AM To: kale Subject: Re: [PHP] cookie problemes Hi Kale, I have the same problem with cookie, i would appericiate if you can share the java script code you used to create the cookie and how it solved the problem. -awlad - Original Message - From: kale [EMAIL PROTECTED] To: Php. Net [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 7:59 AM Subject: RE: [PHP] cookie problemes The clock is ok. I write cookie with javascript and read with php. For moment is the best solution i have. In future i hope to resolve this problem and i find solution i post it here. Thanks for help. kale -Original Message- From: Gonzo [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 8:11 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] cookie problemes $path = /; $domain = .mydomain.ro; And in my cookie folder i find a cookie named: [EMAIL PROTECTED] But other computer (with problems) i don't have any cookie with same name. And if i reload the page and print $HTTP_COOKIE_VARS[$n_sessid] it's nothing. I have 12 computers and 10 are ok. Check the clocks on the 2 machines that do not have the cookies. Gonzo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] selection in form-field
PHP is a server side language, you need a DHTML web based editor.. try this exellent FREE editor http://www.interactivetools.com/products/htmlarea/ - Original Message - From: Michiel van Heusden [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 21, 2003 9:46 AM Subject: [PHP] selection in form-field i have quite an easy question: is there a way in PHP to trace the selection in a certain form-field? i need this for building a simple html-edit application, which allows a user to select his/her text within a field, and then click 'bold' for instance..the PHP should insert b before the selection, and /b after the selection. 1) should i use PHP or is this a typical JavaScript-thing? (or a combination?) 2) if you could help with a function or small script I would me most grateful grace michiel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: smarty vs. patTemplate vs. inclu
David, Is there any point using smarty on s small site? eg: website consists of 6/8 pages? does it matter on the size of the site? -awlad - Original Message - From: David Eisenhart [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 21, 2003 11:31 AM Subject: [PHP] Re: smarty vs. patTemplate vs. inclu I have never used patTemplate but from my experience Smarty is both fast and robust (I now would not consider building a site without it) Even given your scenario I would recommend that you at least consider using a templating engine. Smarty is very quick and easy to set up so just have a play! David David Caplan [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I'm designing a site with about 100 different pages. I'm debating whether to use a template mechanism such as smarty or patTemplate vs just creating pages and including the body templates based on the url parameters. I realize you get a layer of abstraction using the template mechanisms, but with the scheme that I have in mind the users will only be editing the pages that are marked body_foo.php. These body pages would be basically pure html, so they can't really screw anything up in the php logic. They would be called off an index.php that has a bunch of includes, header.php, body.php, footer.php etc, this page would be off limits to the user for editing. From what I understand, both smarty and patTemplate are popular and both have supporters and detractors, is one template significantly faster or more stable than the other? If I just use includes, am I gonna run into problems, other than the loss of elegance and some abstraction that a template system might offer. My site will have approx 100 pages, with a peak of 600,000 hits per day. thanks for your help, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: smarty vs. patTemplate vs. inclu
Thanks guys I'll have ago with smarty, and let you guys know what I think :) Have a nice day -awlad - Original Message - From: rush [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 21, 2003 2:18 PM Subject: Re: [PHP] Re: smarty vs. patTemplate vs. inclu Awlad Hussain [EMAIL PROTECTED] wrote in message 00d801c2d9a7$05c5f360$0200a8c0@GATEWAY">news:00d801c2d9a7$05c5f360$0200a8c0@GATEWAY... David, Is there any point using smarty on s small site? eg: website consists of 6/8 pages? If you are allready fluent with your template engine, yeah, why not, especially if you have some more complex logic on those 6/8 pages. I have used TemplateTamer on such sites. But if you need to learn engine just for that site, that can be overkill, but then again, you can use that knowledge in the future for some other sites. rush -- http://www.templatetamer.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] small ads system
go to http://www.hotscripts.com and do a search on classifieds under PHP codes -awlad - Original Message - From: Nenad Djordjevic [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 21, 2003 2:35 PM Subject: [PHP] small ads system Hello, I need web application (PHP/MySQL) for small ads (personal ads, that is advertisements to buy and sell cars, houses etc). Does anybody can give me useful hint. Best regards, Nenad Djordjevic mailto:[EMAIL PROTECTED] Diyomi Soft http://www.diyomisoft.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php ecommers site
try this site http://www.oscommerce.com/ you might have to add additional functions to customize it. - Original Message - From: Chris Knipe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 20, 2003 2:06 AM Subject: [PHP] php ecommers site Lo all, Is there any good already developed PHP based commerce solutions out there? I'm preferably looking for something with catalogues (product pics, descriptions, ratings, buyer comments, etc), online payment options, xml support (to sell via partners for example), etc etc etc. Thanks, -- me -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] online tutorial
http://www.devshed.com http://www.phpfreaks.com Search Google - PHP Tutorials - Original Message - From: DIKSHA NEEL [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 11:50 AM Subject: [PHP] online tutorial dear all, i am a final year engineering student and have started studying PHP since last 10 days. can anybody suggest some good online tutorial for mastering PHP? regards, diksha. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ankord php text editor
Tell us what the url of Ankord is. I use HtmlKit (http://www.htmlkit.com) its the best FREE editor available out there. :) -awlad - Original Message - From: Edward Peloke [EMAIL PROTECTED] To: Php-General@Lists. Php. Net [EMAIL PROTECTED] Sent: Tuesday, February 18, 2003 3:46 PM Subject: [PHP] ankord php text editor anyone use the php expert editor from Ankord? If so, what do you think? Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: File not rewritable - why? Help needed.
try CHMOD 777 - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 12, 2003 9:22 AM Subject: [PHP] Re: File not rewritable - why? Help needed. thank you for the reply Chmod was just a try from my side to get it work. I tried CHMOD 0777, and everything else, too. Didn't work. Could it be that the server doesn't allow writings at all? As you see, I am a newbie in these things. Remember to write to a file PHP (the user nobody or httpd) also needs Read and eXecute permisions on all the directories from the root all the way to the directory contaning the file. How do I give those permissions? What I try next, is the same PHP in a couple of another servers... Yours, Paul Dunkel -- [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is mail() broken in 4.3.0 when it comes to BCC?
From the PHP manual, hope this will help. /* To send HTML mail, you can set the Content-type header. */ $headers = MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; /* additional headers */ $headers .= From: Birthday Reminder [EMAIL PROTECTED]\r\n; $headers .= Cc: [EMAIL PROTECTED]\r\n; $headers .= Bcc: [EMAIL PROTECTED]\r\n; /* and now mail it */ mail($to, $subject, $message, $headers); - Original Message - From: Mark Virtue [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 10, 2003 1:46 PM Subject: Re: [PHP] Is mail() broken in 4.3.0 when it comes to BCC? Your suggestion didn't work (but thanks anyway), but I tried removing the space from after the Bcc: (before the address) and it started working! So this line works: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, Bcc:[EMAIL PROTECTED]); but this one doesn't mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, Bcc: [EMAIL PROTECTED]); It used to be fine before 4.3.0. Francesco Leonetti [EMAIL PROTECTED] wrote in message 008101c2d108$f75ff600$0100a8c0@fleo">news:008101c2d108$f75ff600$0100a8c0@fleo... Try this: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, From: [EMAIL PROTECTED]\nBCC: [EMAIL PROTECTED]); - Original Message - From: Mark Virtue [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 10, 2003 2:18 PM Subject: [PHP] Is mail() broken in 4.3.0 when it comes to BCC? This line works as expected: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, From: [EMAIL PROTECTED]); whereas if I change it to this: mail([EMAIL PROTECTED], My Subject, Line 1\nLine 2, Bcc: [EMAIL PROTECTED]); the mail never gets sent! I'm running 4.3.0 on Windows XP. Any thoughts? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php