Ebenz01's Posts
Nairaland Forum › Ebenz01's Profile › Ebenz01's Posts
1 2 (of 2 pages)
thnks for that @kudaisi. I fnd a solution to it. My challenge was giving a name to the check boxes cos i dnt knw exactly how many checkboxes..they are all coming from d database. But i finaly implemented an array for the naming, and then implemented a for each loop in getting the values before inserting into database. Another challenge i got was that the submit variable value is also inserting into the database....but i found a way arnd it by unseting the submit value just before inserting into database. Thanks for d contrbution cos ive learnt something from it. |
i guess im late seeing ds. I'm currently on my way to the place..i guess i'll divert my journey to a more profitable place. But my regret is that i came home late ystday nite, nd just because of ds silly interview i woke up by 4.30am. Na God go punnnnnnnish them for me. I almost fainted when i saw this. This is d message they sent to me: U're invited for an interview at MEDPRO. 161 Ikorodu Road Onipan B/Stop beside Lanre Shitu Motor on Thurs 14/05/15 by 9am Prompt HR: 09027353810. |
ok. Wat im tryng to do is a school portal where students can register for courses? Now there are lists of courses which is peculiar to each class, nd every member of the class can choose the number of courses he wants out of the available courses for his class. What i did is to fetch available courses for a particular class from database having a checkbox beside each course. The student needs to check the courses he wants to register and then submit. The challenge is, since i dont knw the number of data that has been fetched or would be fetched, how do i pass them to the next page or how do i insert the checked ones back to the database |
helo guys. Pls i need help on a particular code. I need to pass some data whch were fetched from the database to another page for processng. The implication is that only the ones that are chosed through checkbox will be the ones to be passed for processing, to be inserted into database precisely. I use php. Pls help m o |
HND FORM (PART-TIME) IS CURRENTLY ON NOW!! HND FORM (FULL-TIME) IS CURRENTLY ON NOW!! [b]ND FORM (PART-TIME) [/b]IS CURRENTLY ON NOW!! To purchase any of the above, contact me on 07086029868 Did you Score above 45 in the just concluded POST-UTME exam? There is still hope for you. Contact me on 07086029868 Now!! |
im also interested in joining the team. my number is 07086029868 |
thanks. But if you click on the testimonies menu, u will see that d page looks like one frm a cms |
i tot as much too. Does dat mean one cannot get a joomla template dat luks like dat |
pls where can i get good joomla 2.5 or 1.5 templates that looks like that of davidabioye.org.ng |
tnks for ur contribution. I finally got a way round it |
Pls is something wrong with my code? im trying to avoid multiple email entries, but the code keeps inserting data with multiple emails. And whenever i put email as unique in my database, it dosent show anything if the data already exist <? if($submit) { $name=$_POST[name]; $address=$_POST[address]; $email=$_POST[email]; $phone=$_POST[phone]; $conn=mysql_connect('localhost','username','password'); $db=mysql_select_db('family_jo151'); $query1="SELECT * FROM bfs_list WHERE email='.mysql_real_escape_string($_POST[email]) .'"; $result=mysql_query($query1)or die(mysql_error()); $p=mysql_fetch_array($result); if(empty($name)) { ?> <div align="center"> <p></div> <div align="center"> <table cellpadding="0" cellspacing="0" width="779" height="489" background="images/stories/bfs_form_bg.jpg"> <!-- MSTableType="layout" --><tr> <td> </td> <td> </td> <td height="67"> </td> </tr> <tr> <td> </td> <td valign="top" align="center" bgcolor="#FFFFFF"> <img border="0" src="images/stories/bfs_form_header.jpg" width="439" height="119"><p> </p> <p><font face="Bodoni MT"><b>The "<font color="#FF0000">NAME</font>" Field is empty</b></font></p> <p><a href="javascript:history.back(-1);">Back</a></p> <p></td> <td height="350"> </td> </tr> <tr> <td width="143"> </td> <td width="476"> </td> <td height="72" width="160"> </td> </tr> </table></div> <? } elseif(empty($address)) { ?> <div align="center"> <p></div> <div align="center"> <table cellpadding="0" cellspacing="0" width="779" height="489" background="family%20booster/bfs_form_bg.jpg"> <!-- MSTableType="layout" --><tr> <td> </td> <td> </td> <td height="67"> </td> </tr> <tr> <td> </td> <td valign="top" align="center" bgcolor="#FFFFFF"> <img border="0" src="images/stories/bfs_form_header.jpg" width="439" height="119"><p> </p> <p><font face="Bodoni MT"><b>The "<font color="#FF0000">ADDRESS</font>" Field is empty</b></font></p> <p><a href="javascript:history.back(-1);">Back</a></p> <p></td> <td height="350"> </td> </tr> <tr> <td width="143"> </td> <td width="476"> </td> <td height="72" width="160"> </td> </tr> </table></div> <? } elseif(empty($email)) { ?> <div align="center"> <p></div> <div align="center"> <table cellpadding="0" cellspacing="0" width="779" height="489" background="images/stories/bfs_form_bg.jpg"> <!-- MSTableType="layout" --><tr> <td> </td> <td> </td> <td height="67"> </td> </tr> <tr> <td> </td> <td valign="top" align="center" bgcolor="#FFFFFF"> <img border="0" src="images/stories/bfs_form_header.jpg" width="439" height="119"><p> </p> <p><font face="Bodoni MT"><b>The "<font color="#FF0000">EMAIL</font>" Field is empty</b></font></p> <p><a href="javascript:history.back(-1);">Back</a></p> <p></td> <td height="350"> </td> </tr> <tr> <td width="143"> </td> <td width="476"> </td> <td height="72" width="160"> </td> </tr> </table></div> <? } elseif (!eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,4})$", $email)) { ?> <div align="center"> <p></div> <div align="center"> <table cellpadding="0" cellspacing="0" width="779" height="489" background="images/stories/bfs_form_bg.jpg"> <!-- MSTableType="layout" --><tr> <td> </td> <td> </td> <td height="67"> </td> </tr> <tr> <td> </td> <td valign="top" align="center" bgcolor="#FFFFFF"> <img border="0" src="images/stories/bfs_form_header.jpg" width="439" height="119"><p> </p> <p><font face="Bradley Hand ITC"><b>Your "<font color="#FF0000">EMAIL</font>" </b></font><b><font face="Bodoni MT">is not in the correct format</font></b></p> <p><a href="javascript:history.back(-1);">Back</a></p> <p></td> <td height="350"> </td> </tr> <tr> <td width="143"> </td> <td width="476"> </td> <td height="72" width="160"> </td> </tr> </table></div> <? } // THIS IS WHERE I CHECKED FOR MULTIPLE ENTRIES elseif($email=="$p[mail]" ![]() { ?> <div align="center"> <p></div> <div align="center"> <table cellpadding="0" cellspacing="0" width="779" height="489" background="images/stories/bfs_form_bg.jpg"> <!-- MSTableType="layout" --><tr> <td> </td> <td> </td> <td height="67"> </td> </tr> <tr> <td> </td> <td valign="top" align="center" bgcolor="#FFFFFF"> <img border="0" src="images/stories/bfs_form_header.jpg" width="439" height="119"><p> </p> <p><b><font face="Bodoni MT">You have been previously registered for <font size="5">BFS</font></font></b></p> <p><a href="javascript:history.back(-1);">Back</a></p> <p></td> <td height="350"> </td> </tr> <tr> <td width="143"> </td> <td width="476"> </td> <td height="72" width="160"> </td> </tr> </table></div> <? } elseif(empty($phone)) { ?> <div align="center"> <table cellpadding="0" cellspacing="0" width="779" height="489" background="images/stories/bfs_form_bg.jpg"> <!-- MSTableType="layout" --><tr> <td> </td> <td> </td> <td height="67"> </td> </tr> <tr> <td> </td> <td valign="top" align="center" bgcolor="#FFFFFF"> <img border="0" src="images/stories/bfs_form_header.jpg" width="439" height="119"><p> </p> <p><font face="Bodoni MT"><b>The "<font color="#FF0000">PHONE</font>" field must not be empty</b></font></p> <p><a href="javascript:history.back(-1);">Back</a></p> <p></td> <td height="350"> </td> </tr> <tr> <td width="143"> </td> <td width="476"> </td> <td height="72" width="160"> </td> </tr> </table></div> <? } elseif(!ereg("^([0-9]{9,13})$", $phone)) { ?> <div align="center"> <table cellpadding="0" cellspacing="0" width="779" height="489" background="images/stories/bfs_form_bg.jpg"> <!-- MSTableType="layout" --><tr> <td> </td> <td> </td> <td height="67"> </td> </tr> <tr> <td> </td> <td valign="top" align="center" bgcolor="#FFFFFF"> <img border="0" src="images/stories/bfs_form_header.jpg" width="439" height="119"><p> </p> <p><font face="Bodoni MT"><b>The "<font color="#FF0000">PHONE</font>" field value must contain numbers only, and minimum of 9 numbers, maximum of 13 numbers</b></font></p> <p><a href="javascript:history.back(-1);">Back</a></p> <p></td> <td height="350"> </td> </tr> <tr> <td width="143"> </td> <td width="476"> </td> <td height="72" width="160"> </td> </tr> </table></div> <? } else { $query="INSERT INTO bfs_list VALUES ('$name','$address','$email','$phone','')"; $suxes=mysql_query($query); if($suxes) { ?> <div align="center"> <table cellpadding="0" cellspacing="0" width="779" height="489" background="images/stories/bfs_form_bg.jpg"> <!-- MSTableType="layout" --><tr> <td> </td> <td> </td> <td height="67"> </td> </tr> <tr> <td> </td> <td valign="top" align="center" bgcolor="#FFFFFF"> <img border="0" src="images/stories/bfs_form_header.jpg" width="439" height="119"><p> </p> <p> </p> <p><b><font face="Bodoni MT">You have been successfully registered for BFS Summit</font></b></p> <p><b><font face="Bodoni MT"><a href="http://familybooster.com"> Click Here</a> to Continue</font></b></td> <td height="350"> </td> </tr> <tr> <td width="143"> </td> <td width="476"> </td> <td height="72" width="160"> </td> </tr> </table></div> <? } else { ?> <div align="center"> <table cellpadding="0" cellspacing="0" width="779" height="489" background="images/stories/bfs_form_bg.jpg"> <!-- MSTableType="layout" --><tr> <td> </td> <td> </td> <td height="67"> </td> </tr> <tr> <td> </td> <td valign="top" align="center" bgcolor="#FFFFFF"> <img border="0" src="images/stories/bfs_form_header.jpg" width="439" height="119"><p> </p> <p> </p> <p><b><font face="Bodoni MT" color="#FF0000">An error occured while trying to register you</font></b></p> <p><b><font face="Bodoni MT"><a href="javascript:history.back(-1);"> Click Here</a> to try again</font></b></p> </td> <td height="350"> </td> </tr> <tr> <td width="143"> </td> <td width="476"> </td> <td height="72" width="160"> </td> </tr> </table></div> <? } } } ?> |
1 2 (of 2 pages)
