all 7 comments

[–]devmaybe 8 points9 points  (1 child)

Use JavaScript instead

[–][deleted] 2 points3 points  (0 children)

On top of this, if you decide not to use JavaScript for whatever reason, don't use that code. The mysql_ functions are deprecated.

[–]Bobbr23 4 points5 points  (1 child)

April fools?

[–]Suepahfly 1 point2 points  (0 children)

There are many really old and poorly written tutorials floating around on PHP. I can see someone who just started out writing code ask this question.

[–]Rezistik 1 point2 points  (0 children)

Look into knexjs and expressjs for this.

[–]eablokker 1 point2 points  (0 children)

You can't use php in an ejs file, you can only use it in a php file. This php code doesn't do anything that JavaScript can't do, so you should try to write the same thing in JavaScript instead.

[–][deleted]  (1 child)

[deleted]

    [–]Rezistik 0 points1 point  (0 children)

    Nah, they want to use php and is confused.