Skip to content
Advertisement

Is it possible to use placeholders on ?

I’m currently working on at the displaying of information from a database. I was making a summary site where you can only see the important things of a table. After that i made the first element as an <input type="submit"> in a <form>, so u can click it and come to the detail site. My problem is now: The value of this input type has to be my ID, so i can query correctly on me detail site. I was wondering if it is possible to use something like a placeholder, so that the ID is the value, but on the input type is written other text.

My input:

<form method="post" action="Details.php">                                                   
    <input type="submit" placeholder = "test" name="Overview" onclick="parent.location='Details.php'" value="<?php echo $data[$i1]; ?>"> 
</form>

How it currently looks

How it currently looks

I want it that the input type still has the same value, but is displaying on the website something else like “test”.

Greetings!

Advertisement

Answer

No, but buttons can have different values and labels.

<button name="foo" value="bar">baz</button>
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement