Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. You haven't posted what's wrong with your script. Can you explain what your code is supposed to do and what it is doing now. Please dont keep bumping your post wait at least a couple of hours.
  2. Whats wrong? it showing one tutorial named hurf. Whats it supposed to do? EDIT: To view the tutorial you need to click the image place holder to the left.
  3. Screenshot of your problem? This sounds like a HTML issue.
  4. Not necessarily you can do echo ' $vartobewritten = ' . $yourvar .'; carry on with code to be written';
  5. $part{0} is referring to the first character in the $part variable. &$part means the variable $part is being passed by reference. As explained in the manual
  6. If you dont output anything then you're not going to know whether the script is working or not. That's why I put the echo's in to see what is happening. Its the basic steps of debugging.
  7. This $query = "UPDATE news SET title = '{$title}', content = '{$content},' WHERE id= {$id}"; $result = mysql_query($query, $connect); if(mysql_affected_rows() == 1) { //yeye } else { //failed } Should be $query = "UPDATE news SET title = '{$title}', content = '{$content},' WHERE id= {$id}"; $result = mysql_query($query, $connect); if(mysql_affected_rows() == 1) { echo 'Successfully updated'; } else { echo 'Failed to update! Why?<br />' . mysql_info(); echo 'Is there an error?<br/>' . mysql_error(); echo 'Whats the query?<br/>' . $query; } If you're running this locally then edit your php.ini and setup error_reporting to E_ALL and set display_errors to On. Also Notices wont stop your script from running. Only errors do.
  8. Check your sites error log instead. Your host should provide a utility for viewing your sites error log.
  9. This line <?php ini_set("display_errors", "1"); error_reporting(E_ALL); ?> Should be the first line.
  10. Maybe something like this http://www.phpfreaks.com/forums/index.php/topic,264150.msg1245361.html#msg1245361
  11. You'll want to use AJAX for this. Here is an example script
  12. You'll save yourself a lot of time and trouble if your used single quotes. Variables do not get parsed in single quotes, so you dont need to escape the $ or " either, just need to escape the single quotes However maybe a better of option is to save all your code that needs to be written into text files instead?
  13. Post your code. I cannot suggest what to do if I cant see your code.
  14. Your combobox wont remember what the user selected unless you tell it to. What is the code you're using to populate the combobox.
  15. What ever quotes you start the string with you need to escape. eg echo "<div id=\"container\">content here</div>"; Or echo 'O\'Reilly';
  16. This is the code you use to call the function $returnValue = check_team_totaltally($player_1,$player_2,$player_3,$player_4,$player_5,$player_6,$player_7,$player_8,$player_9,$player_10,$player_11); Use that code to call that function again. However your function can be made a lot better. include("passwords.inc"); $connection = mysql_connect($host, $user,$password) or die ("Couldn't connect to server."); $db = mysql_select_db($database, $connection) or die ("Couldn't select database."); Personally I would have all that in single file called db.php. Whenever you want to connect to MySQL use require_once "db.php" WARNING having code in .inc files can be read as plain text. So if someone found out where your passwords.inc file is by going to yoursite.com/passwords.inc they will be able to read your database credentials. You should end all files in .php to prevent this, ed file.inc.php This is not recommend global $totaltally; $totaltally = $total1['total']; return False; You should change it to return $total1['total'];
  17. Use floor, ceil, or round
  18. Post here the code that didn't work.
  19. You're not making any sense. Please try to explain your problem in more detail. Also tell use what your script is supposed to.
  20. Can we see the search/replace values that are in your database too
  21. If display_errors is turned off it shouldn't display any errors. The error will be written to the error log file instead. Are you sure PHP is reading the php.ini you are editing. Confirm this by running the phpinfo() function and looking at the Loaded Configuration File line.
  22. You've named your select tags wrong You've named them size_sal and type_sal. You're ment to name them as size_sel and type_sel.
  23. Both would help. Post only the relevant parts
  24. You wll need to use the target="_parent" attribute in your form tag. That way when you submit the form it sends the request to the parent window.
  25. This is handled by AJAX. Have a read of the tutorials over at w3schools.com to help you get started.
×
×
  • 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.