I want to add an edit button for a script called spiral url, but the problem is that I can’t get the URL id. This is what I’ve tried:
/** get url id **/
$id = isset($_GET['id']) ? $_GET['id'] : '';
@mysql_query("UPDATE short_urls SET long_url = 'test' WHERE url_id = '".$id."' LIMIT 1");
What am I doing wrong?
Also I emailed the author and his response:
“I recommend you post on Stackoverflow – https://stackoverflow.com/.
I would love to help you but I don’t see what you are doing wrong. I’m still learning PHP as well.”
@operator. NEVER suppress errorsScrap that code and use this:
Note that I’m assuming that the
idparameter is numeric. If it’s not, then remove the intval() stuff.