Jump to content

[SOLVED] Crazy Quote/Apostrophe Situation


modchamp

Recommended Posts

Well my brain is utterly fried right now and I need a little help.

 

$linkd = "<a href=\'$address" . "upload/$ran1" . $ran2 .  "$_FILES['file']['name']\\'>"

echo "<br>HTML Link (for websites): " . "<input readonly='readonly' type=text value=$linkd>";

 

I'm basically trying to get a readonly text field that will display the users uploaded image location in <a href> form, kind of similar to imageshack.us

 

Thanks in advance,

 

modchamp

Link to comment
Share on other sites

I've edited to the following:

 

$linkd = "<a href='$address" . "upload/" . $ran1 . $ran2 . $_FILES['file']['name'] . "\'>";

echo "<br>HTML Link (for websites): " . "<input readonly='readonly' type=text value=$linkd>";

 

Now I get <a in the textbox and then > after it. Any ideas?

Link to comment
Share on other sites

Ok was tinkering with it and got it to work. Just needed to put $linkd in single quotes:

 

$linkd = "<a href=\"".$address."upload/".$ran1.$ran2.$_FILES['file']['name']."\">".$_FILES['file']['name']."</a>"; 

echo "<br>HTML Link (for websites): <input readonly='readonly' type='text' value='$linkd'>";

Link to comment
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.