Jump to content

jcbones

Staff Alumni
  • Posts

    2,653
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by jcbones

  1. It seems they won't fix this bug, read for yourself. Bug 51184
  2. Correct syntax is: DELETE FROM table WHERE column = 'value'
  3. Yes, it would still be usable for the server, just not by any http request.
  4. 1. Put the file in a separate folder 2. use .htaccess to restrict the folder to `deny from all` .htaccess tips OR, 3. put the file in a folder above the public_html folder.
  5. $HTTP_POST_VARS are depreciated and turned off in PHP5. You must access them with $_POST.
  6. Post the code you have now. All I did was took the code's provided, and worked them into the css layout, un-tested. Pretty sure it is close, but a look at your code would resolve the issue.
  7. $rsSingles = "SELECT match_results_singles.match_date AS match_date, match_results_singles.match_time, match_results_singles.match_result, match_results_singles.home_sets_won as my_wins, match_results_singles.visitor_sets_won as my_losses, locations.loc_name, players.Player_name, ' ' as supplies_balls FROM (match_results_singles INNER JOIN players ON match_results_singles.match_visiting_player = players.Player_number) INNER JOIN locations ON match_results_singles.match_location = locations.loc_code WHERE (((match_results_singles.match_home_player)='{$ssPlayerNumber['player_number']}' )) UNION SELECT match_results_singles.match_date AS match_date, match_results_singles.match_time, match_results_singles.match_result, match_results_singles.visitor_sets_won as my_wins, match_results_singles.home_sets_won as my_losses, locations.loc_name, players.Player_name, '*' as supplies_balls FROM (match_results_singles INNER JOIN players ON match_results_singles.match_home_player = players.Player_number) INNER JOIN locations ON match_results_singles.match_location = locations.loc_code WHERE (((match_results_singles.match_visiting_player)='{$ssPlayerNumber['player_number']}' )) ORDER BY match_date"; $rsSinglesMatch = mysql_query($rsSingles) or die (mysql_error()); $rsSinglesMatches = mysql_fetch_array($rsSinglesMatch); //<- DELETE THIS LINE; $num_rows = mysql_num_rows($rsSinglesMatch); //$num_rows now contains the number of rows from the query echo $num_rows; if ($num_rows > 0 ) { echo $ssPlayerNumber; echo ("YEX"); } else { echo "ROWS"; } $myrow = mysql_fetch_row($rsSinglesMatch); //$rsSinglesMatches = mysql_fetch_assoc($rsSinglesMatch); print_r($myrow); // if (!($rsSinglesMatches==0) || !($rsSinglesMatches_BOF==1)) if ($myrow > 0) //<- $myrow is an array, it will never be greater than 0. Rather try if(is_array($myrow)) { echo $myrow; //<- you cannot echo an array, rather implode the array, echo implode(' ',$myrow); } else { echo "Rows not counted: "; } ?> Read ALL the comments. Mine are in there.
  8. header('Location: http://google.com'); exit();
  9. There's a hidden input redirect on line 2 of the code supplied. re-directs don't happen through hidden inputs.
  10. That page still has no result sets, You have two different calls to result sets without the first query being made. You provided a query earlier, but have failed to include it in this copy/paste. Please post the entire page, including all queries.
  11. I see several problems right now, but let me see from the query, to the end of the page. I think we could resolve this.
  12. Your post makes 0 sense. There is no evidence here to suggest that the pages interact with each other in any way. You are showing `reservation.php` which links to `gdform.php`(not shown), with NO link to `thankyou.php`. There are parse errors (...) as well. If we could see each page, we might be able to help... a little
  13. If you don't have a query, you don't have rows. You need a resultSet.
  14. include('connection.php'); //or include 'connection.php';
  15. Let us know if you have more problems. <?php include('config.php'); //You must have a database connection. $images=mysql_query("SELECT * FROM img WHERE refimage='$ref'"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title> Stu Nicholls | CSSplay | A Vertical Scrolling Photograph Gallery</title> <meta name="Author" content="Stu Nicholls" /> <meta name="Keywords" content= "cssplay, css, play, Cascading, Style, Sheets, experiments, demonstrations, gallery, galleries, photo, albums, slide, show, scrolling, vertical " /> <meta name="Description" content="CSS - Cutting edge Cascading Style Sheets. Experiments in CSS" /> <meta name="verify-v1" content="n3Dpx4NklZjg5p/Tq7h1q+Oj6Ml83crtkO/PwepVQ6Y=" /> <meta http-equiv="imagetoolbar" content="no" /> <link rel="meta" href="http://www.cssplay.co.uk/labels.rdf" type="application/rdf+xml" title="ICRA labels" /> <meta http-equiv="pics-Label" content='(pics-1.1 "http://www.icra.org/pics/vocabularyv03/" l gen true for "http://cssplay.co.uk" r (n 0 s 0 v 0 l 0 oa 0 ob 0 oc 0 od 0 oe 0 of 0 og 0 oh 0 c 0) gen true for "http://www.cssplay.co.uk" r (n 0 s 0 v 0 l 0 oa 0 ob 0 oc 0 od 0 oe 0 of 0 og 0 oh 0 c 0))' /> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://www.cssplay.co.uk/feed.xml" /> <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" /> <link rel="icon" href="../favicon.ico" type="image/ico" /> <style type="text/css"> @import url(http://www.google.com/cse/api/branding.css); </style> <link rel="stylesheet" media="all" type="text/css" href="../css/default.css" /> <style type="text/css"> /* defaults required for IE */ a, a:visited, a:hover, a:active, a:focus {color:#000;} #holder {position:relative; background:transparent url(vertical-slide/photographer.jpg) 90px 0 no-repeat; margin-bottom:10px; width:750px; height:400px;} #scrollbox {padding:0; margin:0; width:110px; list-style:none; height:360px; overflow:auto; float:right;} #scrollbox li {float:left;} #scrollbox a {display:block; color:#999; text-decoration:none; border:1px solid #fff; width:75px; height:56px; float:left; padding:5px; font-family:"trebuchet ms", sans-serif; font-size:24px; text-align:center;} <?php $a = 'a'; while($r = mysql_fetch_assoc($images)) { echo '#scrollbox a.slide' . $a++ . ' {background:url(vertical-slide/' . $r['thumb'] . ') no-repeat center center;}' . "\n"; } mysql_data_seek($images,0); ?> #scrollbox a span {display:block; position:absolute; left:-9999px; top:0;} #scrollbox a span img {border:0;} #scrollbox a:hover {border:1px solid #888;} #scrollbox a:hover span {width:480px; height:400px; left:90px; background:#fff; z-index:100;} #scrollbox a:active {border:1px solid #000;} #scrollbox a:focus {border:1px solid #000; outline:0;} * html #scrollbox a:active span {width:480px; height:400px; top:0; left:90px; color:#000; background:#fff; z-index:-1;} #scrollbox a:focus span {width:480px; height:400px; top:0; left:90px; color:#000; background:#fff; z-index:10; outline:0;} </style> </head> <body> <div id="holder"> <ul id="scrollbox"> <?php $a = 'a'; while($r = mysql_fetch_assoc($images)) { echo '<li><a class="slide' . $a++ . '" href="#nogo"><span><img src="vertical-slide/' . $r['image'] . '" alt="" /><br />' . $r['title'] . '</span></a></li>' . "\n"; } ?> </ul> </div> </body> </html>
  16. As well as all the other video's in the series. 20 minutes will help you understand how to properly design a database.
  17. Example from the manual: <?php $january = new DateTime('2011-01-23'); $february = new DateTime('2011-02-23'); $interval = $february->diff($january); // %a will output the total number of days. echo $interval->format('%r%a total days')."\n<br />"; // While %d will only output the number of days not already covered by the // month. echo $interval->format('%m month, %d days'); ?>
  18. That is because this would be HTML not PHP. <a href="http://full/path/to/image" target="_blank"><img src="thumbnail/image.jpg" alt="my thumbnail" border="0"/></a> .
  19. Something like: <?php $subject = "I want everything before tim and nothing after"; $word = 'tim'; $subject = substr($subject,0,(strpos($subject,$word) + strlen($word))); echo $subject; ?>
  20. So what about this doesn't work. You have the hyperlink in there.
  21. Yes, but you make your variables AFTER you build your sql string. So, the sql string has no Idea what the variables are. You must move your sql string BELOW your variable instantiation.
  22. It strips out any html tags someone would enter into the form. Is is a *little* sanitation of your form, more could be added. It is more important that line be on your "name" field than the "email" field, since you add the name field into your message. If headers are wrong, you won't get the message, I would make sure the message is clean IF/WHEN I get it.
  23. $query = "SELECT people.id AS pID, ratings.* FROM people INNER JOIN ratings ON people.id = ratings.rater_id AND ratings.event_id = '$eventid' AND ratings.complete = 'n' "; $result = mysql_query($query); while ($row=mysql_fetch_assoc($result)){ echo $row['pID']; }
  24. Have you tried running a single query, like: $lines = file("file", FILE_IGNORE_NEW_LINES); require('dbconfig1.php'); $bad_symbols = array("'",","); //set bad symbols $linesgood = str_replace($bad_symbols,"",$lines); // remove bad symbols i was using mysql real escape but couldnt get it to work. print "<cenetr><table><tr><th>whaetver colum1</th><th>whatever colum2</th></tr>"; $recipeQuery = mysqli_query($conn1, "SELECT * FROM mp_id3_tags WHERE filename IN ('" . implode('\',\'',$linesgood) . "')"); //query database for each one while($recipeQuery1 = mysqli_fetch_array($recipeQuery)) { print "<tr><td>{$recipeQuery1['row1']}</td><td>{$recipeQuery1['row2']}</td></tr>"; } print "</table></center>"
×
×
  • 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.