hi

if (confirm ("are u sure ");
{
<?php

mysql_query("INSERT INTO student ('id','name') VALUES ('1','osama');

?>

window.location='home.php';

even if i chose cancel value will add to my data base

why ??

Recommended Answers

All 4 Replies

you want to test your javascript and make sure the variables are set correctly. print your vars on the page to confirm the info is correct.

sorry i dont understand

what u mean

do u mean

<?php

print ("if (confirm ("are u sure ");
{
");


mysql_query("INSERT INTO student ('id','name') VALUES ('1','osama');

?>

window.location='home.php';


???

how are you setting up your confirm? if its a var just print it to screen and verify what is being sent.

hi proffessorC

i am sorry i annoy u


but

can you give me example

???

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.