deerslayer Posted May 18, 2007 Share Posted May 18, 2007 I had a site built over a year ago and the coder has gone awol. The problem i am trying to solve is he created all the links as an "onclick" rather than a basic html. It works for visitors, but sitemaps and search engines can't follow these as well as it limits pda users too. if (strip_tags(@$_GET["from"]) != $mov) { ?>onClick='window.location = "<? echo $_SERVER['PHP_SELF']; ?>?from=<? echo $mov; ?>&state=<? echo strip_tags($_GET["state"]); ?>&max=<? echo $max; ?>&perpg=<? echo strip_tags($_GET["perpg"]); ?>&cata=<? echo $cat; ?>";' class="next_prev_nums" style="cursor:pointer;<? } else can someone tell me how to modify this to change it to a followable link? Thanks. Quote Link to comment Share on other sites More sharing options...
s0c0 Posted May 18, 2007 Share Posted May 18, 2007 Wwll you should be able to do 1 of the following 2. If the links are displayed using straight html then just do: <a href="your_page_here.html">Link</a> or if its being displayed using php: echo '<a href="your_page_here.html">Link</a>'; Not sure why anyone would use javascript for that. Quote Link to comment Share on other sites More sharing options...
deerslayer Posted May 18, 2007 Author Share Posted May 18, 2007 I can understand the basic link to a static page, but the link needs to pull its location and data from the database. Did my example miss this information? thanks. Quote Link to comment Share on other sites More sharing options...
s0c0 Posted May 19, 2007 Share Posted May 19, 2007 The code you posted is extremely convoluted and streaches far past the width of the screen which makes it a bear to read. Just though I would give it a shot. Post the entire code and in a sane matter and I will try helping you once again. In theory the sql query should return the rows in an array and then you can just play the array elements into the link. So post the code and I will try showing you how to do that in a sanner manner than this guy programmer of yours did. Quote Link to comment Share on other sites More sharing options...
Lamez Posted May 19, 2007 Share Posted May 19, 2007 in basic html you would use the code: <a href="YOUR PAGE">Link Title</a> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.