Jump to content

Ch0cu3r

Staff Alumni
  • Posts

    3,404
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by Ch0cu3r

  1. Or apply a width to your table columns
  2. Why not ask godaddy for support?
  3. Take a look here for some examples http://forums.phpfreaks.com/topic/11572-multi-column-results/
  4. Try adding RewriteBase / Before the first rewriteRule
  5. Are you sure your website uses an Apache http server? Run phpinfo() to find out. If it is an Apache server have you made sure the .htaccess is being read? Best way to test this is to add random gibberish into the file. If the .htaccess file is being read then a 500 Internal Server error will be issued.
  6. Hard to give an answer as the $form class you are using is not a standard class bundled with PHP. It is most likely a form helper class bundled with a framework you are using. Could you tell what framework you are using?
  7. Only variables are parsed within double quoted strings. You cannot call a function/constant within a string unless you use concatenation.
  8. With what? You have only posted some code and an extremely small screenshot which is hard to see. Atleast explain what it is you are wanting to do. Also when posting code please wrap it within tags (or click the <> button in the editor)
  9. I assume you only want to add todays date to the database and not the csv file aswell? Add the following to the end of your query SET date_column = CURRENT_DATE() change date_column to the actual name of your column you want to add the date to NOTE When posting code please wrap it within tags (or click the <> button in the editor)
  10. You using a variable within a single quote string echo'<td class = "$NewClass">' Variables are not expanded within single quotes. Use double quotes or concatenate the variable echo "<td class = \"$NewClass\">" // double quote string // OR echo '<td class = "'.$NewClass.'">' // concatenate
  11. Its not a good tutorial if it is defining $pdo as global! In fact all it has doing is wrapping procedural code inside of a class. A boolean value maybe? Return true if the article has been deleted or the article has been updated.
  12. Are they the names of the colors you want to change the cell background color to? I assume you could do while (odbc_fetch_row($result)) { ... $bgcolor = odbc_result($result, "uompScheduleColor"); // get the WIP_master.uompScheduleColor value from the result set. Save it to $bgcolor echo "<tr><td bgcolor=$bgcolor >$uompScheduleNumber</td>"; // set background color to $bgcolor ... }
  13. An insert select statement is explained here Basically the rows returned by the select statement will used as the values to insert into the table.
  14. Huh? How can you make a mistake? The two errors have two completely different meanings This type of error usually indicates the query has failed. To find out why the query failed you need to use mysql_error This means the variable you have given it as the first parameter is not an array.
  15. The server you purchased does it allow you to login to it via ssh as that is the best way to configure PHP and MySQL. MySQL cannot be affected by .htaccess files.
  16. How is the category id being passed to your model? You dont appear to be passing it when you call getForumTopics() $this->view->forum_topics = $topic_model->getForumTopics(); // <-- category id should be passed as an argument here
  17. How something appears on your site has nothing to do with PHP. You need to use HTML/CSS to style the elements on your page. Looking at your sites source code the comments are contained within a div with the class of .scm-usernotes . The Comment header is contained within a div with a class of .scm-head Each comment post is contained within a div with a class of .scm-note and the body to each post is within a div with the class of .scm-text The Comments form elements are contained within a div with the class of .scm-foot If you cant find a stylesheet either create new one and append the reference to <head></head> or apply the styles to you existing stylesheet.
  18. FYI Line 51 uses shorthand array syntax introduced with PHP5.4. You are using an older version of PHP and this is why you are getting that error message.
  19. Try applying ucwords to $value?
  20. $zodiacArray is defined as an associative array. In the switch statement you are using numerical indexes. What you should be doing in the switch statement is setting $zodiac to the corresponding key for each case (the first case will set $zodiac to Rat, the second case will be Ox and so on) Example code. switch(($_POST['year'] - $start_year) % 6) { case 0: $zodiac = 'Rat'; break; case 1: $zodiac = 'Ox'; break; case 2: $zodiac = 'Tiger'; break; ... etc } $zodiac will be used later in your code as the key to return the president the user shares their zodiac sign with
  21. Easiest way would be to move the files outside of your sites root folder. Files outside of the root folder will not be accessible from a URL. This will not prevent PHP from accessing files. Or place a .htaccess file inside the folders you don't want allow access to with the following Deny from all
  22. The $seals array used on lines 25 through to 28 in reporta.php needs to be wrapped in curly braces not square brackets echo "[li][b][color=blue]Seal $numero:[/color][/b] {$seals[$numero]['name']} [b]Behavior:[/b] {$seals[$numero]['behavior']} [b]Skills:[/b] {$seals[$numero]['skills']} [b]Comments:[/b] {$seals[$numero]['comments']}
  23. Go back and read Barand's post again. To find out of they do support mysqli run phpinfo. IMO it would be better to install the AMP stack locally on your computer. You can either install it manually or use packages such as XAMPP, WAMP or MAMP
  24. Whats the relationship between the two tables? One to many (a flag can have multiple threads assigned) or one to one (a flag can only have one thread assigned)? If its the latter then the results for the second query will never be ordered by date_created as only one result will be returned for each flag.
  25. What format are the dates stored in the date_created column and what data type have you used? Using queries within loops is not recommended. If the data in the two tables relate then you should use JOIN's. Example query SELECT f.*, # DO NOT DO THIS - explicitly state the columns you want to return from both tables. t.*, FROM flags f JOIN thread t on t.id = f.thread_id ORDER BY t.date_created DESC
×
×
  • 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.