I'm doing a review page where user will select the rating and write a review in a text area. I want to capture the userid of the user logged in, the imageid of the review given, the rating that user selected and text that the user entered . now the problem is that after clicking submit it would not redirect to my capture page .
window.location.href = "captcha.php?imageid='.$imageID.'&userid='.$userID.'&rating="+rating+"&text="+text";
this is the current code for javascript in php that redirect
<form name="form1" method="post" onSubmit = "return insertReview();">
this is the code for my form
<form name="form1" method="post" action = "captcha.php">
In captcha.php you can access the contents of form using the $_POST array. Do validation and filtering of data there. If something is wrong, give an error message and redirect to the previous page