| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Member Join Date: Aug 2006
Posts: 110
![]() | PHP Help (should be easy...) Hi, I wanted to see if someone could help me here. I don“t know php so the terminology might not be right... If this takes longer than I think I can paypal someone some money for their efforts. I have a site with a database that has the celebrity names and when the names show up on the celebrity page (say Britney Spears page) they are called up using $name. I wanted to insert this code: <a href="http://ads.auctionads.com/pagead/link_59da060bb6f873222888_e4b8fa4b28026552eb3a825d 88b4fb36_http%3A//search.ebay.com/britney-spears_W0QQfromZR34">Buy Britney Spears Merchandise</a> ????: NamePros.com http://www.namepros.com/programming/326785-php-help-should-be-easy.html on the celebrity pages, where "britney spears" is substituted by the actual celebrity name for that page. How do I do it so that I can insert $name and have the celebrity name appear... sorry for the confusing explanation thanks
__________________ We sell the BIGGEST cloth posters and flags on the net! - D14Posters.com Telemoveisnokia.com - Nokia cell phones (Portugal and Brazil) - High paying keyword Benfica FC The biggest soccer club in the world Oportunidade de Dinheiro Um blog em PortuguĆŖs de como se ganhar dinheiro na internet |
| |
| | #2 (permalink) |
| NamePros Regular Join Date: Oct 2005 Location: Portugal
Posts: 800
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | it's easy... Code: <?php $ads = " <a href='http://ads.auctionads.com/pagead/link_59da060bb6f873222888_e4b8fa4b28026552eb3a825 d88b4fb36_http%3A//search.ebay.com/".$name1."-".$name2."_W0QQfromZR34'>Buy ".$name1." ".$name2." Merchandise</a> "; echo $ads; ?> because you can't have a $name being "britney-spears" and "Britney Spears" at the same time. ????: NamePros.com http://www.namepros.com/showthread.php?t=326785 $name1 would be "Britney" $name2 would be "Spears" this is the quickest way.
__________________ Joćo Fernandes Silva |
| |
| | #3 (permalink) |
| Senior Member Join Date: Mar 2005
Posts: 4,948
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | PHP Code: |
| |
| | THREAD STARTER #4 (permalink) |
| NamePros Member Join Date: Aug 2006
Posts: 110
![]() | Thanks for the two very quick replies! BUT, the database is already there and the one name "britney spears" or "Cristiano ronaldo" are already on the database and are one string ($name). did what i just say make sense?
__________________ We sell the BIGGEST cloth posters and flags on the net! - D14Posters.com Telemoveisnokia.com - Nokia cell phones (Portugal and Brazil) - High paying keyword Benfica FC The biggest soccer club in the world Oportunidade de Dinheiro Um blog em PortuguĆŖs de como se ganhar dinheiro na internet |
| |
| | #5 (permalink) |
| Senior Member Join Date: Mar 2005
Posts: 4,948
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | then you could just.. PHP Code: |
| |
| | #6 (permalink) |
| NamePros Regular Join Date: Oct 2005 Location: Portugal
Posts: 800
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | yes. then something like this should work Code: <?php
$names = str_word_count($name,1);
$ads = "<a href=\"http://ads.auctionads.com/pagead/link_59da060bb6f873222888_e4b8fa4b28026552eb3a825 d88b4fb36_http%3A//search.ebay.com/$names['0']-{$names['1']}_W0QQfromZR34\}>Buy " . ucfirst($names['0']) . " " . ucfirst($names['1']) . " Merchandise</a>";
echo $ads;
?>
__________________ Joćo Fernandes Silva |
| |
| | THREAD STARTER #7 (permalink) |
| NamePros Member Join Date: Aug 2006
Posts: 110
![]() | Thank you very much for both of you!!! SecondVersion, I have another "easy" request. I was going to PM you but since I think this might be of general interest for AuctionAds users I will ask for your help again. Using the above information, how would I go about inserting the celebrity name on the following line of auctionads code: auctionads_ad_kw = "britney spears"; Also, since I can use several keywords on this code separated by a ";" I would like to have a "default" keyword of "paris hilton" Thanks again and let me know if I can paypal you something for your time! Fernandes
__________________ We sell the BIGGEST cloth posters and flags on the net! - D14Posters.com Telemoveisnokia.com - Nokia cell phones (Portugal and Brazil) - High paying keyword Benfica FC The biggest soccer club in the world Oportunidade de Dinheiro Um blog em PortuguĆŖs de como se ganhar dinheiro na internet |
| |
| | #8 (permalink) | ||||
| Senior Member Join Date: Mar 2005
Posts: 4,948
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
PHP Code: PHP Code: ![]() But, if you feel like you must, you can donate @ www.domainportfolio.us
Last edited by SecondVersion; 05-11-2007 at 07:48 PM.
| ||||
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |