Hi, i’m new in order to php and recently, i’m developing a web site application. Here is definitely my problem..
should the user press about the submit button, a confirmation message is to appear on exactly the same page. then the browser need to redirect to another page after displaying the message…
will i do this in javascript using the conformation box.. if you are how
Somebody please assist me with some advice which may make it materialize..
< form onsubmit=" alert(‘This is some form of a confirmation message’)" action=" your_php_processing_script. php" >
Hi TheGAME,
thanks with the reply…
this particular works fine..
but i do think i need for you to explain my problem bit more clearly… its in this way… The user will give either of A COUPLE OF inputs, VALID or even INVALID given inside radio buttons.. should the user presses GOOD and submits, the conformation message must be " Are an individual sure the prospect is valid" and also on pressing INVALID and submits, the message must be " Are an individual sure the prospect is invalid" With pressing submit, either of two message is required to come and with pressing OK, this should direct to another page…
you need to help me out…
Oh, okay. You’re looking to get a confirm box.
functionality confirmUserChoice() var choice = (gather this from your radio button inputs); gain confirm ('Are an individual sure the prospect is ' + selection + '');
…
< form onsubmit=" return confirmUserChoice()" action=" your_php_processing_script. php" >
If WHEN I were you, I’d temporarily take away the action section of your form script until you will get the Javascript element down. Otherwise, you’ll keep submitting the form and driving by yourself nuts until an individual isolate your Javascript faults.
thank u with the reply GAME….
hi…
bought another problem…
the script is actually a conformation to the steps to get followed…
there may be php after the script which can be ought to run depending on the input in the conformation box..
but after while using the code snippet, this particular wont be executed..
pls support..
I don’t understand. Put your internet page up somewhere along with show me.
A NEW confirmation box only has two inputs… OKAY and Cancel. Annoying else.
hi, this is the actual code…
< form name=" validate" method=" POST" > <! –form with the validation. On completing the form, the php rule should execute as well as after completion, it should redirect into the other page… –>
< dining room table id=" disp" cellpadding=" 5" cellspacing=" 5" align=" center" >
< tr> < td> < feedback type=" radio" value=" 1" name=" val" /> < /td> < td class=" ind1" > In force < /td> < /tr>
< tr> < td> < feedback type=" radio" value=" 2" name=" val" /> < /td> < td class=" ind1" > Broken < /td> < /tr> < /table>
< br />
< center> < feedback type=" submit" value=" submit" name=" submit" /> < /center>
< /form>
< php
$value=$_POST’val’; //the code to be executed after the shape. Right now we have added the proof box here… but only that sql query is working at the moment…
if($value)
if($value==1) //this is completed when valid is actually selected….
echo " < script type=’text/javascript’> ";
echo " confirm(‘Are people sure the applicant is valid’ )";
mysql_query(" bring up to date validation set deo_validn=1 where reg_no=’$re’" );
echo " window. location=’reg_no. php’; ";
echo " < /script> ";
else if($value==2) //this is completed when the unacceptable is selected… this copies the ideals from original db app_det, cand_det & validation into the new db broken..
echo " < script type=’text/javascript’> ";
echo " confirm(‘Are people sure the applicant is invalid’ )";
$dbcmt=" Made invalid by DEO";
$query2=mysql_query(" put into invalid ideals (‘$dbrn’, ‘$dbid’, ‘$dbna’, ‘$dbhn’, ‘$dbst’, ‘$dbdi’, ‘$dbci’, ‘$dbdo’, ‘$dbse’, ‘$dbqu’, ‘$dbph’, ‘$dbmo’, ‘$dbgm’, ‘$dbsm1’, ‘$dbsm2’, ‘$dbim’, ‘$dbin’, ‘$dbpl’, ‘$dbdis’, ‘$dbcmt’)" );
if(! $query2)
die(mysql_error());
mysql_query(" remove duplicate content from app_det where app_id=’$num’" );
mysql_query(" remove duplicate content from cand_det where app_id=’$num’" );
mysql_query(" remove duplicate content from validation where reg_no=’$re’" );
echo " window. location=’reg_no. php’";
echo " < /script> ";
>
I’m not a PHP guy, but the truth is can’t mix PHP as well as Javascript validation of that ranking. it doesn’t work because of this. In order to accomplish the validation you wish to do, you’ll need to reload the web page. You’ve basically confusing concepts.
When you submit your variety, you want to help call the Javascript any kind of PHP executes.
< form action=" " onsubmit=" gain confirmUserChoice()" >
…
function confirmUserChoice() var selection = (gather this from your radio button inputs); gain confirm ('Are an individual sure the prospect is ' + selection + '');
Remember, that you do not want any PHP executing until the Javascript will.
I really don’t know of a better way to explain the item than that. When you validate a sort in JS, that you do not submit the page returning to the server right up until it’s validated.
hi game,
seeing that i said, now i’m new to net designing and didn’t actually knew the following couldn’t be done… thank u with the reply again..
hi game,
can there be some way to try and do it with some timing functions almost certainly in php