DualCore1's Posts
Nairaland Forum › DualCore1's Profile › DualCore1's Posts
1 2 3 4 5 6 7 8 ... 42 43 44 45 46 47 48 49 50 (of 371 pages)
i understand you are trying to make a tab stay highlighted among other navigation buttons for a given page but these your codes, i do not understand how you want it done with them really |
if you expect your host swrvice provider to have a plan b it is only reasonable that you have a plan b. you cannot have an effective plan b if your domain is not independent of its host. |
well, this is. . . brb need a drink. |
i wont round this up as gross negligence just yet. it may be they never had a recovery plan as a result of ignorance or the belief that their server (normally i wld say servers but. . .) wont crash. my advice to all affected is that you should give them some time to get back while you start cooking up your plan B. no need bugging their support now, they are obviously aware of the outage and directing your rage at their support lines will just lead to more chaos. relax guys, its not the end of the world, RIM was down for 72 hours and we didnt die. |
its criticism so dont expect sentiments. |
9ja no dey carry last! you referred yasef sha. oyibo no reach us at all. |
.tk is a turn off so if you are going to go really public with this you should put it on its own domain. nice concept. i tried to cook obasanjo's face, no difference before and after. |
bro if their own site is down how do you propose they send a mass mail to clients? its a general best practice for a host to keep its own site on a different server from the one hosting client sites so when there's a server outage, there is still an open channel to communicate with clients. |
have you tried asking them? |
hmm sorry o. hope for the best now but expect the worst. |
joystick, WTF. lol, what a replacement |
==save as index.php== <?php ob_start(); session_start(); //database connection $dbuser="root"; $dbpass=""; $dbhost="localhost"; $dbname="bina"; @mysql_connect($dbhost, $dbuser, $dbpass) or die("Check database connection settings" ;@mysql_select_db($dbname); //getting random string, state length function genId($length) { $characters = "0123456789abcdefghijklmnopqrstuvwxyz"; $string = ""; for ($p = 0; $p < $length; $p++) { $string .= $characters[mt_rand(0, strlen($characters))]; } return $string; } //add job type if($_POST['add_type']){ $add_job_type_name = $_POST['job_type']; $add_job_type_id = genId(10); if(@mysql_query("insert into job_type (job_type_name, job_type_id) values ('$add_job_type_name', '$add_job_type_id')" ){$add_type_message = "A new job type has been added!"; } } //add job title if($_POST['add_title']){ $add_job_title_name = $_POST['job_title']; $add_job_title_id = genId(10); $add_job_type_id = $_POST['job_type_id_2']; if(@mysql_query("insert into job_title (job_title_name, job_title_id, job_type_id) values ('$add_job_title_name', '$add_job_title_id', '$add_job_type_id')" or die(@mysql_error())){$add_title_message = "A new job title has been added!"; } } //get all job types $job_type_result = @mysql_query("select * from job_type" ;while($job_type_row = @mysql_fetch_array($job_type_result)){ $job_type_name[] = $job_type_row['job_type_name']; $job_type_id[] = $job_type_row['job_type_id']; } $job_type_row_count = count($job_type_name); ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script> <script>$(function(){ $('#add_job_type').hide(); $('#add_job_title').hide(); $('#add_job_type_link').click(function(){$('#add_job_type').fadeIn(); $('#add_job_title').hide();}); $('#add_job_title_link').click(function(){$('#add_job_title').fadeIn(); $('#add_job_type').hide();}); });</script> </head> <body> <div> <?php if($add_type_message){ ?> <p>A new Job Type has been added!</p> <?php } elseif($add_title_message){ ?> <p>A new Job Title has been added!</p> <?php } ?> <form> <table class="table"> <tr> <td>Job Type</td> <td> <select name = "job_type_id" id = "job_type_id"> <option value="none">Choose a job type</option> <?php for($i=0;$i<$job_type_row_count;$i++){ ?> <option value="<?php echo $job_type_id[$i] ?>"><?php echo $job_type_name[$i] ?></option> <?php } ?> </select> </td> </tr> <tr> <td>Job Title</td> <td><p id="job_title">Choose a Job Type above</p></td> </tr> <tr> <td>Quantity</td> <td><input type ="text" name="quantity" id="quantity" /></td> </tr> <tr> <td>Amount</td> <td><input type ="text" name="amount" id="amount" /></td> </tr> </table> </form> <p><a href="#" id = "add_job_type_link">Add more job types</a></p> <p><a href="#" id = "add_job_title_link">Add more job title</a></p> <div id="add_job_type"> <form method="post" action="#"> <table> <tr> <td>Job Type</td> <td><input type = "text" name = "job_type" /></td> </tr> <tr> <td></td> <td><input type = "submit" name = "add_type" value = "Add" /></td> </tr> </table> </form> </div> <div id="add_job_title"> <form method="post" action="#"> <table> <tr> <td>Job Type</td> <td> <select name = "job_type_id_2" id = "job_type_id_2"> <option value="none">Choose a job type</option> <?php for($i=0;$i<$job_type_row_count;$i++){ ?> <option value="<?php echo $job_type_id[$i] ?>"><?php echo $job_type_name[$i] ?></option> <?php } ?> </select> </td> </tr> <tr> <td>Job Title</td> <td><input type = "text" name = "job_title" /></td> </tr> <tr> <td></td> <td><input type = "submit" name = "add_title" value = "Add" /></td> </tr> </table> </form> </div> </div> <script> $('#job_type_id').change(function(){ var xmlhttp; var job_type_id = $('#job_type_id').val(); xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET","get_job_title.php?request=job_title&job_type_id="+job_type_id); xmlhttp.send(); xmlhttp.onreadystatechange = function(){ if(xmlhttp.readyState == 4 && xmlhttp.status == 200){ $('#job_title').html(xmlhttp.responseText); } } }); </script> </body> </html> <?php ob_flush(); ?> ===save as get_job_title.php in same folder as index === <?php //database connection $dbuser="root"; $dbpass=""; $dbhost="localhost"; $dbname="bina"; @mysql_connect($dbhost, $dbuser, $dbpass) or die("Check database connection settings" ;@mysql_select_db($dbname); //process request for job titles if($_GET['request'] == "job_title" {$req_job_type_id = $_GET['job_type_id']; $job_title_result = @mysql_query("select * from job_title where job_type_id = '$req_job_type_id'" ;while($job_title_row = @mysql_fetch_array($job_title_result)){ $job_title_name[] = $job_title_row['job_title_name']; $job_title_id[] = $job_title_row['job_title_id']; } $job_title_row_count = count($job_title_name); //echo $job_title_row_count; } if($job_title_row_count > 0){ ?> <select name = "job_title_id" id = "job_title_id"> <?php for($i=0;$i<$job_title_row_count;$i++){ ?> <option value="<?php echo $job_title_id[$i] ?>"><?php echo $job_title_name[$i] ?></option> <?php } ?> </select> <?php } else{ echo "No records"; } ?> =====sql dump ====== -- Database: `bina` -- -- -------------------------------------------------------- -- -- Table structure for table `job_title` -- CREATE TABLE `job_title` ( `job_type_id` varchar(255) NOT NULL, `job_title_id` varchar(255) NOT NULL, `job_title_name` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `job_type` -- CREATE TABLE `job_type` ( `job_type_id` varchar(255) NOT NULL, `job_type_name` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; I do hope you understand all the codes. Forgive my scattered coding, its not a habit. I'm very busy with some projects and gave you 30 mins of my precious morning hours when i'm sanest. Sorry if its not very clear. I tried to squeeze a lot together into 2 files for education purposes. I paid no regard to the look, security and form validation as these matters are outside the scope of the educational purpose. |
Is this what you want? A form containing categories (Job Type) populated into a list and another list containing sub categories (job titles) based on the job type selected. Two links below to "Add More Job Type" and "Add More Job Title". Is this it? |
im very sure if you Google'd this you will get tona of tutorials, some with step by step screenshots on this matter. |
Just saying, shouldn't this be a paid job request? You getting paid (obviously) to market this site, do your small part in creatin job opportunities for your brothers. ![]() |
contradiction: information you want populated on the select form fields are coming from a javascript array. when you add more job types, how does that get updated in thw javascript array? what are databases for? Suggestion: state what this is, a school assignment, a clients job e.t.c. State how you want it in pure English, leave the coder to worry about what technology to use. |
Its dead, no listing can be made. All listings there are 2 months old. |
Lol databoy I dunno how to write a book. Ayowumie:What your starcomms modem is showing is likely the connection speed capacity of that modem. Its like having a Honda SUV and you see 220 km/h as the max speed on the speedometer. You hire Driver A and the freak can only do 40km/h on a free way. You hire Driver B and he's a better driver and can do 120km/h on that same free way. Only some drivers will be able to drive at that 220 km/h (I could if the money or babe is right). The modem is like that Honda and Starcomms is just a driver. They are two separate entities. . . the hardware (modem) and the service provider (starcomms). Starcomms didn't make the modem (forget how they etch their name everywhere on it). |
binaflexia:No DB query, no JS page refresh, no AJAX. Then what exactly do you want? ![]() I'd like to help you with this but you have to be clear. [quote author=*dhtml¡ link=topic=787296.msg9396314#msg9396314 date=1319298177]Am having a little headache, i cannot read all this long posts now. Maybe later. But these professionals for here suppose don help you na??[/quote]I got a dislocated right arm from the pool on Friday. Dunno how but I dived in and heard my arm do "praarrp!" after a few strokes. So we in the same boat ![]() |
I left this thread cuz its a waste of time trying to reason with people that have refused to take advantage of their full reasoning powers. If you see that as eating dust. . . oh well you don't reason so its not a surprise. Get yourselves some jobs to do to kill the frustration and anguish of joblessness. |
Its hard to know what you want this form to do (behaviour) as its just an image. Are you trying to dynamically populate a second form <select> based on what is selected in the first form <select> which is also dynamically populated from a DB? |
Glad i could be of help, guys. Nymph node:Just multiply the excel document's file size by number of clients by number of times they'll need to download per month. filesize x 26 x 8 Hopefully that will give you an idea of the bandwidth you need. afam4eva:I share this view too. |
goldng, trudigits.com accepts liberty reserve. ![]() |
LoL John, ask your questions here. Olodostein, simple rule. . . both parties spend bandwidth on a direct connection. More parties spend bandwidth on a proxified connection. In a direct connection its more like your connection (your ISP) - the server - the internet connection of the server (server's ISP). The data we want is on the server. You make a request for a 500MB file on the server. . . Your ISP pulls that 500MB from the server. The server's ISP pushes that 500MB from the server and gives to you. If the data is cached on the first download then you wont be pulling that same amount of data on subsequent visits until you clear your cache. Example: Youtube videos. By the time you finish watching a youtube video for the first time you have used up a specific amount of youtube's bandwidth and your ISP has aslo used up that same amount of your bandwidth. If you do not close that page and want to play that video again, you are not pulling any extra bandwidth as the video has been cached in a temporary location. |
There is a difference between connection speed (limit) and bandwidth(limit). Connection speed: The amount of data that can be transferred (download) or received(upload) per second. (Usually measured in megabits) Bandwidth: addition of upload and download traffic over a given period of time. Olodostein:The site owner loses bandwidth and so does the visitor to the site. So if the visitor visits the homepage he has pulled 500MB of the site's bandwidth and 500MB of his ISP's bandwidth. When you download files and attachments you pull bandwidth of both your ISP and the site's ISP. Same applies for uploads. I second the use of Google for mails. Saves you and the host a lot of stress and comes with all the comfort of the Gmail UI. #GoogleApps. |
Bandwdith is an addition of upload and download traffic over a given period of time. Example 1. If you site's homepage is 500MB (God forbid). When a user visits your site's homepage he pulls off 500MB of your bandwidth. If 10 users visit just the homepage of your site they pull 5000MB (5gb) of your bandwidth. So if you are given 20GB a month and 40 users visit your site. . . thts 40 x 500MB = 20000MB (20GB). You have maxed your bandwidth and can buy more bandwidth for your host if they have that option or wait for the next 30day cycle for your bandwidth to be reset. Example 2: You have a site with 20GB (20000MB) monthly bandwidth, You have a music file that is 10MB. When you upload that music file you have spent 10MB of your bandwidth. You now have 19990MB left. When users start downloading your music file they collect from your bandwidth. So if 50 users download your music that 50 users multiplied by 10MB which is 500MB. So now you are left with 19490MB. It goes on like that. Your monthly bandwidth meter is reset every 30 days. Summary: site's upload traffic + site's download traffic = total bandwidth used. |
Lagos people, LWKMD. I can imagine the shock from residents of the said "CMS" area. Back to topic. Use what you want, just deliver what you and your client have agreed upon. . . be ready to deliver too when the client wants you to update the application with a winch flying inside the search textbox. Hope I don't see you zoom past me in GoogleSpace with the keyword "joomla winch plugin" on your tail. Personally I build from scratch cuz to use CMS I will have have to learn how to write extensions (cuz I know there are no ready made extensions to do what I do, how i do). I also choose writing from scratch so when a client calls for me to update the site with a winch flying. . . I don't even break a sweat cuz na me write every line and na me know where I go put that winch and if she no fly. . . oh well i'm the master of my codes so the winch must fly. ![]() P.S: I envy those who can code from scratch and also can code completely their CMS. Its a beauty of both worlds. . . . but I like my thing my way ![]() |
Gori-mapa ![]() |
LoL, maybe the developer was watching this. The bugs seem to have been fixed. Its really bad that we pay no heed to the quality of our "finished" jobs, turning the public into quality testers in the first few weeks of release. |
zeeleso:I guess this site is new and its yours or belongs to someone you know. Pass this on to whom it may concern: Forgotten Password does not work No input validation for the login form Site is open to SQL injection. . . bad use of the PHP include(). http://www.nairasocial.net/index.php?action=configuration "Warning: include(configuration.php) [function.include]: failed to open stream: No such file or directory in /home/nairaso1/public_html/index.php on line 74" http://www.nairasocial.net/index.php?action=userpredictions "Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/nairaso1/public_html/userpredictions.php on line 61" |
1 2 3 4 5 6 7 8 ... 42 43 44 45 46 47 48 49 50 (of 371 pages)
;

Dunno how but I dived in and heard my arm do "praarrp!" after a few strokes. So we in the same boat 

