Jump to content

BuildMyWeb

Members
  • Posts

    188
  • Joined

  • Last visited

Everything posted by BuildMyWeb

  1. not sure if this is the right place to post about help with FTP clients but i see an FTP thread stickied here and no other forums seems more appropriate. please move if im in the wrong place. we have a reseller hosting account with crocweb. their service has been great the first few months. we recently hit a hiccup where for the last few days we have difficulty ftp-ing to the server. nothing that i can think of was changed on our side. the problem just started spontaneously from our perspective. i am in NY and my partner in NC. on the same night we both had trouble getting or staying connected via ftp. i was using WINSCP and he tried FileZilla, the built-in Mac FTP client, and CyberDuck. we could connect but sometimes while surfing directories, we would get a FAIL TO RETRIEVE DIRECTORY LISTING error. or the ftp client would timeout. the problem seems to have cleared up for my colleague but continues sporadically for me. crocweb support was very quick to say they could not replicate the problem but insisted it has to be client side so they refuse to investigate any further. their "solution" was for me to switch ftp programs. theyve told me its my problem and they wont assist with it. i did download and try filezilla both in passive and active mode. same problems. tried both modes in WINSCP too and still problems. not sure what else to do at this point. have been googling the topic but no luck figuring this out. from what ive read, it frequently can be a setting in the ftp program that (such as switching to passive mode) can be the fix. tried whatever ive found. also have read that there could be a server configuration problem. port not configured properly or something. i really dont know. anyone have any ideas what i can do?
  2. you would likely do better on wordpress support forums, im guessing
  3. i dont see why you cant do something like order them alphabetically. throw them into an array first and then sort: <?php sort( $array ); ?> http://uk.php.net/manual/en/function.sort.php once you have your items sorted, loop through the array to create your string. if you want to maintain the key/value relationship such as in an associative array, use asort() instead.
  4. i dont think this is a php issue. youre missing a submit input. looks like youre using this <a href="#" class="btn btn-inverse btn-block">SEARCH PROPERTY</a> where you need something more like <input type="submit" name="submit_button" value="SEARCH PROPERTY" /> or if you want an image button you can do <input type="image" src="[image path]" name="submit_button" />
  5. so i have been asked to verify that someone is 21 according to the dob entered in an HTML FRI form. basically we are accepting data in text input fields. two digits for month, two for day, and 4 for year. the data is then formatted as per the following: "mm/dd/yy" via concatenation. in our handler script, we are doing the following: $dob = $arr_m[$i] . "/" . $arr_d[$i] . "/" . $arr_y[$i]; $dob_ts = strtotime($dob); $today_ts = time(); $twentyone = 21*365*24*60*60; if( ($today_ts - $twentyone) > $dob_ts ) echo"we are 21"; our results are not what we expect tho. today's date is may 6 2014. however our script is accepting 05/11/1993 as being 21 years old and not 05/12/1993. we are off by a few days. i assume there is a better way to calculate 21 years of age from today's date?
  6. after posting above, i rechecked the same page today. mind you, no edits were made to the header file. and yet now IE 9 is rendering in IE9 Standards mode on my pc.
  7. grabbed doctype from w3: http://www.w3.org/QA/2002/04/valid-dtd-list.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> and the page file validates with w3 validator: http://validator.w3.org/ i wrote "(what we think are)" because i dont like to presume much. too many people look past obvious solutions when they are arrogant enough to "be certain" of what they know. the site renders properly in newest versions of FF, Safari, and Chrome on my pc, laptop, ipad and iphone. again, the site in question, using the doctype i pasted above, has rendered in IE9 Standards Mode all along on my pc and it still does on my laptop. only once i RESET INTERNET EXPLORER SETTINGS in the Options menu did the site start rendering in quirksmode on my pc ONLY so i suspect its soemthing in this particular instance of IE9 settings.
  8. I recently RESET FACTORY DEFAULTS in IE9 Internet Options. since, sites are defaulting into quirksmode and making everything look all wonky. these sites never triggered QM before. some of them are sites we developed with (what we think are) proper DTDs. and other computers running IE9 are not jumping into QM. cant find anything via google search about IE9 settings. all quirksmode searches relate to the development side and how to avoid triggering it with proper code. anyone know of settings in IE9 for this?
  9. id give the parent elements background colors too for testing. see which isnt lining up. 1px off lots of times is a border issue. i noticed border-collapse in your css. id start there
  10. im sorry but i dont know what youre asking. or what the problem is
  11. it would help to see the file. you are setting height in your columns and not sure what the containing element is. for instance, if the containing element has a fixed height, and your columns are each set at height:100%; , i dont believe they will adjust vertically for more content. and that content will be cutoff with overflow:hidden;
  12. i dont really understand your question but at first glance, you are assigning $upload_Name in line 7, but you refer to it in line 3 $upload_URL = "uploads/".$upload_Name ; ... ... $upload_Name=($_FILES['FILE']['name']); fyi, youd prolly get better help in a different forum. this is not an HTML question
  13. a friend got the answer real quick. was simple, now that i see it. wasnt identifying the table for 'status'. the following works: SELECT t_u.*, t_a.access_lvl, t_a.biz_name from uploads_rf AS t_u, user_accts AS t_a WHERE t_u.project_id = '8' AND t_u.pipeline_item = 'rf' AND t_a.email = t_u.author ORDER BY FIELD(t_u.status, 'open', 'rejected', 'closed') note: ORDER BY FIELD(t_u.status, ... thanks for the help everyone
  14. Name Type Collation Null Default status char( 8 ) utf8_bin No open $num_rows = $result_docs->num_rows; echoing $num_rows returns a NULL, not zero results. FIND_IN_SET() had same result
  15. thanks for the replies guys. jazzman: havent used case statements in mysql before but ill read up on them. its an option but not required for the FIELD() function to work properly, correct? barand, thx for the alert on join condition. sounds like youre saying my statement should be working though. i cant figure out why im getting 0 results with it. if i use the same exact query but switch from ORDER BY FIELD() to ORDER BY, it works great. i dont know where to go from here. there shouldnt be a compatibility issue with the FIELD() function and my version of mysql, should there?
  16. mysql v5.5.34-cll this query works: SELECT t_u.*, t_a.access_lvl, t_a.biz_name from uploads_rf AS t_u, user_accts AS t_a WHERE t_u.project_id = '8' AND t_u.pipeline_item = 'rf' AND t_a.email = t_u.author ORDER BY status there are three status values. 'open', 'closed', 'rejected'. when i try sorting by the status column according to value as in such, i get 0 results. query_docs=SELECT t_u.*, t_a.access_lvl, t_a.biz_name from uploads_rf AS t_u, user_accts AS t_a WHERE t_u.project_id = '8' AND t_u.pipeline_item = 'rf' AND t_a.email = t_u.author ORDER BY FIELD(status, 'open', 'rejected', 'closed') is my mysql written correctly? any thoughts?
  17. as a follow up, i think it is the onclick event that is failing in IE. i put an alert() as the first statement in the show_signup function and cannot trigger it in IE tho it triggers in the other major browsers listed above. am i doing this wrong? function set_events() { input_signup.onclick = show_signup; input_donation.onclick = show_donate;
  18. i have some javascript referenced in an external file that is working great in FF, Chrome, and Safari, but not IE 9. when i click on the radio buttons (id=input_signup and id=input_donation), one of two block elements should display, and the other hide. i believe i have javascript properly enabled in IE. any thoughts? my js is not the best window.onload = init_all; function init_all() { // stop script if getElementById not working in this browser if( !document.getElementById ) alert('Please turn on Javascript to use this site properly.'); var input_signup = document.getElementById("input_signup"); var input_donation = document.getElementById("input_donation"); var sponsor_yes = document.getElementById("sponsor_yes"); var sponsor_no = document.getElementById("sponsor_no"); // run through the show_hide function checks when page loads set_events(); } // close init_all // show_hide_functions function set_events() { input_signup.onclick = show_signup; input_donation.onclick = show_donate; sponsor_yes.onclick = show_sponsor; sponsor_no.onclick = hide_sponsor; // in case page is refreshed or we come back via php header(), stay with form we were on if( input_signup.checked ) show_signup(); if( input_donation.checked ) show_donate(); } // close function show_hide() function show_signup() { var form_signup = document.getElementById("form_signup"); var form_donate = document.getElementById("form_donate"); form_signup.style.display = 'block'; form_donate.style.display = 'none'; } function show_donate() { var form_signup = document.getElementById("form_signup"); var form_donate = document.getElementById("form_donate"); form_signup.style.display = 'none'; form_donate.style.display = 'block'; } function show_sponsor() { var cell_sponsor = document.getElementById("td_sponsor_name"); cell_sponsor.style.display = 'block'; } function hide_sponsor() { var cell_sponsor = document.getElementById("td_sponsor_name"); cell_sponsor.style.display = 'none'; } and the HTML form: <form action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post"> Sign-up for the event ($25 fee per entrant): <input type="radio" name="reg_type" id="input_signup" <?php if( $_SESSION['form_version'] == "signup" ){ echo"checked='checked'"; } ?> /> | Donation Only: <input type="radio" name="reg_type" id="input_donation" <?php if( $_SESSION['form_version'] == "donate" ){ echo"checked='checked'"; } ?> /> </form>
  19. dung's idea recommends javascript. if youre not comfortable with that, you could stick with php. capture the value of the POSTed variable and use an if statement. <button name="LED2" style="height: 1.8em; width: 10em; font-size: 16px;<?php if( $_POST['LED2'] == "ON" ){ echo" color:red;"} ?>" value="ON" type="submit"></button>
  20. i didnt want to track down every link on the site that uses the old URL and replace it with a static one. that was my objective. but it sounds like from what you guys are advising, i will have to do that in this scenario. thanks for the advice. i appreciate it.
  21. there is an SEO party involved that wants specific replacements for these dynamic URLs and the replacements are not necessarily of any pattern that i can write a regexpression for. some have the id# in the new URL (in the above case "36271") and others dont. i also didnt want to track down every link on the site that uses the old URL and replace it with a static one. ie. find all instances of "/details.php?prod=36271" and in the HTML replace with "/a-nicer-url" there is only a product line of about 40 items so crazy as it seemed, i was considering writing up to 40 individual rewrites
  22. i know the answer has to be here, or elsewhere on the web, but ive searched both for the last hour and im more confused than when i started. i read this as well and it cleared some things up relating to other issues but not this issue: http://corz.org/serv/tricks/htaccess2.php anywho, my problem is i have a php site where we pass GET values in the URL. we dont want users to see the ugly URLs however. so for instance, this is the current URL: "http://mysite.com/details.php?prod=36271" and we want to write a line it htaccess that rewrites the URL to: "http://mysite.com/a-nicer-url" is the above even possible? this is my best attempt thus far: Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_URI} ^details\.php\?prod=36271$ RewriteRule /a-nicer-url/%1 [L,R]
  23. thanks mac. INSERT IGNORE... ill have to read up on that. appreciate the help.
  24. im trying to improve my novice MySQL skills. the following works but it makes 4 calls to the db. im wondering if there is a more efficient way to accomplish the below, ie. less database queries. i will comment below what is happening to make this easier to understand what im trying to accomplish. basically, a user is trying to create a new project that has a UNIQUE name as well as invite other users to access it. members accounts are identified by their unique email address. we have two tables. $table_projects stores the project NAME and a unique ID. $table_project_members stores EMAIL of users invited matched with the ID from $table_projects. // check to see if the submitted PROJECT NAME was used before. it must be UNIQUE $query_sel = "SELECT project_name FROM " . $table_projects . " WHERE project_name = '" . $project_name . "'"; $result_sel = $db_connect->query( $query_sel ); // execute the query $num_rows_sel = $result_sel->num_rows; // if project name was already used if( $num_rows_sel > 0 ) { header( 'Location: ../project_new.php?msg_raw=pna' ); } else { // enter our newly submitted project info into the db // post project to db $query_np = "INSERT INTO $table_projects ( id, project_name, author, status, timestamp ) VALUES( 0, '" . $project_name . "', '" . USER_EMAIL . "', 'active', '" . $ts . "')"; $result_np = $db_connect->query( $query_np ); // execute the query // if project posted to db successfully if( $result_np ) { // get the id of our newly created project to place in project_members entry below $query_id = "SELECT id FROM " . $table_projects . " WHERE project_name = '" . $project_name . "'"; $result_id = $db_connect->query( $query_id ); // execute the query $row_id = $result_id->fetch_assoc(); // put field values for the row in an array // unique ID of our project $project_id = $row_id['id']; // if users were added if( !empty($u_emails) ) { // split textarea into separate email addresses $array_u_emails = explode("\n", $u_emails); foreach( $array_u_emails as $address ) { $address = trim($address); // add the email(unique) of each user that was invited to the project // along with the project id we queried above // post users to db $query_members = "INSERT INTO $table_project_members ( id, project_id, user_email ) VALUES( 0, '" . $project_id . "', '" . $address . "')"; $result_members = $db_connect->query( $query_members ); // execute the query } } // close if( !empty($u_emails) ) // unset NEW PROJECT SESSION vars unset( $_SESSION['np_project_name'] ); unset( $_SESSION['np_u_emails'] ); header( 'Location: ../thankyou.php?status=np&&arg=' . $project_name ); } else { error( 30001 ); } } // close else
×
×
  • 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.