Page 1 of 1

Form with PHP via Javascript Popup Window !

Posted: Mon Jun 27, 2005 12:06 pm
by mustafamisir
Hi all,

I am created a form which gives permission to the user choosing two cell phones . After this choice, this information is sent to a PHP page that shows their properties which comes from the database (MySQL). It gives a true result but I want to show the result in a popup. However, I tried to show, but it gave an error about not knowing the parameters which is sent via the form.

Thank you for now...

Posted: Mon Jun 27, 2005 12:17 pm
by Burrito
we'll need more information than that.

what are the missing parameters? are they missing in php? are they missing on the js pop-up page? what?

the best way to handle this probably woudl be to attach a url param to the pop-up window then search the database off of that:

ex:

Code: Select all

function openIt(where){
  var newwin = window.open('child.php?id='+where,'chi','width=400,height=400');
  newwin.focus();
  //etc
}

Code: Select all

mysql_connect(&quote;localhost&quote;,&quote;username&quote;,&quote;password&quote;)
  or die(mysql_error());
mysql_select_db(&quote;database&quote;)
  or die(mysql_error());
$result = mysql_query(&quote;select * from myTable where id = &quote;.$_GETї'id'])
  or die(mysql_error());
//etc