Welcome! Log In Create A New Profile

Advanced

DELETE and EDIT

Posted by Tshepo_sibiya 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar DELETE and EDIT
October 08, 2013 04:55PM
for delete and edit,i used buttons to execute the code but everything still works perfectly fine.i nocited that most people used links,then used if else to delete or edit.since the whole point for this project is to prove that we are able to INSERT,EDIT and DELETE and also to EXTRACT information from the database and display it in the page,does it really matter on how we got all functions to work.or is there a particular proceedure that every one has to follow to do all this?to put the quetion in short,DOES IT REALLY MATTER HOW WE CODE,HOW WE INSERT,EDIT DELETE or EXTRACT data from the database?
avatar
Mac
Re: DELETE and EDIT
October 10, 2013 08:27AM
It is much simpler to use links when you list data to be edited in a table. In general terms the logic for these functions will not differ to much - you have to send something, receive it, do something with it. No two persons will write exactly the same code.
Re: DELETE and EDIT
October 11, 2013 11:26AM
I tried my best but still can't have the form to display the data from the list which is to be edited.
Language: PHP
<?php session_start();   if (!(!(isset($_SESSION[';login';]) && $_SESSION[';login';] != ';';))) { header("Location: login.php"); }   if (isset($_POST[';Submit';])) { //Checking if the submit button was clicked //Assigning form data to variables $player_id = $_POST[';player_id';]; echo $player_id; $fname = $_POST[';fname';]; $sname = $_POST[';sname';]; $cnumber = $_POST[';cnumber';]; $email = $_POST[';email';]; $pos = $_POST[';pos';]; $uname = $_POST[';uname';]; $pword = $_POST[';pword';];     include("connect.php"); if (!$db) //Check connection { echo "Could not connect to the database."; }   else {   //Update the table $query = "UPDATE clubdata playerregistration SET player_name = ';$fname';, player_surname = ';$sname';, player_contact_num = ';$cnumber';, player_email = ';$email';, player_position = ';$pos';, player_username = ';$uname';, player_password = ';$pword'; WHERE player_id = ';$player_id';"; $result = mysql_query($query); if ($result) { echo "Player';s information updated successfully"; } else { echo "Failed to update player';s information."; } mysql_close($connection); } }           //form to display the player';s information to be edited echo "<div align=';center';>"; echo "<form method=';post'; action=';edit.php'; >"; echo "<table cellpadding=';5'; bgcolor=';aqua'; border>"; //table to hold the data in the form aligned echo "<td colspan=';2';>&nbsp&nbsp&nbsp&nbspPlayer';s details to be edited:</td></tr>"; echo "<input name=';player_id'; type=';hidden'; value=';", $player_id, "';>"; echo "<tr>"; echo "<td>Name: </td>"; echo "<td><input name=';fname'; type=';text'; value=';", $fname, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Surname: </td>"; echo "<td><input name=';sname'; type=';text'; value=';", $sname, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Contact number: </td>"; echo "<td><input name=';cnumber'; type=';text'; value=';", $cnumber, "';></td></tr>";   echo "<br />";   echo "<tr>"; echo "<td>Email: </td>"; echo "<td><input name=';email'; type=';text'; value=';", $email, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Position: </td>"; echo "<td><input name=';pos'; type=';text'; value=';", $pos, "';</td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Username: </td>"; echo "<td><input name=';uname'; type=';text'; value=';", $uname, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Password: </td>"; echo "<td><input name=';pname'; type=';text'; value=';", $pword, "';></td></tr>"; echo "<br />";       echo "<tr >"; echo "<td align=';center'; colspan=';2';><input type=';Submit'; value=';Update';></td></tr>"; echo "</table>"; echo "</form>"; //end of the form echo "</div>";     ?>


My other issue is the delete page,how do i know when YES was clicked to confirm that indeed the user want to delete the player? I used the links,YES and NO
Language: PHP
<?php   //Delete page session_start();   if (!(!(isset($_SESSION[';login';]) && $_SESSION[';login';] != ';';))) { header("Location: login.php"); }     $player_id = $_POST[';player_id';]; $fname = $_POST[';fname';]; $sname = $_POST[';sname';]; $cnumber = $_POST[';cnumber';]; $email = $_POST[';email';]; $pos = $_POST[';pos';]; $uname = $_POST[';uname';]; $pword = $_POST[';pword';];   include("connect.php"); if (!$db) //Check connectiom { echo "Could not connect to the database"; } else { // if connection was established if (isset($_GET[';player_id';]) == $_player_id ){ // Check if yes was chosen to definetely delete   $query = "DELETE * FROM playerregistration WHERE player_id = $player_id"; //use $result = mysql_query($query); if ($result) { echo "Player deleted successfully."; } else { echo "Failed to delete a player."; } mysql_close($connection); } }                       //Option[yes or no] to make sure that the user really wants to delete the player echo "Are you sure you want to delete $fname?<a href=delete.php?player_id=$player_id>Yes</a>&nbsp;&nbsp;<a href=list_players.php>No</a>";       //form to dispay the player';s information to be deleted $fname = $_POST[';cnumber';]; $email = $_POST[';email';]; $pos = $_POST[';pos';]; $uname = $_POST[';uname';]; $pword = $_POST[';pword';];     echo "<div align=';center';>"; echo "<form2 method=';post'; >"; echo "<table cellpadding=';5'; bgcolor=';aqua'; border>"; //table to hold the data in the form aligned echo "<td colspan=';2';>&nbsp&nbsp&nbsp&nbspDetails of the player to be deleted:</td></tr>";   echo "<tr>"; echo "<td>Name: </td>"; echo "<td><input name=';fname'; type=';hidden'; value= ';$fname';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Surname: </td>"; echo "<td><input name=';sname'; type=';hidden'; value=';player_surname'; value=';", $sname, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Contact number: </td>"; echo "<td><input name=';cnumber'; type=';hidden'; value=';player_contact_num'; value=';", $cnumber, "';></td></tr>";   echo "<br />";   echo "<tr>"; echo "<td>Email: </td>"; echo "<td><input name=';email'; type=';hidden'; value=';player_email'; value=';", $email, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Position: </td>"; echo "<td><input name=';pos'; type=';hidden'; value=';player_pos value=';", $pos, "';</td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Username: </td>"; echo "<td><input name=';uname'; type=';hidden'; value=';player_username'; value=';", $uname, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Password: </td>"; echo "<td><input name=';pword'; type=';hidden'; value=';player_password'; value=';", $pword, "';></td></tr>"; echo "<br />";     echo "</table>"; echo "</form2>"; //end of the form echo "</div>";     ?>
avatar Re: DELETE and EDIT
October 11, 2013 11:43AM
Why are you putting commas , in your echo statement ?

Language: PHP
echo "<td><input name=';fname'; type=';text'; value=';", $fname, "';></td></tr>";

You concatenate strings with a fullstop .
Re: DELETE and EDIT
October 11, 2013 11:55AM
@47082712_ob
firstly there is way too much code here...
can be used by students that know less then you, and secondly you need to do some sort of debugging and try be more specific,
cant just post your page and ask for it to be fixed...

things you can do to search for the error...
start by echo' ing or displaying variables in pop ups.... make sure they display what you expect...
Echo your querry, make sure that the variables display correctly and that you are not missing something

run the SQL querry directly on the DB and make sure it returns what you expect

As for the yes no....
you can add variable into your url

Language: PHP
Are you sure you want to delete $fname?<a href=delete.php?player_id=$player_id ?player_id=$player_id&Action=yes

Oh and I think its beter to use the . as the the concatenation operator
avatar Re: DELETE and EDIT
October 11, 2013 12:13PM
This is line is incorrect.

You need to extract the value of player_id from the $_GET array.
isset only determines if a variable exists, it does not determine the value of the variable.

Language: PHP
if (isset($_GET[';player_id';]) == $_player_id ){ // Check if yes was chosen to definetely delete

if (isset($_GET['player_id']) {

$player_id = $_GET['player_id'];
}

The entire logic of your script is incorrect.
You will not get $_POST and $_GET arrays at the same time like that.

The $_POST array will only exist if the user clicks the "Submit" button when the form method is "POST", there will be no $_GET array.

If the user clicks on a link, with data in the URL, then the $_GET array will be set, but not the $_POST array.

The only way to get both is to do somethng like this -

form method="POST", and
add data to the url in the form action attribute.

action="delete.php?ans=YES"


How do you expect your form to display anything if all the input types are "hidden" ?
avatar Re: DELETE and EDIT
October 11, 2013 01:37PM
If you are simply trying to display information to check if the correct player has been selected, then a form is not the appropriate way to do it.

All you need to do is to echo the information.

You only need to use a form if you want the user to be able to enter information.
Re: DELETE and EDIT
October 11, 2013 09:17PM
Thank you very much guys.My logic is as follows:
  1. .
    Read data from the table using the player_id retrieved with $_GET
    Display the data from the table onto the form
    Check if the Update(Submit) button was clicked
    Update the table with the data on the form
    ..
  2. ...

I get everything right except that i cannot update the table with the data on the form.My script does not echo anything.
Language: PHP
if ($result1) { echo "Please update the player';s information"; //Inform the user to edit the data in the form if needed if (isset($_POST[';Submit';])) //Checking if the submit button was clicked { $player_id = $_GET[';player_id';]; //Update the table $query = "UPDATE playerregistration SET player_name = ';$fname';, player_surname = ';$sname';, player_contact_num = ';$cnumber';, player_email = ';$email';, player_position = ';$pos';, player_username = ';$uname';, player_password = ';$pword'; WHERE player_id = ';$player_id';"; $result = mysql_query($query); if ($result) { echo "Player';s information updated successfully"; } else { echo "Failed to update player';s information."; } mysql_close($connection); }

I did not put the checking of submit button in the beginning because when the page is first open,you are presented with the form with data for you to edit,THEN you can click SUBMIT
Language: PHP
if (isset($_POST[';Submit';])) //Checking if the submit button was clicked
avatar Re: DELETE and EDIT
October 11, 2013 09:57PM
Language: PHP
if (isset($_POST[';Submit';])) //Checking if the submit button was clicked { $player_id = $_GET[';player_id';];


Have you changed your form so that you can retrieve both $_POST and $_GET data at the same time ?


Or, if player_id is in a hidden input, you need to retrieve it from $_POST, and not $_GET.


Are you sure that $result1 is returning true ? None of the code fragment displayed above will execute if that is not the case.
avatar Re: DELETE and EDIT
October 12, 2013 08:56AM
Where do your variable values come from ? $fname, $sname etc.

Surely they should be recovered from the $_POST array within the if (isset($_POST['Submit'])) construct ?

Language: PHP
if (isset($_POST[';Submit';])) //Checking if the submit button was clicked


You are therefore either attempting to extract them from $_POST without checking if it is set, or you have duplicate code for another isset($_POST) condition.
Re: DELETE and EDIT
October 15, 2013 10:07AM
Hello,

Plz help I have a slight problem on the editing part in the team selection table. It does not edit the two fields. I have been trying to debug but I can't find any error.
avatar Re: DELETE and EDIT
October 15, 2013 11:08AM
Need more info than that, there are many possible reasons why it does not work.
Re: DELETE and EDIT
October 15, 2013 12:31PM
Problem solved, my portfolio is working perfectlysmile
Re: DELETE and EDIT
October 16, 2013 05:19AM
I have tried BUT still have the same problem,my page can't update the edited data on the form,
Language: PHP
<?php session_start();   if (!(!(isset($_SESSION[';login';]) && $_SESSION[';login';] != ';';))) { header("Location: login.php"); } include("connect.php"); if (!$db) //Check connection { echo "Could not connect to the database."; } if (isset($_POST[';Submit';])) //Checking if the submit button was clicked {     $player_id = $_POST[';player_id';]; //$player_id = $_GET[';player_id';]; //Update the table $query = "UPDATE playerregistration SET player_name = ';$fname';, player_surname = ';$sname';, player_contact_num = ';$cnumber';, player_email = ';$email';, player_position = ';$pos';, player_username = ';$uname';, player_password = ';$pword'; WHERE player_id = ';$player_id';"; $result = mysql_query($query); if ($result) { echo "Player';s information updated successfully"; //Was the data updated? } else { echo "Failed to update player';s information."; } mysql_close($connection); }       //Read data from the table and present it in the form $player_id = $_GET[';player_id';];//Get the player_id from URL if ($player_id) { $query1 = "SELECT * FROM playerregistration WHERE player_id = ';$player_id';";//Read a player';s details from table based on player_id from list $result1 = mysql_query($query1) or die("Query failed: " . mysql_error()); if ($result1)//Is data returned from the query? {   while ($row = mysql_fetch_array($result1)) { //Assigning retrieved data from the table into the form $fname = $row[';player_name';]; $sname = $row[';player_surname';]; $cnumber = $row[';player_contact_num';]; $email = $row[';player_email';]; $pos = $row[';player_position';]; $uname = $row[';player_username';]; $pword = $row[';player_password';]; } echo "Please update " . $fname . " " . $sname . ';\';s'; . '; '; . "information"; //Inform the user to edit the data in the form if needed   } }                               //form to display the player';s information to be edited echo "<div align=';center';>"; echo "<form method=';post';>"; echo "<table cellpadding=';5'; bgcolor=';aqua'; border>"; //table to hold the data in the form aligned echo "<td colspan=';2';>&nbsp&nbsp&nbsp&nbspPlayer';s details to be edited:</td></tr>"; echo "<input name=';player_id'; type=';hidden'; value=';", $player_id, "';>"; echo "<tr>"; echo "<td>Name: </td>"; echo "<td><input name=';fname'; type=';text'; value=';", $fname, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Surname: </td>"; echo "<td><input name=';sname'; type=';text'; value=';", $sname, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Contact number: </td>"; echo "<td><input name=';cnumber'; type=';text'; value=';", $cnumber, "';></td></tr>";   echo "<br />";   echo "<tr>"; echo "<td>Email: </td>"; echo "<td><input name=';email'; type=';text'; value=';", $email, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Position: </td>"; echo "<td><input name=';pos'; type=';text'; value=';", $pos, "';</td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Username: </td>"; echo "<td><input name=';uname'; type=';text'; value=';", $uname, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Password: </td>"; echo "<td><input name=';pname'; type=';text'; value=';", $pword, "';></td></tr>"; echo "<br />";       echo "<tr >"; echo "<td align=';center'; colspan=';2';><input type=';Submit'; value=';Update';></td></tr>"; echo "</table>"; echo "</form>"; //end of the form echo "</div>";     ?>






And my delete page is the same,can't delete the info
Language: PHP
<?php   //Delete page session_start();   if (!(!(isset($_SESSION[';login';]) && $_SESSION[';login';] != ';';))) { header("Location: login.php"); }     $player_id = $_GET[';player_id';]; //Get the player_id from the URL $fname = $_POST[';fname';]; $sname = $_POST[';sname';]; $cnumber = $_POST[';cnumber';]; $email = $_POST[';email';]; $pos = $_POST[';pos';]; $uname = $_POST[';uname';]; $pword = $_POST[';pword';];   include("connect.php"); if (!$db) //Check connectiom { echo "Could not connect to the database"; } else { // if connection was established   //Read data from the table and present it in the form $player_id = $_GET[';player_id';];//Get the player_id from URL $query1 = "SELECT * FROM playerregistration WHERE player_id = ';$player_id';";//Read a player';s details from table based on player_id from list $result1 = mysql_query($query1) or die("Query failed: " . mysql_error());   while ($row = mysql_fetch_array($result1)) { //Assigning retrieved data from the table into the form $fname = $row[';player_name';]; $sname = $row[';player_surname';]; $cnumber = $row[';player_contact_num';]; $email = $row[';player_email';]; $pos = $row[';player_position';]; $uname = $row[';player_username';]; $pword = $row[';player_password';];   }     if (isset($_GET[';player-id';])==$player_id&action==yes) // Check if yes was chosen to definetely delete {   $query = "DELETE * FROM playerregistration WHERE player_id = ';$player_id';"; //use player_id to retrieve the player';s information $result = mysql_query($query); $result = mysql_query($query) or die("Query failed: " . mysql_error()); if ($result) { echo "Player deleted successfully."; } else { echo "Failed to delete a player <br>"; } mysql_close($connection); } }       //Option[yes or no] to make sure that the user really wants to delete the player echo "Are you sure you want to delete $fname $sname?&nbsp&nbsp;<a href=delete.php?player_id=$player_id&action=yes>Yes |</a>&nbsp;&nbsp;<a href=list_players.php>No</a>";       echo "<div align=';center';>"; echo "<form2 method=';post'; >"; echo "<table cellpadding=';5'; bgcolor=';aqua'; border>"; //table to hold the data in the form aligned echo "<td colspan=';2';>&nbsp&nbsp&nbsp&nbspDetails of the player to be deleted:</td></tr>"; echo "<input name=';player_id'; type=';hidden'; value=';", $player_id, "';>"; echo "<tr>"; echo "<td>Name: </td>"; echo "<td><input name=';fname'; type=';text'; value=';", $fname, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Surname: </td>"; echo "<td><input name=';sname'; type=';text'; value=';", $sname, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Contact number: </td>"; echo "<td><input name=';cnumber'; type=';text'; value=';", $cnumber, "';></td></tr>";   echo "<br />";   echo "<tr>"; echo "<td>Email: </td>"; echo "<td><input name=';email'; type=';text'; value=';", $email, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Position: </td>"; echo "<td><input name=';pos'; type=';text'; value=';", $pos, "';</td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Username: </td>"; echo "<td><input name=';uname'; type=';text'; value=';", $uname, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Password: </td>"; echo "<td><input name=';pword'; type=';text'; value=';", $pword, "';></td></tr>"; echo "<br />";     echo "</table>"; echo "</form2>"; //end of the form echo "</div>";     ?>
avatar Re: DELETE and EDIT
October 16, 2013 08:46AM
DELETE -

You still have pretty much all the same errors that have been pointed out previously.

Eg:

Don't try and retrieve anything from $_GET unless you have checked that $_GET isset.

You must retrieve hidden inputs from $_POST not $_GET.

Your form has no "action" attribute nor a "Submit" button.
Why use method="post" and hidden fields in a form that you cannot submit ?

There is no need to use a form just to display information - just echo.
You only need a form if you want to get info from a user.
avatar Re: DELETE and EDIT
October 16, 2013 09:22AM
Language: PHP
if (isset($_GET[';player-id';])==$player_id&action==yes) // Check if yes was chosen to definetely delete


Should be -

Language: PHP
if (isset($_GET[';player-id';]) { $player_id = $_GET[';player_id';]; $action = $_GET[';action';];   if ( $action == "yes") { // action code; } }
Re: DELETE and EDIT
October 29, 2013 08:12PM
I can't get my edit page working perfect. It does display the player's information when first loaded BUT when i edit the info and SUBMIT it,i loose all the info on the form and on update is made.
Language: PHP
<?php session_start();   if (!(!(isset($_SESSION[';login';]) && $_SESSION[';login';] != ';';))) { header("Location: login.php"); } echo "<h1 style=';text-align: center';>Losperfontein Football Club</h1>"; echo "<div align=';right';>"; echo "<a href=';list_players.php';>| List Players |</a>"; echo "<a href=';fixtures.php';>&nbspList Fixtures |</a>"; echo "<a href=';team_selection.php';>&nbspTeam selection |</a>"; echo "</div>"; echo "<hr />";   if (isset($_POST[';Submit';])) //Checking if the submit button was clicked {   include("connect.php"); if (!$db) //Check connection { echo "Could not connect to the database."; } if (isset($_POST[';player-id';])) { $player_id = $_POST[';player_id';]; $fname = $_POST[';fname';]; $sname = $_POST[';sname';]; $cnumber = $_POST[';cnumber';]; $email = $_POST[';email';]; $pos = $_POST[';pos';]; $uname = $_POST[';uname';]; $pword = $_POST[';pword';]; //Update the table if ($player_id) { $query = "UPDATE playerregistration SET player_name = ';$fname';, player_surname = ';$sname';, player_contact_num = ';$cnumber';, player_email = ';$email';, player_position = ';$pos';, player_username = ';$uname';, player_password = ';$pword'; WHERE player_id = ';$player_id';"; $result = mysql_query($query); if ($result) { echo "Player';s information updated successfully"; //Was the data updated? } else { echo "Failed to update player';s information."; } mysql_close($connection); } }   } else { include("connect.php"); if (!$db) //Check connection { echo "Could not connect to the database."; }   //Read data from the table and present it in the form $player_id = $_GET[';player_id';];//Get the player_id from URL if ($player_id) { $query1 = "SELECT * FROM playerregistration WHERE player_id = ';$player_id';";//Read a player';s details from table based on player_id from list $result1 = mysql_query($query1) or die("Query failed: " . mysql_error()); if ($result1)//Is data returned from the query? {   while ($row = mysql_fetch_array($result1)) { //Assigning retrieved data from the table into the form $fname = $row[';player_name';]; $sname = $row[';player_surname';]; $cnumber = $row[';player_contact_num';]; $email = $row[';player_email';]; $pos = $row[';player_position';]; $uname = $row[';player_username';]; $pword = $row[';player_password';]; } echo "Please update " . $fname . " " . $sname . ';\';s'; . '; '; . "information"; //Inform the user to edit the data in the form if needed   } } }                               //form to display the player';s information to be edited echo "<div align=';center';>"; echo "<form method=';Post';>"; echo "<table cellpadding=';5'; bgcolor=';aqua'; border>"; //table to hold the data in the form aligned echo "<td colspan=';2';>&nbsp&nbsp&nbsp&nbspPlayer';s details to be edited:</td></tr>"; echo "<input name=';player_id'; type=';hidden'; value=';", $player_id, "';>"; echo "<tr>"; echo "<td>Name: </td>"; echo "<td><input name=';fname'; type=';text'; value=';", $fname, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Surname: </td>"; echo "<td><input name=';sname'; type=';text'; value=';", $sname, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Contact number: </td>"; echo "<td><input name=';cnumber'; type=';text'; value=';", $cnumber, "';></td></tr>";   echo "<br />";   echo "<tr>"; echo "<td>Email: </td>"; echo "<td><input name=';email'; type=';text'; value=';", $email, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Position: </td>"; echo "<td><input name=';pos'; type=';text'; value=';", $pos, "';</td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Username: </td>"; echo "<td><input name=';uname'; type=';text'; value=';", $uname, "';></td></tr>"; echo "<br />";   echo "<tr>"; echo "<td>Password: </td>"; echo "<td><input name=';pword '; type=';text'; value=';", $pword, "';></td></tr>"; echo "<br />";       echo "<tr >"; echo "<td align=';center'; colspan=';2';><input type=';Submit'; value=';Update';></td></tr>"; echo "</table>"; echo "</form>"; //end of the form echo "</div>"; echo "<hr>"; echo "<div align=';center';>"; echo "Created and maintained by O.B Manoko 4708-271-2"; echo "</div>";   ?>
avatar Re: DELETE and EDIT
October 29, 2013 08:33PM
You must give your Submit button a name. name='Submit'

This test will fail every time, because you do not have a $_POST element with the name 'Submit'
Language: PHP
if (isset($_POST[';Submit';])) //Checking if the submit button was clicked
Re: DELETE and EDIT
October 31, 2013 07:13PM
Thanks a lot for your assistance. My portfolio is up and running BUT i still did not get my mark for my first assignment. I uploaded my first assignment,then i had to remove it to upload my portfolio at http://www.47082712.site88.net.

As for the edit page not editing....lmao. I used a wrong name player-id instead of player_id. Important lesson,whenever you use if's make sure you always echo error message in the else part or something to follow the logic,THEN it is easier to follow on the code........
avatar
Mac
Re: DELETE and EDIT
November 01, 2013 08:05AM
There is no record of a submission via Osprey......
Sorry, only registered users may post in this forum.

Click here to login