Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/51934-link-question/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/51934-link-question/#findComment-256022
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/51934-link-question/#findComment-256796
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.