I don't know why it won't send the data that's included. Each one was properly pulled from the database, so that's not the issue.
What happens, is when I click the $name in any given field, it takes me to the next page like it should with the url being "Http://www.chrysys.net/porfolios.php?id=1" or whatever I click. But when it does that, for some reason it doesn't pull the data from the database where the id = the one selected.
I've managed to isolate the problem to the link, trying to get the data inside that for the next page, but I just can't seem to work it. I know that since it takes me to id=1, that the information is on the page, but for some reason it won't send to the next page.
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Thanked 637 Times in 625 Posts
Is your HTML validating? Cuz, I'm not going to swear by it, but I don't think it's valid to stick an anchor inside a hidden input tag like what you've done. You should be closing that hidden input tag immediately and then do the anchor.
Lol, this was my last attempt . Nothing has worked up to this point, and everything I've done (from not using a form and just doing the url, to what you see now) hasn't worked. I've used 5 different techniques to send the data, but for some reason, none of them work. It won't pull data from the database in portfolios.php?id=, and the isolated reason is that the id from the previous page doesn't load properly to send to the next page. So when it tries to select from the database where id=$id since $id is an unassigned value, it can't select anything.
$sql = "SELECT `ID`,`Name`,`Rank`,`1`,`2`,`3`,`4`,`5`,`About`,`Interests`,`Services`,`Portfolio` FROM `profile` WHERE `ID` = '".$id."'";
You don't need the url to be in the form, get variables are retrieved from the URL so the form isn't needed just replace the form with that url above. Secondly, as trivial as it is sometimes just adding ` to your sql elements makes a difference. It fixed my strange error before, wouldn't work then but worked after. I'm still not sure EXACTLY what the problem is but try it.
Nah, I was really stupid when I did this. I couldn't use a form (which was my last attempt)..
So I solved it using the methods taught by learning C++ :P.
Basically I used the fetch_num_rows to see if the data was getting to the page, then I echoed it to display, and when I saw the '1' I realized that it did in fact pull the information for the prior page.
my error was here:
while($row = mysql_fetch_array($result));
which I changed to
$row = mysql_fetch_assoc($result);
Which solved it :P.
Thanks to all who attempted . (Sorry for not trying a lil harder =/)