| |||||||
| Register | Projects | FAQ | Members List | Mark Forums Read |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
Some of my listigns dont have websites. If they dont I have the default address : http://www.mysite.com/nosite.php added in the DB. This link will go to a page saying the site has no webpage etc. I want to display graphics depending on if the site has a webpage, if the do it will come up with a button saying "Visit Site" if not a button saying "No Website Available" I have the following code, but it ALWAYS comes out displaying the "yessite.jpg" I cannot see whats wrong with the logic. no site url is identical to what is stored in the database so it should work Code: Content visible to License Owner only. the plan is to use <a href=<%url%>> <img src=<%displaysite%>border=0></a> to display if a site exists, and make a clickable button. Im sure this is a simple problem, im new to php. I try for an hour and then i post. thats my rule!!! |
| |||
|
ok if i declare $url = www.mysite.com/nosite.php it works. SO, the problem must be the way im getting the url fromt he database into the variable $url ... its obviously not working. Im actually using : $url = $links_obj->url not what i used in the first post... so how would i do it? |
| |||
|
I did a few tests and the problem is that i cannot get the url fromt he database to do any comparing. Im using your hits mod I found in the forums (counts hits to the details page rather than external site) and adapted the way you did it, this works but im not sure if its the best way : Code: Content visible to License Owner only. Code: Content visible to License Owner only. |
| ||||
| Code: Content visible to License Owner only. depending on where you are at in the code, any one of these three could work: Code: Content visible to License Owner only. Code: Content visible to License Owner only. Code: Content visible to License Owner only. Code: Content visible to License Owner only. .
__________________ esm "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology." . |
| |||
|
the database query was my short hand im using link_id really. I was just wondering why I needed to query the database again, because the indexu (unchanged code!) already selects everything from idx_link, therfore I should be able to get the url from the returned array... But as you said, its working so lets not worry about it !! |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is wrong with this ??? | lanzabiz | v5.x | 3 | 05-27-2004 02:17 AM |
| <%hot_links%> code | persut | v5.x | 4 | 02-01-2004 04:31 PM |
| Inserting a PHP Code In the INDEX page !!! | althahabi | v5.x | 1 | 09-26-2003 04:21 PM |
| Adding code before and after a link | shanet | v5.x | 7 | 06-07-2003 06:15 AM |
| Wrong focus | ReeToric | v5.x | 1 | 09-26-2001 08:45 AM |