Results 1 to 2 of 2

Thread: Need some more help please

  1. #1
    Join Date
    Aug 2009
    Thanked 0 Times in 0 Posts

    Default Need some more help please

    Can someone please show me what I'm doing wrong here.... Thanks in advance.... You guys Rock!



    //// Get items from url
    $area1 = mysql_real_escape_string($_GET['area']);
    $block_number1 = mysql_real_escape_string($_GET['block_number']);

    // Set how wide you want your table
    $tblWidth = 2;
    // Make your query
    $sql = mysql_query("select * from platform_location where block_number = \"$block_number\" and area = \"$area\"");
    $i = 1;
    echo '<table align=center width=100%>';
    // Check to see if any results were returned
    if(mysql_num_rows($sql) > 0){
    echo '<tr>';
    // Loop through the results
    while($row = mysql_fetch_array($sql)){
    echo '<td bgcolor=grey align=center><font color="ffffff"><b>'. $row['area'] .' '. $row['block_number'] .'</b></font><br>Structure Name: '. $row['structure_name'] .'<br>Latitude: '. $row['latitude'] .'<br>Longitude: '. $row['longitude'] .'<br>Attended: '. $row['attended'] .'
    <br><a href="platform_info.php?p_id='. $row['p_id'] .'" target="_self"><img src="Aqua-Screensaver-icon.png" width="64" height="64" border="0" alt="Click For More Information" /></a><br></td>';
    if($i == $tblWidth){
    echo '</tr><tr>';
    $i = 0;
    echo '</tr>';
    echo '<tr><td><br>You Must Select A Block Number!</td></tr>';
    echo '</table>';


  2. #2
    Join Date
    Apr 2008
    Thanked 516 Times in 502 Posts
    Blog Entries


    Quote Originally Posted by captainjustin View Post
    Can someone please show me what I'm doing wrong here....
    A very broad question...

    You have mismatched BBCode tags ([php] ... [/code] should be [php] ... [/php])

    You are mixing logic with output (it's better to have the script do all of the work first, assigning the result to a variable, and then print everything to the browser at once)

    You're using the mysql_*() functions -- if you're using MySQL greater than version 4.1 (hint: you almost certainly are), you should be using to mysqli_*() (or PDO, etc.) functions instead

    If your question is actually about something specific, please be more specific, and we'd be happy to give a more specific answer.
    Your question is unclear.
    Please provide more information, and be as specific as possible.
    • What do you want to accomplish?
    • What have you already tried?
    • What problems did you encounter?

    Also, please be sure that you have included all relevant code and/or a link to the page in question.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts