Jump to content

HaZaRd420

Members
  • Posts

    37
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

HaZaRd420's Achievements

Member

Member (2/5)

0

Reputation

  1. Yep. It worked out. Thanks alot man. I've actually learned from a few mistakes and caught my self!. Thanks.
  2. Take the $ "From // if ($_POST["$submit"]) \\" on line 1 out of submit and it will work. <? if ($_POST["$submit"]) { $Forename = $_POST["Forename"]; $Surname = $_POST["Surname"]; $CurrentGrade = $_POST['CurrentGrade']; $DateAcheived = $_POST['DateAcheived']; $LicenseNumber = $_POST['LicenseNumber']; $LicenseExpiry = $_POST['LicenseExpiry']; $DateOfBirth = $_POST['DateOfBirth']; $MedicalProblem = $_POST['MedicalProblem']; $Medication = $_POST['Medication']; $CriminalRecord = $_POST['CriminalRecord']; $Address = $_POST['Address']; $Postcode = $_POST['Postcode']; $Phone = $_POST['Phone']; $Mobile = $_POST['Mobile']; $Email = $_POST['Email']; $Occupation = $_POST['Occupation']; $sql = "UPDATE $table SET Forename='$Forename',Surname='$Surname',CurrentGrade='$CurrentGrade',DateAcheived='$DateAcheived',LicenseNumber='$LicenseNumber',LicenseExpiry='$LicenseExpiry',DateOfBirth='$DateOfBirth',MedicalProblem='$MedicalProblem',Medication='$Medication',CriminalRecord='$CriminalRecord',Address='$Address',Postcode='$Postcode',Phone='$Phone',Mobile='$Mobile',Email='$Mobile',Occupation='$Occupation' WHERE id=$id"; $result = mysql_query($sql); echo "Thank you! Information updated."; } } ?>
  3. Here is the page I want to link it to. Is this the Output? <? include("header.php") ?> <table width="100%" cellspacing="0px" cellpadding="0px"> <tr class="newstop"> <td class="news"> TEAMROSTER <br /> <td class="news2">Category: Roster</td> </tr> <tr> <td colspan="100%" class="newstext"> <center> <? //connect to mysql //change user and password to your mySQL name and password mysql_connect("#","#","#"); //select which database you want to edit mysql_select_db("#"); //select the table $result = mysql_query("select * from roster"); //grab all the content while($r=mysql_fetch_array($result)) { //the format is $variable = $r["nameofmysqlcolumn"]; //modify these to match your mysql table columns $handle=$r["handle"]; $img=$r["img"]; $name=$r["name"]; $exp=$r["exp"]; $location=$r["location"]; $config=$r["config"]; $manufacture=$r["manufacture"]; $cpu=$r["cpu"]; $videocard=$r["videocard"]; $memory=$r["memory"]; $monitor=$r["monitor"]; $headphones=$r["headphones"]; $keyboard=$r["keyboard"]; $mouse=$r["mouse"]; $id=$r["id"]; //display the row echo " <table width=\"100%\" cellspacing=\"2px\" cellpadding=\"2px\"> <tr> <td colspan=\"100%\"><center><img src=\"$img\" width=\"83px\" height=\"101px\"></td> </tr> <tr style=\"font-size: 11px;\"> <td bgcolor=\"#000000\" width=\"45px\" class=\"menutop\" >Handle</td> <td class=\"menutext\">$handle</td> </tr> <tr style=\"font-size: 11px;\"> <td bgcolor=\"#000000\" width=\"45px\" class=\"menutop\" >Name</td> <td class=\"menutext\">$name</td> </tr> <tr style=\"font-size: 11px;\"> <td bgcolor=\"#000000\" width=\"45px\" class=\"menutop\" >Experience</td> <td class=\"menutext\">$exp</td> </tr> <tr style=\"font-size: 11px;\"> <td bgcolor=\"#000000\" width=\"45px\" class=\"menutop\" >Location</td> <td class=\"menutext\">$location</td> </tr> <tr style=\"font-size: 11px;\"> <td bgcolor=\"#000000\" width=\"45px\" class=\"menutop\" >Config</td> <td class=\"menutext\">$config</td> </tr> <tr style=\"font-size: 11px;\"> <td bgcolor=\"#000000\" width=\"45px\" class=\"menutop\" >Manufacture</td> <td class=\"menutext\">$manufacture</td> </tr> <tr style=\"font-size: 11px;\"> <td bgcolor=\"#000000\" width=\"45px\" class=\"menutop\" >CPU / Processor</td> <td class=\"menutext\">$cpu</td> </tr> <tr style=\"font-size: 11px;\"> <td bgcolor=\"#000000\" width=\"45px\" class=\"menutop\" >VideoCard</td> <td class=\"menutext\">$videocard</td> </tr> <tr style=\"font-size: 11px;\"> <td bgcolor=\"#000000\" width=\"45px\" class=\"menutop\" >Memory</td> <td class=\"menutext\">$memory</td> </tr> <tr style=\"font-size: 11px;\"> <td bgcolor=\"#000000\" width=\"45px\" class=\"menutop\" >Monitor</td> <td class=\"menutext\">$monitor</td> </tr> <tr style=\"font-size: 11px;\"> <td bgcolor=\"#000000\" width=\"45px\" class=\"menutop\" >Headphones</td> <td class=\"menutext\">$headphones</td> </tr> <tr style=\"font-size: 11px;\"> <td bgcolor=\"#000000\" width=\"45px\" class=\"menutop\" >Keyboard</td> <td class=\"menutext\">$keyboard</td> </tr> <tr style=\"font-size: 11px;\"> <td bgcolor=\"#000000\" width=\"45px\" class=\"menutop\" >Mouse</td> <td class=\"menutext\">$mouse</td> </tr> </table> "; } ?><br /> <center> - - <a href="index.php?id=roster">Take me back!</a> - - </td> </tr> </table> <? include("footer.php") ?>
  4. Heres my code. I tried it. and nothing came up all that gets added to the url is view= / and the page i have the rest of the info on is info.php <? mysql_connect("localhost","#","#"); mysql_select_db("noob_roster"); $result = mysql_query("select * from roster ORDER BY handle DESC LIMIT 20"); while($r=mysql_fetch_array($result)) { $handle=$r["handle"]; $name=$r["name"]; $location=$r["location"]; $id=$r["id"]; echo "<tr style=\"background: #ffffff; padding: 2px; color:#1c1c1c;\"> <td style=\"border: 1px solid #ffffff;\">$handle</td> <td style=\"border: 1px solid #ffffff;\">$name</td> <td style=\"border: 1px solid #ffffff;\">$location</td> <td style=\"border: 1px solid #ffffff;\"><a href=\"?view=".$result[id]."\">View</a></td> </tr>"; } ?>
  5. So Ive made my roster page. It displays only 3 things from the database which are, Name, handle and location . Then I have a link that says View. - The view is to view there profile. I Dont know how to set it up to where I can click on that view and it will select the right id and show the remaining information like computer specs ect.. Thanks for your time.
  6. Can you show what it looks like in code? pls thnx
  7. Could I make the id time stamp? or will that mess with the id #'s
  8. I want to be able to submit and then have my text that I submited to the database, and actually put the old ones on the bottom and the new ones on top. Some how its the other way around... Is there a code for this in the php on the page or the mysql order? Thanks.
  9. Ehhhh, I guess I will figure somthing out. Just seems somthings get to hard when there easy. :P thanks much radar.
  10. Im not advanced at php but you should set the thumbnail image height and width (make it smaller ). Then set the default height and width when you want to view the image. Hope this helps.
  11. Learn PHP. Its a great programing language to be able to do what you want to. To get started www.php.net. Or you can search for already made scripts for what you want if you dont want to learn php.
  12. But I already have a table with what I want on it. I dont see why I can take the existing and input it that way then making a whole new table.
×
×
  • 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.