Jump to content

Crashdowngurl

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Crashdowngurl's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. No message :( PHP hates me! [code] $query        =    "SELECT * FROM portfolio WHERE id='$id'";     // Store info in debug     $debuginfo    .=    "INFO QUERY ".$query;   $debugtotal=$debugtotal+1; $result = mysql_query($query); if(!$result){ echo mysql_error(); }[/code] Thats how I added it in there, page still displays fine, but doesn't show any of the information.
  2. [!--quoteo(post=370686:date=May 2 2006, 03:07 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 2 2006, 03:07 PM) [snapback]370686[/snapback][/div][div class=\'quotemain\'][!--quotec--] I would suggest removing the error suppression ("@" symbol) to see if there are any errors with the query. [/quote] I removed it and the page displays no errors. Any other thoughts?
  3. I've been working on this for hours and I can't find whats going wrong to save my life. I have a feeling this is one of those situations where I am going to feel dumb for not realizing the problem :) I know this is probably something to do with $_GET['id'] but I am unsure how to structure it. I am creating a page that will pull entries from a database and display a list of the enteries on the side of the page, when you click on one, it will display that entry's data. I am working doing this for my portfolio pieces for school, so each of my projects has a name that is supposed to call the id, title, type, image, description, and link from the database. The list of entries displays perfectly on the side, however, when I click on the them, no information all appears. I've attached the code below. Please help me! [code]<?php error_reporting(0); include $_Server['DOCUMENT_ROOT'].'includes/header.html'; require('includes/database.php');                 // What are we looking for? (Decide Query) $query        =    "UPDATE fbnet_portfolio WHERE id=1 SET count = count + 1";     // Store info in debug     $debuginfo    .=    "COUNTER QUERY ".$query;   $debugtotal=$debugtotal+1; // Update the counter table setting the total hits up by one mysql_query($query,$db);                         if (!isset($type) or $type=="") {     $type="website"; } // Format if $id is not set or if it ="" then set it to "1" if (!isset($id) or $id=="") {     $id="1";   } $result = mysql_query("SELECT id, title, type FROM portfolio WHERE type='website'"); while($result && list($id, $title, $type)=mysql_fetch_row($result)) {     $portfoliolist    .=    "<a href=\"webdesign.php?id=" . $id . "\">" . $title . "</a><br />"; } // What are we looking for? (Decide Query) $query        =    "SELECT * FROM portfolio WHERE id=".$id;     // Store info in debug     $debuginfo    .=    "INFO QUERY ".$query;   $debugtotal=$debugtotal+1; $result = mysql_query($query); //while ($myrow = mysql_fetch_row($result)) if ($myrow = @mysql_fetch_array($result)) {     $title        =    $myrow[1];     $type        =    $myrow[2];     $image        =    $myrow[3];     $description            =    $myrow[4];     $link    =    $myrow[5];        } ?> [/code] I'm using the following to pull the information from the database: [code]<?PHP echo($title); ?> [/code] Like I said, the list is working fine, it's just when you click on the links, the information relative to the id number is not displaying. Any help with this would be EXTREMELY appreciated :) Thank you! -Emma
×
×
  • 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.