| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Member | 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> 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 | 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. $name1 would be "Britney" $name2 would be "Spears" this is the quickest way.
__________________ João Fernandes Silva Selling : 19P.ORG - ARCADEHITS.ORG - AZIAN.NET - COREFANS.COM - CTUTORIALS.NET - DEDISEEK.COM - HITCHECK.COM - HOST15.COM - HOSTCUSTOMER.COM - LARGETIPS.COM - SCRIPTCANDY.COM - VISUALBOOK.NET - VOXVPS.COM / .NET - WALLPAPERSARENA.COM |
| |
| | #3 (permalink) |
| NPQ's PA, Slave, and On Call Coder Technical Services | PHP Code:
__________________ |
| |
| | #4 (permalink) |
| NamePros Member | 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) |
| NPQ's PA, Slave, and On Call Coder Technical Services | then you could just.. PHP Code:
__________________ |
| |
| | #6 (permalink) |
| NamePros Regular | 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 Selling : 19P.ORG - ARCADEHITS.ORG - AZIAN.NET - COREFANS.COM - CTUTORIALS.NET - DEDISEEK.COM - HITCHECK.COM - HOST15.COM - HOSTCUSTOMER.COM - LARGETIPS.COM - SCRIPTCANDY.COM - VISUALBOOK.NET - VOXVPS.COM / .NET - WALLPAPERSARENA.COM |
| |
| | #7 (permalink) |
| NamePros Member | 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) | |
| NPQ's PA, Slave, and On Call Coder Technical Services | Quote:
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 06:48 PM. | |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |