So basically I'm letting the user upload a picture to my website**(By typing an URL)**, which will be saved in my database under his name. Although, I don't want anybody to upload an unvalid URL, which will show an empty box.
The problem is that I don't know how to not submit the form in a case of fake image URL, so that it will show an alert(from the Javascript probably) and not continue to savings it in the databse.
Can anybody help me please? Trying for ages.
The image text:
<p style="font-size:20px; font-family:Arial; font-weight:800;">URL to presented Image:
</p><input type="text" name="image" id="image" class="URLs" value="http://" />
The submit button:
<p><input type="submit" class="myButton" style="padding: 25px 150px; line-height:6px;"
value="Submit Details"/></p>
What do I need to add to these inputs? And what do I need to add to the Javascript?
Thanks in advance!