Re: phpmyadmin <form onsubmit>
| From: | Marek Kilimajer | Date: | Mon, 13 Oct 2003 11:36:16 +0000 |
| Subject: | Re: phpmyadmin <form onsubmit> | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-165955@lists.php.net to get a copy of this message | ||
Again, check phpmyadmin html source code. If your query begins with anything potentionaly destructive (DELETE, ALTER, DROP ...) it displays a confirm (not alert).
John Taylor-Johnston wrote:
What about some javascript to alert() and decide if the form executes like phpmyadmin does: http://ccl.flsh.usherbrooke.ca/example.jpg This would save me time coding PHP. How can I accomplish this? What does the onsubmit look like? John* Thus wrote John Taylor-Johnston (taylorjo@collegesherbrooke.qc.ca):Any ideas? I want to avoid having two "mysql_query($sql)". I'm basically looking for better functionality and wanting to learn how to clean up my code.there are a couple options, the insert has a extra option, 'ON DUPLICATE KEY': http://www.mysql.com/doc/en/INSERT.html Or use the REPLACE syntax: http://www.mysql.com/doc/en/REPLACE.html