Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. It's a web script. It's designed to be run on a web server running PHP. You should have figured that out when you saw the .php extensions.
  2. It should probably be $_GET['name'] and not $name. The same goes for $address.
  3. MySQL runs in the background as a service. You need to use the mysql program on command line to run queries.
  4. If you didn't choose a password, then perhaps the root password is empty or perhaps the default password is written in some documentation file or readme file. phpMyAdmin: http://phpmyadmin.net
  5. What do you mean with "load MySQL"? There should be a database called "mysql". Note that there is no GUI tool with the MySQL installation.
  6. 1. CREATE TABLE table_name_here; 2. Use something like phpMyAdmin or if you have a .sql file just run it (via mysql on command line or again via phpMyAdmin). 3. If you've lost your password, too bad... the passwords are encrypted. Create a new account.
  7. If you are using IE, then there is an option that disables/enables animations on web pages.
  8. 1. AMP = Apache, MySQL, PHP L = Linux, W = Windows, X = Any operating system It's a software bundle. http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29 http://en.wikipedia.org/wiki/AMP#Computers http://en.wikipedia.org/wiki/XAMP 2. MVC is a pattern used in programming to separate code logic. http://en.wikipedia.org/wiki/Model-view-controller 3. This is a library. Free libraries are... well, when they're free. Open source, AJAX, Joomla. And this is Google. It's a search engine where you could have found all your answers. Alternatively you could have used Wikipedia which is where all the above links point to.
  9. short_open_tag
  10. Change echo "<style font-color:"red">State / Territory Field Missing<br></style>"; to echo "<style font-color:'red'>State / Territory Field Missing<br></style>"; OR echo "<style font-color:\"red\">State / Territory Field Missing<br></style>"; OR echo '<style font-color:"red">State / Territory Field Missing<br></style>';
  11. The hand "points" at the link
  12. They would look differently, but the hex/rgb code would look like the "name" code. I.e. blue and #00f would look the same on the same monitor although it may look different on another monitor.
  13. PHP doesn't understand HTML. All it does is echo strings. It doesn't care what that string contains.
  14. There is a setting in IE called something like "Play animations on webpages" (I've got the Danish version installed. I don't know what they called that option in the English version). It's in the advanced tab.
  15. The echo is not the problem. We'll need some more code... Read the error code "unexpected T_IF". There is an if where PHP did not expect it. Look for an if.
  16. We are just helping phpfreaks.com to profit. But we will stop from doing it because you are the boss They'll hardly profit by getting their AdSense account banned... Even ASKING the users here to click on the links is against the AdSense program policy.
  17. Ah, sorry... change while($list = mysql_fetch_assoc($result)) to while($list = mysql_fetch_assoc($select_result)) then it should work.
  18. What about this? <?php // database information $host = '10.6.166.34'; $user = 'TLB1'; $password = 'youdontneedthis'; $dbName = 'TLB1'; // connect and select the database $conn = mysql_connect($host, $user, $password) or die(mysql_error()); $db = mysql_select_db($dbName, $conn) or die(mysql_error()); if(count($_POST)) { $data = array( 'Name' => $_POST['newEntry'], 'Score' => $_POST['newEntry2'], 'Purse' => $_POST['newEntry3'], ); $field_names = array(); $values = array(); foreach($data as $field_name => $value) { if(empty($value)) continue; $field_names[] = $field_name; $values[] = "'".mysql_real_escape_string($value, $conn)."'"; } $insert_result = mysql_query("INSERT INTO TLB (".join(',',$field_names).") VALUES(".join(',',$values).")", $conn); $select_result = mysql_query("SELECT Name,Score,Purse FROM TLB", $conn); while($list = mysql_fetch_assoc($result)) { echo <<<EOF 1{$list['Name']}<br /> 2{$list['Score']}<br /> 3{$list['Purse']}<br /> EOF; } } else { echo <<<FORMENT <br> Make a new entry: <br> <form action = "{$_SERVER['PHP_SELF']}" method = "post"> <input type = "text" name = "newEntry" maxlength="20" size = "10"> <br> <input type = "text" name = "newEntry2" maxlength="4" size = "10"> <br> <input type = "text" name = "newEntry3" maxlength="6" size = "10"> <br> <input type = "submit" value = "Add Entry"> </form> FORMENT; } ?> Why are you calling your text fields newEntry, newEntry2 and newEntry3? It would be much smarter to name them something descriptive such as "name".
  19. You cannot change the file using FTP, but you can delete the old one and upload ap new one.
  20. I don't understand this: ???
  21. Firefox 2 because it's better than IE. Opera is pretty good as well, but it doesn't have the large amount of extensions which FF has.
  22. AdBlock Plus Add N Edit Cookies Cache Status Fasterfox Firebug Tab Mix Plus Torbutton View Source Chart Web Developer YSlow
  23. Asking this question on a PHP board will most likely give you some biased answers. I prefer PHP because my knowledge of Perl is very limited. 1. You can do just as much in Perl as in PHP. 2. Why would it be better because you are learning it?
  24. Copyright is copyright. There are no specific rules for PHP and just because PHP as language is open source, then it doesn't mean that things that are created using PHP is open source as well.
  25. Opera and Safari doesn't do like you want either. Internet Explorer is the only browser which does that. Are you able to use .htaccess files? Why are you sending the header?
×
×
  • 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.