-
Posts
3,404 -
Joined
-
Last visited
-
Days Won
55
Everything posted by Ch0cu3r
-
Or apply a width to your table columns
-
Why not ask godaddy for support?
-
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.
-
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?
-
Only variables are parsed within double quoted strings. You cannot call a function/constant within a string unless you use concatenation.
-
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)
-
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)
-
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
-
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.
-
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 ... }
-
Is this mix of php and mysql translatable into pure MySQL ?
Ch0cu3r replied to roparzhhemon237's topic in PHP Coding Help
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. -
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.
-
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.
-
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
-
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.
-
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.
-
Try applying ucwords to $value?
-
$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
-
Blocking the Access to Multiple Files with .htaccess?
Ch0cu3r replied to glassfish's topic in PHP Coding Help
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 -
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']}
-
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
-
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.
-
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