Php code for adding a link on a webpage from an admin backend page


Currently this custom website is build in very old php. In the backend admin pages we can upload a pdf file which then creates a link on the web page so it can be viewed. But instead of viewing a pdf file we want to add a link to google docs.

I’m wanting to update the admin page php code to allow the user to add links rather then pdf.

Here is the admin page code for uploading a pdf.

Browse to PDF of new Entry Form

<BR><input type="file" size="40" name="entryform" value="<?php echo $entryform ?>" cols="50">```

I think also the webpage might require an adjustment to it's php too.

```if ($entryform) {
		  echo "  <a href=pdf/$entryform title='Click here for Entry form' target=_blank>Entry</a></B></font>\n";
	                     }  else {      	  echo "&nbsp;";     } 
		 echo "</td><td width=50><font class=norm>\n"; ```

Can anyone help please as I am a newbie. Thanks

Hi Fred
What kind of help do you actually want?
Your question sounds a bit vague right now.
Can you provide some code or something we can look at?

I’ve just added some php code, does this help or is it still to vague?

I just wanted the php code so I can make the adjustment myself, basically replacing the old code above. Prepared to pay for the code if necessary. The site is a sporting club.

Also require to edit the title of the link as well as the link.

Is it allowable on this site to add a URL to the two pages so you can view the code as posting it above actually creates part of the page

Please surround code in your post with three backticks:

your code

It will prevent it from being stripped by forum’s parser (now it’s stripped as you can see)

Where exactly should that link point to?

Different events have different google docs so the links will vary. This is the reason why admin person will need to manually enter the url and also give it a title.

I think I’ll pay someone on upwork to do this for me, thanks for your help.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.