Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

Cards

Here is card with image as a link I need a form button to to browse and choose an image and second input for the href and save as if i just filled out the card normally.

<a href="default.asp"><img src="smiley.gif" alt="HTML tutorial" style="width:42px;height:42px;"></a>
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a> </div>
 
Last edited:
Hey there,

You're going to have to upload the image somewhere to the server if you want it to be saved after refreshing. You could use JavaScript to send a POST request with the image to the server, and then on the backend, either upload the image to a database, or if you strictly don't want to use a database, replace the current image file with the new one, either giving it the same name, or changing the name in the frontend code.
How the backend code looks is going to depend on what language you're using, I would assume either PHP or Node.js?
 
ok This what I have on the server I can manually change the path to new image and uoload the page i am working on. Why cant i make that path change with a form and upload the file.
<div class="text-column">
<div class="card-soft" oncontextmenu="editCard(1); return false;">
<img id="card-1" class="card-img" src="img/speaker.png" alt="Card 1">
<div class="card-body">
<h5 class="card-title" id="title-1"></h5>
<p class="card-text" id="text-1"></p>
</div>
</div>
</div>
 

Buy us a coffee!

Buy me a coffee.
Back
Top Bottom