radiations3 Posted October 16, 2011 Share Posted October 16, 2011 Issue # 1 How can i send the values come from $_POST['name'],$_POST['number'] to an email address [email protected]??? Issue # 2 I am trying to display data from four different tables with the following sql query: (The problem is that the data is getting displayed fine but i don't know why some of the (same )data gets repeated two or three times where as i checked in all four tables and all the data exists one time not twice) If anything wrong with my query kindly help SELECT distinct * FROM applicant,applicant_info_nic,room,student WHERE applicant_info_nic.status='Available' and applicant.appNIC=applicant_info_nic.appNIC and applicant.roomID=room.roomID and applicant.appNIC=student.appNIC ORDER BY applicant.roomID Quote Link to comment https://forums.phpfreaks.com/topic/249199-need-help-with-two-issues/ Share on other sites More sharing options...
Drummin Posted October 16, 2011 Share Posted October 16, 2011 distinct should be some universal value or values across tables. User id maybe? Quote Link to comment https://forums.phpfreaks.com/topic/249199-need-help-with-two-issues/#findComment-1279699 Share on other sites More sharing options...
radiations3 Posted October 16, 2011 Author Share Posted October 16, 2011 true i was trying to imply the condition for all but didn't work out... Quote Link to comment https://forums.phpfreaks.com/topic/249199-need-help-with-two-issues/#findComment-1279702 Share on other sites More sharing options...
Drummin Posted October 16, 2011 Share Posted October 16, 2011 Not sure if this would work with *. You might need to add all table fields instead, i.e status, roomID etc. SELECT distinct(appNIC),* FROM applicant,applicant_info_nic,room,student WHERE applicant_info_nic.status='Available' and applicant.appNIC=applicant_info_nic.appNIC and applicant.roomID=room.roomID and applicant.appNIC=student.appNIC ORDER BY applicant.roomID Quote Link to comment https://forums.phpfreaks.com/topic/249199-need-help-with-two-issues/#findComment-1279705 Share on other sites More sharing options...
radiations3 Posted October 16, 2011 Author Share Posted October 16, 2011 NAH cant do this distinct(abc),* not the right syntax Hey can you help me with my first issue.... Quote Link to comment https://forums.phpfreaks.com/topic/249199-need-help-with-two-issues/#findComment-1279706 Share on other sites More sharing options...
Drummin Posted October 16, 2011 Share Posted October 16, 2011 You might need to add all table fields instead, i.e status, roomID etc. Quote Link to comment https://forums.phpfreaks.com/topic/249199-need-help-with-two-issues/#findComment-1279709 Share on other sites More sharing options...
radiations3 Posted October 17, 2011 Author Share Posted October 17, 2011 My 2nd Issue is resolved Kindly can anyone help how to solve the first issue?? Quote Link to comment https://forums.phpfreaks.com/topic/249199-need-help-with-two-issues/#findComment-1279862 Share on other sites More sharing options...
Buddski Posted October 17, 2011 Share Posted October 17, 2011 The PHP manual has many examples of sending data in an email.. Have a read. mail() Quote Link to comment https://forums.phpfreaks.com/topic/249199-need-help-with-two-issues/#findComment-1279881 Share on other sites More sharing options...
radiations3 Posted October 18, 2011 Author Share Posted October 18, 2011 thanx! Quote Link to comment https://forums.phpfreaks.com/topic/249199-need-help-with-two-issues/#findComment-1280104 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.