Jump to content

[SOLVED] How do I put a new image name from uploading into a variable with css codes?


Recommended Posts

I want to save this to the database. After uploading the image and creating a new name for it I want to put it into $code before saving it into the database:

$code = "
<style type=\"text/css\">
body {
background-image:url('urlgoeshere$newname');

}
</style>        
";

 

The issue is it won't work if it's inside the if (isset). It seems like I need a way to get the newname from the uploading and add outside if the if(isset).

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.