Form with PHP via Javascript Popup Window !

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mustafamisir
Forum Newbie
Posts: 23
Joined: Wed Jun 22, 2005 1:00 pm
Contact:

Form with PHP via Javascript Popup Window !

Post 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...
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post 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
Post Reply