Displaying output of php within jquery colorbox ... getting undefined index error -
i hope can me, have created simple html form drop down menu's, drop down menus populated mysql data base, user must select 2 drop downs , display data ( both selections make sql query) works correctly within html trying jazz bit , have output display within jquery colorbox (popup).
i not sure how format syntax jquery function .. have far
<script> $(document).ready(function(){ $(".inline").colorbox({inline:true, width:"50%"}); $("input#formsubmit").colorbox({href: function(){ var url = $(this).parents('form').attr('action'); return url; }, innerwidth:920, innerheight:"86%", iframe:true}); }); </script>
this correctly launches colorbox pop , fires php "action" form $_post attributes not sent across , unidentified index error mysql.
can 1 please me ?
im sure simple, cant figure out.
many thanks
adding php ...
<?php mysql_connect("localhost", "root", "root") or die(mysql_error()); mysql_select_db("verify") or die(mysql_error()); $result = mysql_query("select entitlement products productname = '$_post[product]' , customertype = '$_post[customer]'") or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo $row['entitlement'] ; echo "<br />"; } ?>
can please tell how may code works :)
<?php $result = mysql_query("select entitlement products productname = '$_post[product]' , customertype = '$_post[customer]'");?>
you have 2 error first 1 single quote beside index in post variable , must $_post['product']
,$_post['customer']
second error must encapsulate variable inside string following {$_post['product']}
,{$_post['customer']}
try these work around tell me result :)
Comments
Post a Comment