Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Help a PHP noob

Name: Anonymous 2013-08-12 10:30

Hi guys. Just started tinkering in PHP.
I made a form with a dropdown box which get populated from a MYSQL database. like this:

<form name="form" method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">

<?php
echo  "<select name='search' onChange='this.form.submit()'>";
    while ($row = mysql_fetch_array($result)) {
        echo "<option value='" . $row['ID'] . "'>" . $row['ID'] . " </option>";
}
?>


This fetches an ID and fills the rest of the form with DB data like this:

$search=$_POST['search'];

$data = 'SELECT * FROM `tlbintake` WHERE `ID` = "'.$search.'"';
  $query = mysql_query($data) or die("Couldn't execute query. ". mysql_error());
  $data2 = mysql_fetch_array($query);


Everything works correctly but after selecting an ID from the dropdownbox it fills in all the data correctly but it resets the ID to the "first" ID in the list.

How can I make it show the correct ID in stead of the first one?

Name: Anonymous 2013-08-12 10:39

we can be absoluteley 100 per cent totally sure and certain that no black ppl were involved in inventing this. GUARANTEED.

 add blood transfusions and peanut butter and the few other things blacks invented and contributed. that is the plus side of the balance sheet. then subtract high crime and all the cost of lawyers courts judges and victims and incarcerations, all the bastard children who never had a father that cared to stay around, the welfare they disproportionately use, the gang activity and drugs and lives it destroys every day, affirmative action and economic costs of less qualified workers, politics usin race and crying that EVERYBODY they dont like is racist for stupid reasons, urban inner cities nobody can live in or start a business in because of gangs and crime, iq tests we cant use anymore because when blacks do bad nobody dares say maybe blacks have lower iq, no no the test is "biased" etc etc. single mothers are crime factories and most black mothers are single mothers. that dumb uneducated ghetto gutter bitch voting for obama for her "obama money" that obama gets "from his stash", jesse jackson, al sharpton, etc. then the virus of islam and all the blacks who convert to it.

 add up what they contribute one time and subtract what they cost every day. blacks are a net drain on society. admit it. then realize i dont like it either. i wish tehy were better people. but admit it. dont cry about hwo much you hate me for sayin it. it is the truth. admit it.

 put that in your political correctness pipe and smoke it.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List