Re: AW: [PHP] how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS?
On Sun, Nov 20, 2005 at 04:12:05PM +1300, Jasper Bryant-Greene wrote: xkorakidis wrote: Webmaster, thanks very much but I think it would be safer to do that by post, not by get. Furthermore, if I use indivudual files The difference between POST and GET lies in the semantics -- POST represents something changing on the server, e.g. updating a database field, and allows the browser to warn the user if they try to refresh. GET represents nothing of importance changing on the server, e.g. performing a search on the database, and can safely be repeated. Another good reason to use POST to modify data, consider the link: http://example.com/posts.php?postid=1action=delete If googlebot comes across your page containing a list of all your posts, with a link like that, you just might wake up one morning wondering why all your posts are gone. Curt. -- cat .signature: No such file or directory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP] how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS?
That's right Curt, this is the reason I characterised sending parameters via url not safe! But in case of selecting data, I think there is no problem to send data via url, right? anyway, I found more simple using POST in any case because I have already used that and works, so I prefer POST... Thanks! Curt Zirzow wrote: On Sun, Nov 20, 2005 at 04:12:05PM +1300, Jasper Bryant-Greene wrote: xkorakidis wrote: Webmaster, thanks very much but I think it would be safer to do that by post, not by get. Furthermore, if I use indivudual files The difference between POST and GET lies in the semantics -- POST represents something changing on the server, e.g. updating a database field, and allows the browser to warn the user if they try to refresh. GET represents nothing of importance changing on the server, e.g. performing a search on the database, and can safely be repeated. Another good reason to use POST to modify data, consider the link: http://example.com/posts.php?postid=1action=delete If googlebot comes across your page containing a list of all your posts, with a link like that, you just might wake up one morning wondering why all your posts are gone. Curt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP] how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS?
Webmaster, thanks very much but I think it would be safer to do that by post, not by get. Furthermore, if I use indivudual files (searchProductInsertId.php, searchMemberInsertId.php...), I think it is easy: in each link of the menu I can type: a href=searchProductInsertId.phpSearch/a, a href=searchMemberInsertId.phpSearch/a etc. But, due to the fact that the html part of each SearchInsertId page doesn't have many differences between various search pages (in first case will show a message type a productId to find and will be connected with searchProduct.php, in second case will show a message type a memberId to find and will be connected with searchMember.php, and so on), I thought to make a searchSomethingWithId page, where the text and post php page will differentiate dependetly on what user had clicked on menu. So I think that the problem I have, is what exactly should be writen on each Search, Add of menu so as to help the searchSomethingWithId page to understand what search or add was clicked, and secondly, what should be written on searchSomethingWithId page so as to call the appropriate search or add php page. I have some code about sessions and global values, I would preffer a solution involving global values if it is safe. I used in past forms and buttons to send information to php page but now I would like to use text links instead of buttons. I hope I helped you to understand and give me some help :) Thaks a lot! Korakidis Christos Webmaster wrote: Hi, i hope I got you right. You can send data to the next php file by HTTP-GET. Simply add a ? behind the link and then variablename=value. Example ./jumpto.php?to=searchProduct In the jumpto.php you would ask the Global Array for Get Variables for the entry and then decide what to do. Example: sf($_GET[to] == searchProduct){ header(Location: ./searchProduct.php); } Or if you have a lot of locations to jump to you could do that by case. switch($_GET[to]){ case seachProduct: header(Location: ./searchProduct.php); break; case seachMember: header(Location: ./searchMember.php); break; } I hope that helped. Greetings Mirco Blitz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: AW: [PHP] how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS?
xkorakidis wrote: Webmaster, thanks very much but I think it would be safer to do that by post, not by get. Furthermore, if I use indivudual files It is a fallacy to ever tell someone that POST is safer than GET. They both transmit data in plaintext and it should not be assumed that either is inherently safer than the other, as this simply gives others a false sense of security. The difference between POST and GET lies in the semantics -- POST represents something changing on the server, e.g. updating a database field, and allows the browser to warn the user if they try to refresh. GET represents nothing of importance changing on the server, e.g. performing a search on the database, and can safely be repeated. SSL/TLS is the best option if you wish to transmit sensitive data. -- Jasper Bryant-Greene General Manager Album Limited +64 21 708 334 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
AW: [PHP] how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS?
Hi, i hope I got you right. You can send data to the next php file by HTTP-GET. Simply add a ? behind the link and then variablename=value. Example ./jumpto.php?to=searchProduct In the jumpto.php you would ask the Global Array for Get Variables for the entry and then decide what to do. Example: sf($_GET[to] == searchProduct){ header(Location: ./searchProduct.php); } Or if you have a lot of locations to jump to you could do that by case. switch($_GET[to]){ case seachProduct: header(Location: ./searchProduct.php); break; case seachMember: header(Location: ./searchMember.php); break; } I hope that helped. Greetings Mirco Blitz -Ursprüngliche Nachricht- Von: xkorakidis [mailto:[EMAIL PROTECTED] Gesendet: Samstag, 19. November 2005 05:10 An: php-general@lists.php.net Betreff: [PHP] how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS? Hi, I'm not so keen on PHP (so on English :) ) and I have a little problem: On the left side of the page there is the following menu: PRODUCTS Search Add MEMBERS Search Add ORDERS Search Add Is that possible to link each Search, Add to a Search.php and Add.php page and give a parameter to php script so as to make an on the fly searchProducts.php or AddProducts.php or SearchMembers.php etc? If I make individual searchProducts.php or AddProducts.php files these won't have many differences, so I Think it's better to make these on the fly. Any Idea? Thanks in advance. Christos Korakidis -- 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