wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
You may want to use \r\n instead.
-
Change your echo statement in your while loop too: echo $row['cat'] . ' ('.$row['num'].') <br>';
-
Look in the user comments section its the first post..
-
Problem with my site loading
wildteen88 replied to vyb3's topic in Editor Help (PhpStorm, VS Code, etc)
Could be a number of things Either PHP is set to timeout too early, 30 seconds is recommended You have an error in your script which is terminating the script early Or it could be your HTTP server terminating the connection prematurely. Have a word with your web host about this, in the mean time check your servers error logs to see if is a PHP error causing this. -
[SOLVED] Help with .htaccess request directing
wildteen88 replied to Jagarm's topic in Apache HTTP Server
You should see a Topic Solved botton located near the bottom left of this post and just above the Quick Reply box -
Oops. Should of been printf('value="%1$02d">%1$02d</option>', $jj);
-
Always make sure you have a valid HTML Doctype. Without a Doctype browsers go in to quirks mode (otherwise known as non-standards mode).
-
=> should be >= => is used to set keys within an array
-
Change echo "value\"=".$jj."\">".$jj."</option>"; to sprintf('value="%02d">%02d</option>', $jj);
-
Definitely not! What you should do is only set the necessary permissions for the file(s) you're trying to read/write too. Something like CHMOD 0755 should do.
-
I don't think there is a built in function for copying folders. Instead you'll have to first create a new directory then loop through all the files in the folder your want to copy to the new folder. Once you have copied all files delete the old folder.
-
That is no where near the PHP syntax. More like Javascript. You cannot call PHP code based on a user event. This can only be archived by a Client Side Languages such as javascript.
-
What happens if you remove the following line in login.php (apart from the header disappearing) <?php include "header.php"; ?>
-
[SOLVED] Make the script stand alone
wildteen88 replied to confused_aswell's topic in PHP Coding Help
Whats on line 2 in view_database.php -
I have tested your code in IE7 and it works fine for me.
-
Use echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
-
[SOLVED] Make the script stand alone
wildteen88 replied to confused_aswell's topic in PHP Coding Help
To implement this just change <?php // database connection info $conn = mysql_connect('localhost','username','password') or trigger_error("SQL", E_USER_ERROR); $db = mysql_select_db('database_name',$conn) or trigger_error("SQL", E_USER_ERROR); to <?php require('includes/application_top.php'); Now create the file includes/application_top.php and place the following code <?php // database connection info $conn = mysql_connect('localhost','username','password') or trigger_error("SQL", E_USER_ERROR); $db = mysql_select_db('database_name',$conn) or trigger_error("SQL", E_USER_ERROR); ?> Your script should still work as normal. -
What is the relevance between the two blocks of code you posted. I cannot seem to see any relevance. You should also post what the code is supposed to do. What the code is doing now, rather than saying it doesn't work.
-
Where is the $row["admin"] variable set to? Also you do not need to call session_start in admin.php if its is being included into index.php
-
You should use urldecode when getting data from the url that is encoded.
-
How would we know? We dont run your site/manage the server your site is hosted on. Your host is the only one that can answer that. You'll be better of posting the parts of code that fail to work.
-
[SOLVED] Inserting a variable into a database.
wildteen88 replied to Michdd's topic in PHP Coding Help
SQL values need to be warped in quotes. mysql_query("INSERT INTO monsters (monster, loc) VALUES('$ucTitleString', '$loc' ) ") or die(mysql_error()); mysql_query("INSERT INTO monsters (spawn, drops) VALUES('$spawn', '$drops' ) ") or die(mysql_error()); mysql_query("INSERT INTO example (hp, exp) VALUES('$hp', '$exp' ) ") or die(mysql_error()); echo "Data Inserted!"; -
Change include "./common_db.inc"; $link=db_connect('sample_db'); to include "./common_db.inc"; $default_dbname='sample_db'; $link=db_connect();
-
All those errors are caused by the first error message: That error suggests to me that the file b4455fc53a5d2d957cb3008951386b27.txt in ./storagedata doesn't have the correct read (and/or write) permissions. CHMOD 0644 should suffice for just reading files, 0755 for writing to files.