Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. Wrap a if statement around the following lines which checks to see if $nextpage does not equal to $totalpages ($nextpage != $totalpages) // echo forward link for next page echo " <div id='all_page_turn'> <ul> <li class='PreviousPageBlog round_10px'><a href='http://www.cysticlife.org/Airwave_build.php?currentpage=$nextpage'>Next</a></li></ul></div> ";
  2. Is PHP configured to log the errors there? Look for the error_log directive within your php.ini. If php is not configured to report errors to a specific location it will instead log the errors to your http servers error log.
  3. No, it is still there. Go to maps.google.com go to the location you want your map to display, then look for the chain button (top right of page, just under the black bar). Click that button and you can get the code to display the map in your webpage. It also has a link so you customise the look of the map too.
  4. Then you need to move the .htaccess file to public_html/example.com (same folder where about.php is)
  5. Set the form up so it submits to itself. Then in your form field value attribute you'd do something like this value="<?php isset($_POST['field_name_here']) ? echo $_POST['field_name_here'] : ''; ?>"
  6. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=337941.0
  7. This is nothing to do with PHP. It seems in your admin control panel uses the curvy corners javascript library for displaying rounded corners. These errors are produced by this javascript library, not PHP. The instructions here tells you how to disable these errors.
  8. It does. The problem is web browsers ignores the new line characters (\n). You need to use the <br /> html tag in order for the browser to display text on a new line. PHP has a function for converting new line characters to <br /> tags called nl2br
  9. This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=337882.0
  10. You wont be able to display an image that is outside of the document root (in your case its C:/wamp/www).
  11. Yes, that will affect preg_match.
  12. Give the the script the full path to C:\myFolder\pics Example code to list contents of a directory foreach(glob(' C:/myFolder/pics/*') as $file) { echo "$filename size " . filesize($filename) . "\n"; } This will only list the files on the server. You wont be able to list any files from a folder on a users computer.
  13. The error on line 124 is caused by the two errors on lines 116 and 118. The errors on those two lines are due to you not setting your cookies correctly. You should read the manual for the setcookie function on how to use it. Fixing those two errors should solve the error on line 124. AyKay47 has fixed the error on line 118. You do something similar for line 116 setcookie("ID_my_site", $_POST['username'], $hour); Note: When posting code/errors please copy 'n paste them into your posts. There is no need to post screenshots. When posting code wrap it within or tags.
  14. Yes it is possible. You could perform another query within your loop to get the points for each team. However it is not recommended to run queries within a loop. An alternative is to perform one query and grab all the data you'll need. To query multiple tables within one query you can use joins.
  15. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=337690.0
  16. What is it exactly are you trying to do?
  17. You'd use mysql_affected_rows to see if your query inserted the record(s). I have tested your amount_verify() function and it returns $1,000.00 as 1000.00 for me.
  18. The problem is to do with this line of code if(email_verify($email)==$donors_row['email'] There you are comparing the return value of email_verify() with a string value of the donors email address ($donors_row['email']). Your function email_verify() will only return true or false. This is where your code is failing and why you're being redirected back to index.php?usercp=donate&e=f and shown the error message. You cannot compare a boolean to a string. You should be checking to see if email_verifiy does not return false and that the variable $email is the same as $donors_row['email']. Change this line if(email_verify($email)==$donors_row['email'] && $current_amount==$donors_row['amount'] && $name==$donors_row['name']){ to if(email_verify($email) !== FALSE && $email == $donors_row['email'] && $current_amount==$donors_row['amount'] && $name==$donors_row['name']){
  19. For each choice you divide the votes by the total number of votes and then multiple by 100 to get the percentage. Example code // some dummy data to work with $choices[1] = 6; $choices[2] = 5; $choices[3] = 20; // get the total number of votes $total_votes = array_sum($choices); // loop over the choices foreach($choices as $key => $choice) { // work out the percentage $pcent = round(($choice/$total_votes)*100); // display the result echo "Choice{$key}: $choice votes = %$pcent<br />"; }
  20. What should the code be doing? What are you trying to do?
  21. What are you trying to do? From your code it looks like you're wanting to get all users that have "zac1987" in frenusername column? If thats the case then your query just needs to be $query120 = "SELECT username FROM friendship WHERE frenusername='{$username2}' "; $result120 = mysql_query($query120,$connection) or die (mysql_error()); Then loop through the results to get all "zac1987"'s friends $friends = array(); while($row = mysql_fetch_assoc($result120)) $friends[] = $row['username']; The above code will add each friend to the $friends array. How you'd display the results from the query echo "$username2 is friends with " . implode(', ', $friend);
  22. If you query is returning more than one result you'll need to loop through the results function get_sections() { $result=mysql_query("SELECT * FROM sections"); $rows = array(); // use a loop to get all the results from the query while($row =mysql_fetch_assoc($result)) $rows[] = $row; // add the current row to the $rows array return $rows; // return all results };
  23. site_title = 'site_title' most probably needs to be site_title = '$site_title' on this line $query = "UPDATE settings SET site_slogan = '$site_slogan' WHERE site_title = 'site_title'";
  24. I didn't concatenate my variables correctly. This is what $php_mysql$ fixed. Below highlights the missing character from my code (the red dot) echo ' <a href="'.$_SERVER["PHP_SELF"].'?nxpage='.$i.'">'.$i.'</a> ';
  25. The variable $nxpages contains the numbers of pages you have. To display a link for each page you'd use for loop. Something like this should work for($i = 1; $i <= $nxpages; $i++) echo ' <a href="'.$_SERVER["PHP_SELF"].'?nxpage='.$i'">'.$i.'</a> ';
×
×
  • 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.