Jump to content

DontheCat

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by DontheCat

  1. Thanks kicken.... I'm migrating to 7.0 right now .... I'm still not able to understand one thing though..... why is the data being accessed and displayed if I access it on my localhost ? (Screenshot attached). But only partly.. the listings stop at Feb 2019 ...
  2. Thanks folks... Sorry got bust with some offline work. It is self-generated. I'm trying to add the Certificate, but strangely the host doesn't offer SSL management through the CPanel. or WHM I'm using Apache, PHP5.6. The cURL library is default installed. taquitosensei> Thanks.. will check it out.
  3. requinix, thanks for the response I uploaded a simple text file to the root of that URL and the content is perfectly displayed when accessed using http but this is the error when trying to access through https Secure Connection Failed An error occurred during a connection to xx.xxx.xxx.xxxx. PR_END_OF_FILE_ERROR The page you are trying to view cannot be shown because the authenticity of the received data could not be verified. btw, the website URL automatically reverts to https even if the URL is typed as http.... I also checked if curl is enabled on the webserver and it is. Thanks
  4. Hi folks, a few days back, we enabled SSL on our office server and the intranet migrated to https. Everything is ok on the intranet. On the public internet, we noticed today that the page on our website, which connects to our office server to fetch and display data was throwing an error, which I presumed was a Security Certificate issue... An area that's like the Dark Side of the Moon for me.. the webpage - https://liveconnections.in/hotjobs.php This is the error from the logs PHP Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed PHP Warning: file_get_contents(): Failed to enable crypto PHP Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed Anycase, the internet was willing to help and so I updated the code to a curl function. The Data is not displaying still... However, when I try to access the office server by loading the php page in my localhost, the data is displayed. Here's the code... where am i going wrong ? <?php //error_reporting(E_ERROR | E_PARSE | E_ALL); $page="jobs-listing"; ?> <header class="section background-livec text-center"> <h3 class="text-white margin-bottom-0 text-size-40 text-thin text-line-height-1">Current & Hot Jobs</h3> </header> <?php $industry = $_GET['industry']; $location = $_GET['location']; $expMin = $_GET['expMin']; $expMax = $_GET['expMax']; $sortBy = $_GET['sortBy']; $cpg = $_GET['page']; if(empty($cpg) || $cpg==1) $npl = 1; else { //$npl = (($cpg+1)*10) - 9; $npl = $_GET['startingRowNo']; } $industry = str_replace(' ', '%20', $industry); $location = str_replace(' ', '%20', $location); $url = "https://xx.xxx.xxx.xxx/WebService/rest/"; function file_get_contents_curl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser. curl_setopt($ch, CURLOPT_URL, $url); $data = curl_exec($ch); curl_close($ch); return $data; } if(!empty($sortBy)) { $json = file_get_contents_curl($url.'getHeadersBySearch?industry='.$industry.'&location='.$location.'&expMin='.$expMin.'&expMax='.$expMax.'&sortBy='.$sortBy.'&startingRowNo='.$npl.'&noOfRows=1000000'); $data = json_decode($json); } else if(!empty($industry) || !empty($location) || !empty($expMin) || !empty($expMax)) { $json = file_get_contents_curl($url.'getHeadersBySearch?industry='.$industry.'&location='.$location.'&expMin='.$expMin.'&expMax='.$expMax.'&sortBy=&startingRowNo='.$npl.'&noOfRows=1000000'); $data = json_decode($json); } else { //$json = file_get_contents_curl($url.'getOnlineWebPosting'); $json = file_get_contents_curl($url.'getHeadersBySearch?industry='.$industry.'&location='.$location.'&expMin='.$expMin.'&expMax='.$expMax.'&sortBy=&startingRowNo='.$npl.'&noOfRows=1000000'); $data = json_decode($json); //if (!$data) echo "Data Not Found" ; } if($sortBy=='DESC' || $sortBy=='') { $aclass = 'down_arrow'; } else { $aclass = 'up_arrow'; } $json2 = file_get_contents_curl($url.'getSearchData'); $data2 = json_decode($json2); $industry = str_replace('%20', ' ', $industry); $location = str_replace('%20', ' ', $location); if($industry=='F amp A - BPO') { $industry = 'F & A - BPO'; } if($industry=='OIL amp GAS') { $industry = 'OIL & GAS'; } ?> <div class="section background-white"> <div class="background-white"> <p class="text-padding-bot text-letter-spacing1">A cross-section of Jobs currently available. We recommend you to contact our Executives for further info. <br /> More details available when the Job is '<strong>View'</strong>ed. </p> </div> <?php //$data=''; //if($data!=''){ ?> <?php //if ($checkyear>2017) { ?> <div class="subJobs"> <ul> <li> Industry <br /> <select name="industry" id="industry" class="sel"> <option value="">Select Industry Name</option> <?php for($i=0; $i<count($data2[0]); $i++) { ?> <?php if(isset($industry) && $industry==$data2[0][$i]) { ?> <option selected value="<?php echo $data2[0][$i];?>"><?php echo $data2[0][$i];?></option> <?php } else { ?> <option value="<?php echo $data2[0][$i];?>"><?php echo $data2[0][$i];?></option> <?php } } ?> </select> </li> <li>Location<br /> <select name="city" id="city" class="sel"> <option value="">Select City Name</option ><?php $m=0; for($j=0; $j<count($data2[1]); $j++) { ?> <?php $locat = explode(",",$location); ?> <?php if($locat[$m]!="" && $locat[$m]==$data2[1][$j]) { ?> <option selected value="<?php echo $data2[1][$j];?>"><?php echo $data2[1][$j];?></option> <?php ++$m; } else { ?> <option value="<?php echo $data2[1][$j];?>"><?php echo $data2[1][$j];?></option> <?php } } ?> </select> </li> <li>Experience <br /> <select name="minyear" class="sel2" id="minyear"> <option value="">Min</option> <?php for($ii=0; $ii<46; $ii++) { ?> <?php if($expMin!="" && $expMin==$ii) { ?> <option selected value="<?php echo $ii; ?>"><?php echo $ii; ?></option> <?php } else { ?> <option value="<?php echo $ii; ?>"><?php echo $ii; ?></option> <?php } } ?> </select> <select name="maxyear" class="sel2" id="maxyear" onchange="return select_max();"> <option value="">Max</option> <?php for($ii=0; $ii<51; $ii++) { ?> <?php if($expMax!="" && $expMax==$ii) { ?> <option selected value="<?php echo $ii; ?>"><?php echo $ii; ?></option> <?php } else { ?> <option value="<?php echo $ii; ?>"><?php echo $ii; ?></option> <?php } } ?> </select> <!-- select name="" class="sel2" id="sort"> <option value="">Select</option> <option value="ASC">ASC</option> <option value="DESC">DESC</option> </select --> </li> <li class="ser"><button type="button" onclick="search_by_category()" class="btn btn-default" style="margin-top:25px;"><i class="fa fa-search"></i> Search</button></li> </ul> </div> <!-- Selected Jobs Headline Info --> <div class="line"> <p class="text-dark text-center text-size-16"> <?php if($industry) echo 'Showing ' . '<b>' . $industry .'</b>' . ' Jobs' ; ?> <?php if($location) echo ' at ' . '<b>' . $location .'</b>' ; ?> <?php if($expMin) echo ' with Min ' . '<b>' . $expMin .'</b>' ; ?> <?php if($expMax) echo ' to Max '. '<b>' . $expMax.'</b>' ; ?> <?php if($expMin | $expMax) echo ' Years Experience' ;?> </p> </div> <!-- Jobs Table --> <table id="example" class="display" cellspacing="0" width="100%"> <thead> <tr> <th class="jobs_noshow text-center" width="5%">S.No</th> <th class="text-center" width="15%">Posted On</th> <th class="text-center" width="30%">Job Title</th> <th class="jobs_noshow text-center" width="15%">Level</th> <th class="jobs_noshow text-center" width="15%">Location</th> <th class="jobs_noshow text-center" width="15%">Job Code</th> <th class="text-center" width="5%">Action</th> </tr> </thead> <tbody> <?php $ri=1; foreach($data as $kk=>$d) { ?> <?php $date_posted = $d->postedDate; // get the Posted Date $date_posted_year=date("Y",strtotime($date_posted)); // Get the Year from the date and store in a variable if ($date_posted_year>$jobs_restrict_year) { // Show only Jobs posted after this year ?> <tr> <td class="jobs_noshow text-center"><?php echo $ri; ?></td> <td class="text-center"><?php echo $d->postedDate; ?></td> <td><?php echo $d->title; ?></td> <td class="jobs_noshow ctext notreq"><?php echo $d->level; ?></td> <td class="jobs_noshow text-center notreq"><?php echo $d->location; ?></td> <td class="jobs_noshow text-center"><?php echo $d->requirementID; ?></td> <td class="text-center"><a class="button background-livec border-radius text-white" style="color:white" data-fancybox="ajax" href="?contentid=jobs-detail&requirementID=<?php echo $d->requirementID; ?>&requirementSeqNo=<?php echo $d->requirementSeqNo; ?>" data-type="ajax">View</a></td> </tr> <?php } ?> <?php $ri=$ri+1; } ?> </tbody> </table> <script type="text/javascript"> $(document).ready(function () { var table = $('#example').DataTable( { "pageLength": 25, "sPaginationType":"full_numbers", "oLanguage": { "sInfo": 'Showing _START_ to _END_ of _TOTAL_ Jobs.', "sInfoEmpty": '', "sEmptyTable": "No Jobs found currently", } }); $('#example').removeClass( 'display' ).addClass('table table-striped table-bordered'); }); </script> <style> .dataTables_filter { display: none; } </style> <!-- End of Table --> </div> <?php // } else { ?> <div style="margin: 20px 0 40px 0px;height:200px;text-align:center;"> <h1 style="font-size:16px;">Server is unavailable at the moment. Please try after some time.</h1> </div> <?php //}?> </div> <!--jobs end--> <script type="text/javascript"> function search_by_category() { industry = $('#industry option:selected').val(); //city1 = $('#city option:selected').val(); minyear = $('#minyear option:selected').val(); maxyear = $('#maxyear option:selected').val(); //sortBy = $('#sort option:selected').val(); var city = $('select#city').val(); var cur_pg = "<?php echo $cpg; ?>"; var tot = "<?php echo $total; ?>"; var tot_pgs = Math.ceil(tot/25); //if(cur_pg=="") cur_pg = 1; var last_pg = tot_pgs - cur_pg; if(last_pg==0) records = tot - ((tot_pgs -1) * 25); else records = 25; var strt_val = ((cur_pg-1) * 25) + 1; if(industry=='F & A - BPO') industry ='F amp A - BPO'; if(industry=='OIL & GAS') industry ='OIL amp GAS'; city1 = document.getElementById("city").value; if(city1=="" || city1=="null") { city=""; } if(industry!="" || city!="" || minyear!="" || maxyear!="") { location.href="hotjobs.php?contentid=hotjobs&industry="+industry+"&location="+city+"&expMin="+minyear+"&expMax="+maxyear+"&sortBy=&startingRowNo=1"+"&noOfRows="+records+"&page="+cur_pg; } else { //alert("Please select any one of the fields"); location.href="hotjobs.php?contentid=hotjobs&industry="+industry+"&location="+city+"&expMin="+minyear+"&expMax="+maxyear+"&sortBy=&startingRowNo=1"+"&noOfRows="+records+"&page="+cur_pg; } } function sort_by_location() { var order = '<?php echo $sortBy; ?>'; industry = $('#industry option:selected').val(); city = $('#city option:selected').val(); minyear = $('#minyear option:selected').val(); maxyear = $('#maxyear option:selected').val(); city1 = document.getElementById("city").value; if(industry=='F & A - BPO') industry ='F amp A - BPO'; if(industry=='OIL & GAS') industry ='OIL amp GAS'; if(city1=="") { city=""; } else { city = $('select#city').val(); } if(order=="" || order=="DESC") { location.href="hotjobs.php?contentid=hotjobs&industry="+industry+"&location="+city+"&expMin="+minyear+"&expMax="+maxyear+"&sortBy=ASC"+"&startingRowNo=1&noOfRows=10"; } else { location.href="hotjobs.php?contentid=hotjobs&industry="+industry+"&location="+city+"&expMin="+minyear+"&expMax="+maxyear+"&sortBy=DESC"+"&startingRowNo=1&noOfRows=10"; } } function select_max() { minyear = document.getElementById("minyear").value; maxyear = document.getElementById("maxyear").value; if(parseInt(maxyear)>=parseInt(minyear)) { return true; } else { if(maxyear!="") { alert("Maximum year must be equal or greater than minimum year"); $('#maxyear').val(""); return false; } } } </script> Also, if i change the $url in my code to https:// , no data is displayed... I raised a Support request to the Hosting provider, but they seem to have vanished into the ozone.... Any help would be highly appreciated. Cheers - Murali
  5. Dreamweaver creates this code automatically when using the Form creation options. Can someone pls explain what the code actually does ? Thanks <?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; }
  6. We have started an initiative titled “CAN Conquer CANcer” aimed at spreading a message to dispel the myths surrounding the disease and help create awareness. In light of the fact that the Internet is one of the fastest and effective ways to spread the message to a larger audience, we have hosted a Contest for Bloggers titled “CAN Conquer CANcer Blog a Thot Contest” as part of the initiative . It’s probably the 1st time in Blogsphere history that a contest is done on this scale with so much involvement from people from around the globe. Here’s the link to the Contest. [a href=\"http://connexionsonline.biz/conxw/ican/\" target=\"_blank\"]http://connexionsonline.biz/conxw/ican/[/a] While most of the regular coding is complete, I'm stuck with the coding for the Judges' ratings. I've mentioned below the Flowchart of the requirement. As I'm currently involved in the off-line events of the initiative, I request anyone to help me out with the coding.. Tables ---------- TABLE `bloggers` 'bID` int(11) NOT NULL auto_increment `bdate` date NOT NULL default '0000-00-00', `bname` varchar(100) NOT NULL default ''(Blogger) `btitle` varchar(200) NOT NULL default ''(Title of Blog) `bposttitle` varchar(200) NOT NULL default '',(Title of the related contest entry) `burl` varchar(200) NOT NULL default '', PRIMARY KEY (`bID`), TABLE `judges` ( `juryID` int(11) NOT NULL auto_increment, `juryname` varchar(100) NOT NULL default '', `username` varchar(25) NOT NULL default '', `password` varchar(25) NOT NULL default '', PRIMARY KEY (`juryID`), TABLE `rating` ( `bID` int(11) NOT NULL default '0', `juryID` int(11) NOT NULL default '0', 'original'int(11) NOT NULL default '0',(originality) 'flair'int(11) NOT NULL default '0',(flair and style) 'motivation'int(11) NOT NULL default '0',(motivational content) 'linked'int(11) NOT NULL default '0',(link to contest) `ratingtotal` int(11) NOT NULL default '0', `comments` blob FlowChart ---------------- A judge using his/her credential log in and is taken to a page where Blogs that haven't been Rated (by him/her only) are displayed. Other judges ratings are not visible. The Blogger name, Title of the Post (linked to actual post) and the Ratings dropdowns are displayed. Ratings are on a scale of 1 to 5. The judges are required to rate on Originality, Flair/Style of Content, Motivational/ Informational strength and the visibity of banner link in the contestant Blog. The total of all these sub-ratings are stored in the 'ratingstotal' column. Once the rating is done for a partcular contest entry, that entry does not appear again in the list. The judges may also be shown a page where the ratings they have completed are listed. Ratings done by her/him are only visible. The avearge of all the Judges' 'ratingstotal' for a partcilcular Blog is calculated and is displayed on another page accessible only to the moderator, (that's me). This average is the final score for that partcular Blog Entry for the contest. Any support / help in this would be heartily appreciated. Thanks a Mil..
  7. I am running a Contest for the Best Blog Post on Cancer Awareness from Nov 22nd. The form on my page collects these information (field names in bracket) 1. Blogger's Name / Nick (blogger) 2. Blog Title (blogtitle) 3. URL to the actual Post (blogurl) The data is being stored in a table called blogcontest. What I would like to display on another page is the Blogger's Name and the Title of the Blog (of all participants). The Title should be hyperlinked to the blog post. Howe do I do this ? I'm done with everything, except I'm stuck with the hyperlinking. Thanks for the support
  8. Thanks Chris, Lemme make it simpler :-) Each Member is a distributor of pharmaceutical products. Naturally, each one is a distributor for several manufacturing companies. There are 1300+ companies. The member has to Login and is taken to a page where these Companies are Listed. I thought a ListBox would be the best option to present this. The Companies are populated from another table and are referred by their equivalent ID. Now the Member can select multiple companies he represents and the information needs to be stored as Member_Id / Company_Id in another table. But I dont want to store the information as an array, rather as separate records. My queries now : Would it be possible to display the 1300+ Companies in any other manner ? Multi-page options are out as it would be cumbersome for the Registrant. I tried some java so that the Member can select a company and "ADD: it to another empty Box alongside. But I'm getting some errors. Thanks for the support
  9. jamie, your solution is the one I tried after I posted this query here. It works. meaning the DBs get populated alright. But the problem is that the session variable created by my regular Login page does not match the other programs' authentication scripts. I'm forced to change lotsa code especially in phpBB. Also, changing the login auth script to read from another table apart its own created some other problems. What I've done is ask the Registering Members to use the same credentials and register separately in each application. Actually, I started developing another time-bound site in the meanwhile and so the earlier one is in temporary cold-storge :-) Thanks Chris, jamie for the suggests. I'll keep this post updated as I work on a solution. Ideas and more suggestions welcome...
  10. I use POST in the form. I tried something like this to return the revdistrict from the revdist_ID posted by the form. [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]<input type=\'hidden\' name=\'district\' value=\"[span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#0000BB\"]$row_Rev_Dists[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'revdistrict\'[/span][span style=\"color:#007700\"]][/span][span style=\"color:#0000BB\"]?>[/span]\">[span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#0000BB\"]$POST[/span][span style=\"color:#007700\"][[/span][span style=\"color:#0000BB\"]revdist_ID[/span][span style=\"color:#007700\"]];[/span][span style=\"color:#0000BB\"]?>[/span]>[/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Nothing happens and I dont even get an error message !!
  11. Thanks Matty, but will your code not return the revdist_ID again? I wanted the corresponding revdistrict to be returned in the Hidden field. Thanks for the support.
  12. I have this form in which I have a File field from where the User can upload his/her photograph. Which is a better way to store the image ? In the database itself or in a separate folder and then have the <img src> in the database ? I've searched far and wide for a simple solution, but there are thousands of results for my search and I'm confused. Can someone direct me to a thread or script? Thanks for the support
  13. I have this Select option in my form -------------------------------------------------------------------------------- [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]<select name=\"revdist_ID\"> [span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]do { [/span][span style=\"color:#0000BB\"]?> [/span] <option value=\"[span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#0000BB\"]$row_Rev_Dists[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'revdist_ID\'[/span][span style=\"color:#007700\"]][/span][span style=\"color:#0000BB\"]?>[/span]\">[span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]echo [/span][span style=\"color:#0000BB\"]$row_Rev_Dists[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'revdistrict\'[/span][span style=\"color:#007700\"]][/span][span style=\"color:#0000BB\"]?>[/span]</option> [span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]} while ([/span][span style=\"color:#0000BB\"]$row_Rev_Dists [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_fetch_assoc[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$Rev_Dists[/span][span style=\"color:#007700\"])); [/span][span style=\"color:#0000BB\"]$rows [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_num_rows[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$Rev_Dists[/span][span style=\"color:#007700\"]); if([/span][span style=\"color:#0000BB\"]$rows [/span][span style=\"color:#007700\"]> [/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"]) { [/span][span style=\"color:#0000BB\"]mysql_data_seek[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$Rev_Dists[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]0[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#0000BB\"]$row_Rev_Dists [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_fetch_assoc[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$Rev_Dists[/span][span style=\"color:#007700\"]); } [/span][span style=\"color:#0000BB\"]?> [/span] </select>[/span][!--PHP-Foot--][/div][!--PHP-EFoot--] -------------------------------------------------------------------------------- The code returns and datalogs the revdist_ID perfectly. I'd also like to have the revdistrict corresponding to the selected revdist_ID in a HIDDEN field. How would I be able to do it? Thanks for the support
  14. Sorry about not posting the solution before I closed the thread.. I define the URL within the area map and GET it on the next page <area shape="rect" coords="31,16,78,27" href="mynextpage.php?district=1" target=""> in the Target Page $district = $_GET["district"] $SQL = "select * from Mytable where district = ". $district Hope it is useful to others
  15. This problem has been solved in another PHP forum. So I'm closing the thread...
  16. I have this Map of my State and I've created hotspots for each of the 23 Districts within. I want the User to click on a particular Spot, which would go to a page where the members for that state would be displayed using that District ID as the Search Key. I guess I can pass on a Form Input data to another page as Hidden values, but how do I do it in this case ? Morover, DW gives one common Map ID for the entire image and different co-ordinates. How then would I able to allocate the District IDs for each Spot ? Thanks for the support
  17. have this site where I've installed phpBB-Forum, B2evo blogs, A GB and PhpLinks. All of them have their own databases. I also have a Form where members can register. The Form has Login and PassWord entry fields and the values are stored in the Member master table in a different databse. Is there someway I could also populate the Login/Password of all the applications on submission of the above form? Would the member then be able to be "Logged In" while he accesses the different areas across the site? Or would it need a session varaiable or something like that? Thanks for the support
  18. am creating a website for a Pharma Distributors Association. The Members could be representing various Pharmaceutical Companies. This is the Scenario. A Member could be a distributor for N number of Parent Companies . He Could represent All or N Divisions of a Parent Company. The Parent Companies could be anything from 400 - 600 and will be updated as and when New Companies are found. Each Parent Company could have N number of Divisions within itself. ==================================== I have created these Tables 1.Table Parent_Companies (data entered by Admin) Columns - Company_ID (Autoincremented), CompanyName 2.Table Divisions Columns - Company_ID, Division_ID(Autoincremented), DivisionName The DivisionName are entered thru a form by Admin. This Form has CompanyName values as dropdown, but returns the respective Company_ID to the Table2 3.Table Distributor_Companies Columns - Distributor_ID, CompanyDivision ================================================== Now this where I'm stuck I would like to have the Member Select the Company Divisons he represents from a Form. Since the Companies data would be in 1000s, I dont want to use a Drop-Down. I presume that a 25 Line List-Box would be a better option from which Companies can be added to another multi-line Text-box. The Options in the ListBox should be concatenated as "Parent Company - Division". How do I do this? I've found a java script that does the Adding/ Removing between the ListBox and TextBox. But I've not been able to figure out how I could store each "Parent Company - Division" as a record in Table3. (I dont want to store as an array) I understand that I need to use a Loop here, just cant figure out how to do it. Also, how would I able to genrate a mail to the Admin with details of all the Parent Company - Divisions when the Member submits the Form? On the other hand, would it be easier to key in the Divisions as "Parent Company - Division" itself in the 1st place in Table1 and avoid Table2? Is there a simple solution or am I complicating things? Thanx for the support
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.