Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by PFMaBiSmAd

  1. You already have a thread for this, don't start more threads for the same issue. Topic locked...
  2. The second parameter to the imagestring function isn't a font size, it picks the font number. Valid numbers are 1-5 (numbers outsize this range pick the closest permissible number.) For your use of 30, that would result in the function using built-in font number 5 -
  3. There's nothing to elaborate on. As you are looping to dynamically make the existing html table, you produce a link with the indicated get parameter on it. If you can echo the product id in the that column of the html table, you can echo it in the link.
  4. Your would form a link with a GET parameter on the end of it, something like ?id=123, where the 123 is the product id and is dynamically put into each link as you loop through the data to output the html table.
  5. I removed the other thread you created for this problem. No one asked you to repost your question. Asking you to repost your code, just means to repost your code. It doesn't mean to throw-a-way your existing thread. That just wastes the forum member's time and reduces the chance of anyone helping you.
  6. The reason I asked about the start of your file not being posted is because nothing you have posted contains the html that we have been mentioning that IS being output on that page. Unfortunately, your code is trying to paste together the page by using php include/require statements. So, we still don't know exactly at what point your code is doing what you expect and at what point it is not. So far, mrMarcus has suggested/asked that you set php's error_reporting to E_ALL and either set display_errors to ON or set log_errors to ON. The sooner you do this, the sooner the problem will get found.
  7. Since you marked this solved when you posted it, I'll assume that either it is solved and you don't need any help or you're a bot script that happened to visit each link on the page.
  8. The example you found was for CodeIgniter. The ->result() method returns an array of the rows the query matched. You would replace the foreach(){} loop with your traditional while(){} loop.
  9. Please repost your code. All the formatting got changed to bbcode tags and it is unreadable/unusable as is.
  10. @Muddy, he's got an exit; statement in the code.
  11. Show us the opening php tag you are using in the config.php file.
  12. Is there some reason you didn't post the first part of your login.php code?
  13. The link you posted is to the login page. That implies that your universityreport.php page expects the visitor to be logged in and redirects to the login page when they are not. Since the login.php page stops producing the html document before it outputs any visible content, your first step would be to troubleshoot why the code in login.php isn't doing anything after that point. The only way we could possibly help you do that would be if you post all the code for loigin.php (less any database connection details.)
  14. Are you doing any url rewriting, so that when you clicked on your test pagetwo.php link that something beside just the filename changed in the url, compared to the url for pageone.php, such as adding or removing the www. in front of the domain name? The reason I ask, is your pageone script is starting a session and storing the data in it, but for some reason that session doesn't match pagetwo. One reason would be because the browser isn't sending the session id cookie to the server with the request for pagetwo because it thinks the cookie doesn't match that page, either due to the domain being different (unlikely), the subdomain being different (a changing www. vs no www. between the two pages), or the path after the domain is different (unlikely based on the test href link you used.) Edit: or nevermind, since you apparently found the problem.
  15. See my post above pika's, about setting error_reporting (you apparently only have it set to display notice messages) to get php to help you debug what is going on.
  16. Is the photog_main.php file being mentioned in the error the actual main file being requested? Or is it something like yourdomain.com/index.php and index.php is including photog_main.php? The reason I ask is that relative include files are relative to the main file (the current working directory) and not a file that has been included itself. Also, did you replace the xxxxx with your actual dioce2 path (btw these are NOT url's, they are file system paths.)
  17. You need to set php's error_reporting to E_ALL and either set display_errors to ON (to get errors to display in the browser) or set log_errors to ON (to get errors logged to the server error log file) to get php to help you by reporting and displaying/logging all the errors it detects. Displaying the content of the $_SESSION variable on the page it is set at doesn't actually mean you have set session variables, if your session_start() statement is failing due to the output being sent or some other session related error.
  18. Also, since that's a file system path and not a URL, the two settings having to do with using include statements with URLs would have no effect on the problem.
  19. The code I posted does produce the exact layout you mentioned. The only thing that would need to be added to it is what is needed to show/hide the information (there are probably 10,000 javascript show/hide examples posted on the Internet.) You should NOT execute a query inside of a loop of another query. It is extremely inefficient (the kind of thing that gets your account suspended on a live server.)
  20. To output a new heading every time it changes, you would remember the previous heading and detect when the value changes - $query = " ... your query statement that gets the rows you want in the order that you want them"; $result = mysql_query($query); $last_heading = null; // 'remember' the last heading value. initialize to a value that will never appear in the data while($row = mysql_fetch_assoc($result)){ // detect if the heading changed if($last_heading != $row['group']){ // heading changed or is the first one if($last_heading != null){ // not the first one, (optionally) close out the previous section here... echo "</dl>\n"; } // start a new section here... echo "<dl>\n<dt>Group {$row['group']}</dt>\n"; $last_heading = $row['group']; // remember the new heading } // output the data under each heading echo "<dd>Member {$row['member']}</dd>\n"; } // (optionally) close out the last section here... if($last_heading != null){ echo "</dl>\n"; }
  21. You would execute ONE JOIN'ed query that gets the rows you want in the order that you want them. You would JOIN the two tables using the tournament_id.
  22. You also wouldn't ever retrieve all the rows from a database table and loop through them to find if a row existed in the table. You would perform the check for a match in the query and only return the matching row, if any.
  23. Because, magic quotes has been depreciated as of php5.3 and removed as of php5.4. The main security reason for magic quotes being removed from php is because it did not take into account the character set encoding your database connection is using, so it is possible to still inject sql after data has been passed through the escaping done by magic quotes. That's what htmlentities and htmlspecialchars are for. Use the ENT_QUOTES flag to insure that both single and double quotes are converted to html entities so they won't break your html.
  24. Yes, if its enabled, there's a section of settings with a bold mysql heading.
  25. If mysql doesn't appear in the phpinfo output, it's not enabled. The Loaded Configuration File line in the phpinfo output is the php.ini that php is using. Make sure that's the one you are changing. If you are changing the correct php.ini how did you obtain and install php, as the determines how you enable php extensions or if you need to make further changes to the php.ini to get php to be able to find the extension .dll files?
×
×
  • 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.