Jump to content

SarahB12

Members
  • Posts

    34
  • Joined

  • Last visited

Profile Information

  • Gender
    Female

SarahB12's Achievements

Member

Member (2/5)

0

Reputation

1

Community Answers

  1. I'm using https://datatables.net/ to display a calendar of information. By default all of the days are displayed (Monday - Sunday) and I have checkboxes to hide specific days. <input type=\"checkbox\" checked onclick=\"toggle('.Monday', this)\" > This works well, but I'd like to change the functionality so that all of the checkboxes are unchecked initially and when a user selects a specific day all of the other days are hidden. So, if Monday is checked all of the other days of the week are hidden. Sorry if this is a rudimentary question, I'm a novice and can't seem to find the answer.
  2. Resolved the issue. Had to do with the wp_signon function: https://codex.wordpress.org/Function_Reference/wp_signon Had to change: //wp_signon( $login_data, false ); wp_signon( $login_data, true );
  3. I ran across this post: https://wordpress.org/support/topic/error-from-async-uploadphp-redirect-302-with-ssl-enabled/ This seems to be the exact same issue, but there isn't a solution posted.
  4. Yes, cookies are set until I begin to upload media and the async-upload.php file is called. As soon as the async-upload.php is called the cookies expire and I'm sent to the admin login screen.
  5. Hey guys! I'm having an issue with (I believe) WordPress sessions. I have a front-end user upload option that uses the WordPress media upload, which works flawlessly without https. When I switch the site over to https and try to upload media, the async-upload.php file is called (when uploading) and I am immediately logged out of the site, before the upload completes. Here is what I have in my wp-config file: define('WP_HOME','https://www.domain.com'); define('WP_SITEURL','https://www.domain.com'); define('FORCE_SSL_LOGIN', true); define('FORCE_SSL_ADMIN', true); Again, if I use http the upload works flawlessly, but as soon as I switch to https I'm logged out as soon as I initiate the upload. Any help would be appreciated! Thanks! ~Sarah
  6. SQL Server 2000. Here is my connection string: $conn = new COM ("ADODB.Connection") or die("Cannot start ADO"); //define connection string, specify database driver $connStr = "Provider=sqloledb;Data Source=SQLDB;Initial Catalog=PERSONDB;User Id=*****;Password=*****"; $conn->open($connStr); //Open the connection to the database $query = "SELECT TOP (5) PERSON.PERSON_ID, PERSON.LAST_NAME, PERSON.FIRST_NAME FROM PERSON where PERSON.LAST_NAME like '%$q%' or PERSON.FIRST_NAME like '%$q%' order by PERSON.LAST_NAME"; $rs = $conn->execute($query); Thank you.
  7. I have tried both "SELECT TOP 5" and "SELECT TOP (5)". Here is the error that is generated: Fatal Error: Uncaught exception 'com_exception' with message '<b>Source:</b> Microsoft OLE DB Provider for SQL Server<br/><b>Description:</b> Line 1: Incorrect syntax near '5'.' in C:\xampp\apps\wordpress\htdocs\autocomplete-search\search.php:9 Stack trace: #0 C:\xampp\apps\wordpress\htdocs\autocomplete-search\search.php(9): com->execute('SELECT TOP 5 PE...') #1 {main} thrown in
  8. Hey guys, I'm trying to limit my query to 5 results, but TOP is not working and LIMIT obviously does not work (I usually work with MySQL). Here is my query: $query = "SELECT PERSON.PERSON_ID, PERSON.LAST_NAME, PERSON.FIRST_NAME FROM PERSON where PERSON.LAST_NAME like '%$q%' or PERSON.FIRST_NAME like '%$q%' order by PERSON.LAST_NAME"; Can someone please point me in the right direction for limiting the query to 5 results? Thank you! ~ Sarah
  9. Here are the results for $values: Array ( [0] => Thursday [1] => Saturday [2] => Monday [3] => Friday [4] => Monday [5] => Wednesday [6] => Tuesday [7] => Tuesday [8] => Thursday [9] => Sunday [10] => Tuesday [11] => Tuesday [12] => Monday [13] => Friday [14] => Wednesday [15] => Monday [16] => Wednesday [17] => Sunday [18] => Monday ) Array ( [0] => http://www.mylink.com/1 [1] => http://www.mylink.com/2 [2] => http://www.mylink.com/3 [3] => http://www.mylink.com/4 [4] => http://www.mylink.com/5 [5] => http://www.mylink.com/6 [6] => http://www.mylink.com/7 [7] => http://www.mylink.com/8 [8] => http://www.mylink.com/9 [9] => http://www.mylink.com/10 [10] => http://www.mylink.com/11 [11] => http://www.mylink.com/12 [12] => http://www.mylink.com/13 [13] => http://www.mylink.com/14 [14] => http://www.mylink.com/15 [15] => http://www.mylink.com/16 [16] => http://www.mylink.com/17 [17] => http://www.mylink.com/18 [18] => http://www.mylink.com/19 ) Array ( [0] => 715.00 [1] => 912.00 [2] => 715.00 [3] => 715.00 [4] => 715.00 [5] => 715.00 [6] => 715.00 [7] => 912.00 [8] => 715.00 [9] => 715.00 [10] => 715.00 [11] => 715.00 [12] => 715.00 [13] => 912.00 [14] => 912.00 [15] => 715.00 [16] => 715.00 [17] => 715.00 [18] => 912.00 ) Array ( [0] => 330.00 [1] => 400.00 [2] => 330.00 [3] => 330.00 [4] => 330.00 [5] => 330.00 [6] => 330.00 [7] => 400.00 [8] => 330.00 [9] => 330.00 [10] => 330.00 [11] => 330.00 [12] => 330.00 [13] => 400.00 [14] => 400.00 [15] => 330.00 [16] => 330.00 [17] => 330.00 [18] => 400.00 ) Array ( [0] => 220.00 [1] => 275.00 [2] => 220.00 [3] => 220.00 [4] => 220.00 [5] => 220.00 [6] => 220.00 [7] => 275.00 [8] => 220.00 [9] => 220.00 [10] => 220.00 [11] => 220.00 [12] => 220.00 [13] => 275.00 [14] => 275.00 [15] => 220.00 [16] => 220.00 [17] => 220.00 [18] => 275.00 ) Array ( [0] => 187.00 [1] => 225.00 [2] => 187.00 [3] => 187.00 [4] => 187.00 [5] => 187.00 [6] => 187.00 [7] => 225.00 [8] => 187.00 [9] => 187.00 [10] => 187.00 [11] => 187.00 [12] => 187.00 [13] => 225.00 [14] => 225.00 [15] => 187.00 [16] => 187.00 [17] => 187.00 [18] => 225.00 ) Array ( [0] => 157.00 [1] => 192.00 [2] => 157.00 [3] => 157.00 [4] => 157.00 [5] => 157.00 [6] => 157.00 [7] => 192.00 [8] => 157.00 [9] => 157.00 [10] => 157.00 [11] => 157.00 [12] => 157.00 [13] => 192.00 [14] => 192.00 [15] => 157.00 [16] => 157.00 [17] => 157.00 [18] => 192.00 ) Array ( [0] => 138.00 [1] => 165.00 [2] => 138.00 [3] => 138.00 [4] => 138.00 [5] => 138.00 [6] => 138.00 [7] => 165.00 [8] => 138.00 [9] => 138.00 [10] => 138.00 [11] => 138.00 [12] => 138.00 [13] => 165.00 [14] => 165.00 [15] => 138.00 [16] => 138.00 [17] => 138.00 [18] => 165.00 ) Array ( [0] => 89.00 [1] => 125.00 [2] => 75.00 [3] => 95.00 [4] => 86.00 [5] => 86.00 [6] => 75.00 [7] => 150.00 [8] => 79.00 [9] => 77.00 [10] => 103.00 [11] => 103.00 [12] => 75.00 [13] => 118.00 [14] => 125.00 [15] => 89.00 [16] => 75.00 [17] => 86.00 [18] => 135.00 ) Array ( [0] => 97.00 [1] => 115.00 [2] => 97.00 [3] => 97.00 [4] => 97.00 [5] => 97.00 [6] => 97.00 [7] => 115.00 [8] => 97.00 [9] => 97.00 [10] => 97.00 [11] => 97.00 [12] => 97.00 [13] => 115.00 [14] => 115.00 [15] => 97.00 [16] => 97.00 [17] => 97.00 [18] => 115.00 ) Array ( [0] => 81.00 [1] => 105.00 [2] => 60.00 [3] => 81.00 [4] => 71.00 [5] => 71.00 [6] => 61.00 [7] => 125.00 [8] => 69.00 [9] => 69.00 [10] => 81.00 [11] => 81.00 [12] => 60.00 [13] => 96.00 [14] => 105.00 [15] => 75.00 [16] => 60.00 [17] => 71.00 [18] => 115.00 ) Array ( [0] => 78.00 [1] => 90.00 [2] => 78.00 [3] => 78.00 [4] => 78.00 [5] => 78.00 [6] => 78.00 [7] => 90.00 [8] => 78.00 [9] => 78.00 [10] => 78.00 [11] => 78.00 [12] => 78.00 [13] => 90.00 [14] => 90.00 [15] => 78.00 [16] => 78.00 [17] => 78.00 [18] => 90.00 ) Array ( [0] => 50.00 [1] => 60.00 [2] => 50.00 [3] => 50.00 [4] => 50.00 [5] => 50.00 [6] => 50.00 [7] => 60.00 [8] => 50.00 [9] => 50.00 [10] => 50.00 [11] => 50.00 [12] => 50.00 [13] => 60.00 [14] => 60.00 [15] => 50.00 [16] => 50.00 [17] => 50.00 [18] => 60.00 ) Array ( [0] => 28.00 [1] => 35.00 [2] => 28.00 [3] => 28.00 [4] => 28.00 [5] => 28.00 [6] => 28.00 [7] => 35.00 [8] => 28.00 [9] => 28.00 [10] => 28.00 [11] => 28.00 [12] => 28.00 [13] => 35.00 [14] => 35.00 [15] => 28.00 [16] => 28.00 [17] => 28.00 [18] => 35.00 ) Array ( [0] => 13.00 [1] => 25.00 [2] => 13.00 [3] => 13.00 [4] => 13.00 [5] => 13.00 [6] => 13.00 [7] => 25.00 [8] => 13.00 [9] => 13.00 [10] => 13.00 [11] => 13.00 [12] => 13.00 [13] => 25.00 [14] => 25.00 [15] => 13.00 [16] => 13.00 [17] => 13.00 [18] => 25.00 ) $classes = array_shift($values); // get the 1st array of class values Here are the results for $classes: Thursday http://www.mylink.com/1 715.00 330.00 220.00 187.00 157.00 138.00 89.00 97.00 81.00 78.00 50.00 28.00 13.00 $links = array_shift($values); // get the 2nd array of links Here are the results for $links: Saturday http://www.mylink.com/2 912.00 400.00 275.00 225.00 192.00 165.00 125.00 115.00 105.00 90.00 60.00 35.00 25.00
  10. The array_shift is taking the first value out of each of the arrays. Here is the result for $classes: Thursday http://www.mylink.com/1 715.00 330.00 220.00 187.00 157.00 138.00 89.00 97.00 81.00 78.00 50.00 28.00 13.00 and here is the result for $links: Saturday http://www.mylink.com/2 912.00 400.00 275.00 225.00 192.00 165.00 125.00 115.00 105.00 90.00 60.00 35.00 25.00 Is there a way to assign the first array to $classes and the second array to $links, and then iterate through the remaining arrays? Thank you
  11. Here is what I'm looking to do. I want to loop through all of the $cell values which are the numbers but $link and $class need to go to the next entry after the values have ended on the array. Here's an example: <a href="http://www.mylink.com/1" class="Thursday">715.00 </a> <a href="http://www.mylink.com/1" class="Thursday">330.00 </a> <a href="http://www.mylink.com/1" class="Thursday">220.00 </a> <a href="http://www.mylink.com/1" class="Thursday">187.00 </a> <a href="http://www.mylink.com/1" class="Thursday">157.00 </a> <a href="http://www.mylink.com/1" class="Thursday">138.00 </a> <a href="http://www.mylink.com/1" class="Thursday">89.00 </a> <a href="http://www.mylink.com/1" class="Thursday">97.00 </a> <a href="http://www.mylink.com/1" class="Thursday">81.00 </a> <a href="http://www.mylink.com/1" class="Thursday">78.00 </a> <a href="http://www.mylink.com/1" class="Thursday">50.00 </a> <a href="http://www.mylink.com/1" class="Thursday">28.00 </a> <a href="http://www.mylink.com/1" class="Thursday">13.00 </a> <a href="http://www.mylink.com/2" class="Saturday">912.00 </a> <a href="http://www.mylink.com/2" class="Saturday">400.00 </a> etc....
  12. $values contains 15 arrays with 19 values.
  13. Sorry - I forgot to explain that. $class and $link are not defined yet - right now these are placeholders more than anything else. I'm having issues defining these within the foreach loop.
  14. Hey guys, I'm having the hardest time trying to access data within my foreach loop. Here is the var_dump right before the foreach. array(19) { [0]=> string( "Thursday" [1]=> string( "Saturday" [2]=> string(6) "Monday" [3]=> string(6) "Friday" [4]=> string(6) "Monday" [5]=> string(9) "Wednesday" [6]=> string(7) "Tuesday" [7]=> string(7) "Tuesday" [8]=> string( "Thursday" [9]=> string(6) "Sunday" [10]=> string(7) "Tuesday" [11]=> string(7) "Tuesday" [12]=> string(6) "Monday" [13]=> string(6) "Friday" [14]=> string(9) "Wednesday" [15]=> string(6) "Monday" [16]=> string(9) "Wednesday" [17]=> string(6) "Sunday" [18]=> string(6) "Monday" } array(19) { [0]=> string(90) "http://www.mylink.com/1" [1]=> string(90) "http://www.mylink.com/2" [2]=> string(90) "http://www.mylink.com/3" [3]=> string(90) "http://www.mylink.com/4" [4]=> string(90) "http://www.mylink.com/5" [5]=> string(90) "http://www.mylink.com/6" [6]=> string(90) "http://www.mylink.com/7" [7]=> string(90) "http://www.mylink.com/8" [8]=> string(90) "http://www.mylink.com/9" [9]=> string(90) "http://www.mylink.com/10" [10]=> string(90) "http://www.mylink.com/11" [11]=> string(90) "http://www.mylink.com/12" [12]=> string(90) "http://www.mylink.com/13" [13]=> string(90) "http://www.mylink.com/14" [14]=> string(90) "http://www.mylink.com/15" [15]=> string(90) "http://www.mylink.com/16" [16]=> string(90) "http://www.mylink.com/17" [17]=> string(0) "" [18]=> string(0) "" } array(19) { [0]=> string(6) "715.00" [1]=> string(6) "912.00" [2]=> string(6) "715.00" [3]=> string(6) "715.00" [4]=> string(6) "715.00" [5]=> string(6) "715.00" [6]=> string(6) "715.00" [7]=> string(6) "912.00" [8]=> string(6) "715.00" [9]=> string(6) "715.00" [10]=> string(6) "715.00" [11]=> string(6) "715.00" [12]=> string(6) "715.00" [13]=> string(6) "912.00" [14]=> string(6) "912.00" [15]=> string(6) "715.00" [16]=> string(6) "715.00" [17]=> string(6) "715.00" [18]=> string(6) "912.00" } array(19) { [0]=> string(6) "330.00" [1]=> string(6) "400.00" [2]=> string(6) "330.00" [3]=> string(6) "330.00" [4]=> string(6) "330.00" [5]=> string(6) "330.00" [6]=> string(6) "330.00" [7]=> string(6) "400.00" [8]=> string(6) "330.00" [9]=> string(6) "330.00" [10]=> string(6) "330.00" [11]=> string(6) "330.00" [12]=> string(6) "330.00" [13]=> string(6) "400.00" [14]=> string(6) "400.00" [15]=> string(6) "330.00" [16]=> string(6) "330.00" [17]=> string(6) "330.00" [18]=> string(6) "400.00" } array(19) { [0]=> string(6) "220.00" [1]=> string(6) "275.00" [2]=> string(6) "220.00" [3]=> string(6) "220.00" [4]=> string(6) "220.00" [5]=> string(6) "220.00" [6]=> string(6) "220.00" [7]=> string(6) "275.00" [8]=> string(6) "220.00" [9]=> string(6) "220.00" [10]=> string(6) "220.00" [11]=> string(6) "220.00" [12]=> string(6) "220.00" [13]=> string(6) "275.00" [14]=> string(6) "275.00" [15]=> string(6) "220.00" [16]=> string(6) "220.00" [17]=> string(6) "220.00" [18]=> string(6) "275.00" } array(19) { [0]=> string(6) "187.00" [1]=> string(6) "225.00" [2]=> string(6) "187.00" [3]=> string(6) "187.00" [4]=> string(6) "187.00" [5]=> string(6) "187.00" [6]=> string(6) "187.00" [7]=> string(6) "225.00" [8]=> string(6) "187.00" [9]=> string(6) "187.00" [10]=> string(6) "187.00" [11]=> string(6) "187.00" [12]=> string(6) "187.00" [13]=> string(6) "225.00" [14]=> string(6) "225.00" [15]=> string(6) "187.00" [16]=> string(6) "187.00" [17]=> string(6) "187.00" [18]=> string(6) "225.00" } array(19) { [0]=> string(6) "157.00" [1]=> string(6) "192.00" [2]=> string(6) "157.00" [3]=> string(6) "157.00" [4]=> string(6) "157.00" [5]=> string(6) "157.00" [6]=> string(6) "157.00" [7]=> string(6) "192.00" [8]=> string(6) "157.00" [9]=> string(6) "157.00" [10]=> string(6) "157.00" [11]=> string(6) "157.00" [12]=> string(6) "157.00" [13]=> string(6) "192.00" [14]=> string(6) "192.00" [15]=> string(6) "157.00" [16]=> string(6) "157.00" [17]=> string(6) "157.00" [18]=> string(6) "192.00" } array(19) { [0]=> string(6) "138.00" [1]=> string(6) "165.00" [2]=> string(6) "138.00" [3]=> string(6) "138.00" [4]=> string(6) "138.00" [5]=> string(6) "138.00" [6]=> string(6) "138.00" [7]=> string(6) "165.00" [8]=> string(6) "138.00" [9]=> string(6) "138.00" [10]=> string(6) "138.00" [11]=> string(6) "138.00" [12]=> string(6) "138.00" [13]=> string(6) "165.00" [14]=> string(6) "165.00" [15]=> string(6) "138.00" [16]=> string(6) "138.00" [17]=> string(6) "138.00" [18]=> string(6) "165.00" } array(19) { [0]=> string(5) "89.00" [1]=> string(6) "125.00" [2]=> string(5) "75.00" [3]=> string(5) "95.00" [4]=> string(5) "86.00" [5]=> string(5) "86.00" [6]=> string(5) "75.00" [7]=> string(6) "150.00" [8]=> string(5) "79.00" [9]=> string(5) "77.00" [10]=> string(6) "103.00" [11]=> string(6) "103.00" [12]=> string(5) "75.00" [13]=> string(6) "118.00" [14]=> string(6) "125.00" [15]=> string(5) "89.00" [16]=> string(5) "75.00" [17]=> string(5) "86.00" [18]=> string(6) "135.00" } array(19) { [0]=> string(5) "97.00" [1]=> string(6) "115.00" [2]=> string(5) "97.00" [3]=> string(5) "97.00" [4]=> string(5) "97.00" [5]=> string(5) "97.00" [6]=> string(5) "97.00" [7]=> string(6) "115.00" [8]=> string(5) "97.00" [9]=> string(5) "97.00" [10]=> string(5) "97.00" [11]=> string(5) "97.00" [12]=> string(5) "97.00" [13]=> string(6) "115.00" [14]=> string(6) "115.00" [15]=> string(5) "97.00" [16]=> string(5) "97.00" [17]=> string(5) "97.00" [18]=> string(6) "115.00" } array(19) { [0]=> string(5) "81.00" [1]=> string(6) "105.00" [2]=> string(5) "60.00" [3]=> string(5) "81.00" [4]=> string(5) "71.00" [5]=> string(5) "71.00" [6]=> string(5) "61.00" [7]=> string(6) "125.00" [8]=> string(5) "69.00" [9]=> string(5) "69.00" [10]=> string(5) "81.00" [11]=> string(5) "81.00" [12]=> string(5) "60.00" [13]=> string(5) "96.00" [14]=> string(6) "105.00" [15]=> string(5) "75.00" [16]=> string(5) "60.00" [17]=> string(5) "71.00" [18]=> string(6) "115.00" } array(19) { [0]=> string(5) "78.00" [1]=> string(5) "90.00" [2]=> string(5) "78.00" [3]=> string(5) "78.00" [4]=> string(5) "78.00" [5]=> string(5) "78.00" [6]=> string(5) "78.00" [7]=> string(5) "90.00" [8]=> string(5) "78.00" [9]=> string(5) "78.00" [10]=> string(5) "78.00" [11]=> string(5) "78.00" [12]=> string(5) "78.00" [13]=> string(5) "90.00" [14]=> string(5) "90.00" [15]=> string(5) "78.00" [16]=> string(5) "78.00" [17]=> string(5) "78.00" [18]=> string(5) "90.00" } array(19) { [0]=> string(5) "50.00" [1]=> string(5) "60.00" [2]=> string(5) "50.00" [3]=> string(5) "50.00" [4]=> string(5) "50.00" [5]=> string(5) "50.00" [6]=> string(5) "50.00" [7]=> string(5) "60.00" [8]=> string(5) "50.00" [9]=> string(5) "50.00" [10]=> string(5) "50.00" [11]=> string(5) "50.00" [12]=> string(5) "50.00" [13]=> string(5) "60.00" [14]=> string(5) "60.00" [15]=> string(5) "50.00" [16]=> string(5) "50.00" [17]=> string(5) "50.00" [18]=> string(5) "60.00" } array(19) { [0]=> string(5) "28.00" [1]=> string(5) "35.00" [2]=> string(5) "28.00" [3]=> string(5) "28.00" [4]=> string(5) "28.00" [5]=> string(5) "28.00" [6]=> string(5) "28.00" [7]=> string(5) "35.00" [8]=> string(5) "28.00" [9]=> string(5) "28.00" [10]=> string(5) "28.00" [11]=> string(5) "28.00" [12]=> string(5) "28.00" [13]=> string(5) "35.00" [14]=> string(5) "35.00" [15]=> string(5) "28.00" [16]=> string(5) "28.00" [17]=> string(5) "28.00" [18]=> string(5) "35.00" } array(19) { [0]=> string(5) "13.00" [1]=> string(5) "25.00" [2]=> string(5) "13.00" [3]=> string(5) "13.00" [4]=> string(5) "13.00" [5]=> string(5) "13.00" [6]=> string(5) "13.00" [7]=> string(5) "25.00" [8]=> string(5) "13.00" [9]=> string(5) "13.00" [10]=> string(5) "13.00" [11]=> string(5) "13.00" [12]=> string(5) "13.00" [13]=> string(5) "25.00" [14]=> string(5) "25.00" [15]=> string(5) "13.00" [16]=> string(5) "13.00" [17]=> string(5) "13.00" [18]=> string(5) "25.00" } Here is the foreach: foreach ($values as $cell) { echo "<a href=\"".$link."\" class=\"".$class."\">" . $cell . "</a>"; } $class is supposed to be the first iteration of the array: Thursday, Saturday, Monday, etc. $link is supposed the be the second iteration of the array: http://www.mylink.com/... I can get the $cell data, but I cannot access the $link or $class values. Thank you so much for any help you can provide. ~SarahB
×
×
  • 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.