Help me for my php code! - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > PHP Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-23-2011, 06:01 AM   #1 (permalink)
Junior Member
 
Join Date: Apr 2011
Posts: 12
Exclamation Help me for my php code!

...........................................

This is the code... and im using iframe for this, and this code must be the action to search my query... but to the next page it doesn't show up...

when i try the queries to mySQL, it works but not in php.... PLEaSE HELP !!!

.............................................




<?php

$pqs_name = $_POST[pqs_name];
$menu_name = $_POST[menu_name];

$con = mysql_connect("localhost","root","");

if(!$con){
die('could not connect:'.mysql_error());
}

mysql_select_db("thesis",$con);

$result = mysql_query ("SELECT a.pqs_name, b.menu_name, c.food_name FROM pqsetup a, menu_packages b, food_details c, menu_details d
WHERE a.pqs_no = b.pqs_no AND d.food_no = c.food_no AND d.menupackage_no = b.menupackage_no
AND a.pqs_name = '$pqs_name' AND b.menu_name = '&menu_name' ");

echo "<center><table border=1>";
echo "<td width =20%>PQS Name</td>";
echo "<td width =20%>Menu Name</td>";
echo "<td width =20%>Food Name</td>";

echo"</table></center>";

while ($search = mysql_fetch_array($result))
{

echo "<center><table border=1>";

echo "<td width =20%>" . $search['pqs_name'] . "</td>";
echo "<td width =20%>" . $search['menu_name'] . "</td>";
echo "<td width =20%>" . $search['food_name'] . "</td>";

echo"</table></center>";
}
mysql_close($con);

?>
yokorobi12 is offline   Reply With Quote
Sponsored Links
Old 04-25-2011, 07:07 AM   #2 (permalink)
Junior Member
 
cooper4's Avatar
 
Join Date: Apr 2011
Location: India
Posts: 24
Default Re: Help me for my php code!

I am not that muct expert but I think you have to use
Code:
$_POST['pqs_name'];
// instead of
$_POST[pqs_name];
same to other..
And in query use '$' instead of '&'
Code:
b.menu_name = '&menu_name'
cooper4 is offline   Reply With Quote
Old 04-26-2011, 03:48 PM   #3 (permalink)
Junior Member
 
Join Date: Apr 2011
Posts: 12
Default Re: Help me for my php code!

Quote:
Originally Posted by cooper4 View Post
I am not that muct expert but I think you have to use
Code:
$_POST['pqs_name'];
// instead of
$_POST[pqs_name];
same to other..
And in query use '$' instead of '&'
Code:
b.menu_name = '&menu_name'

Wow thank you so much hahaha.. yes i didn't saw that "&" hehe...
yokorobi12 is offline   Reply With Quote
Old 04-27-2011, 07:18 AM   #4 (permalink)
Junior Member
 
Join Date: Mar 2011
Posts: 56
Default Re: Help me for my php code!

<?php

$pqs_name = $_POST[pqs_name];
$menu_name = $_POST[menu_name];

$con = mysql_connect("localhost","root","");

if(!$con){
die('could not connect:'.mysql_error());
}
richerdjohn is offline   Reply With Quote
Old 04-30-2011, 12:21 AM   #5 (permalink)
Junior Member
 
Join Date: Apr 2011
Posts: 12
Default Re: Help me for my php code!

Can anyone help me with the LOG IN and LOG OUT in php?

please !!! T^T
yokorobi12 is offline   Reply With Quote
Old 04-30-2011, 12:30 AM   #6 (permalink)
Junior Member
 
Join Date: Apr 2011
Posts: 12
Default Re: Help me for my php code!

This is my php file... please help me with this LOg in Log out... and i dont know php validations T^T

4shared. com / file / 8MQJ4URL / LOG_IN. html?
(i cant post url pls just ignore the spaces)

THANKS in Advance ~
yokorobi12 is offline   Reply With Quote
Old 04-30-2011, 02:07 AM   #7 (permalink)
Regular User
 
Join Date: Apr 2011
Posts: 115
Default Re: Help me for my php code!

Check this link out, it might be helpful.
Post it there if the problem persists, it surely shall provide quick help.

Last edited by chunnilal; 04-30-2011 at 05:49 AM.
chunnilal is offline   Reply With Quote
Old 04-30-2011, 02:36 AM   #8 (permalink)
Junior Member
 
Join Date: Apr 2011
Posts: 14
Default Re: Help me for my php code!

that is a good idea man
essyyweb1 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 04:40 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting