guys i need help, how could i get the id of a button? i have this code

echo "form action = 'sec_ph_fileMain.php' method = 'post'>";
echo "<input type = 'submit' name = 'upload' value = 'Upload' id = 'hi'>";

//variable declaration
$upload = $_POST['upload'];

what i want is that, when the user clicks the upload button, it will display the id of that button.

Recommended Answers

All 2 Replies

Add a new input tag

<input type="hidden" name="id" value="hi">

thanks sir, i already got the code..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.