so I saw a few similar questions like this but none worked for me so I thought I might as well ask. So I'm trying to make a popup load if the member's ID isn't in a database. I have all the PHP and SQL working for the database but I'm struggling to run the function for the JavaScript.
I tried
if (condition){
my database code;
}else{
my database code;
echo "function()"
}
I also tried
if (condition){
my database code;
}else{
my database code;
echo "<script type="text/javascript">function();</script>"
}
but that still didn't work? I really want this on my website so if someone knows another way that would be AWESOME :)
Thanks in advance.
echo "<script>function();</script>";. If not you have to provide a more complete example.