Help needed with a simple form code , change it to a button..

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help needed with a simple form code , change it to a button..

    I want help in the following code.
    I wanna chnage the following script into a single button , which sends the vale "5".
    PHP Code:
    print '<form action="file.php?file='.$file.'&amp;sort='.$sort.'&amp;p='.$p.'" method="post">
    <div>
    <select name="rating">
    <option value="5">5</option>
    <option value="4">4</option>
    <option value="3">3</option>
    <option value="2">2</option>
    <option value="1">1</option>
    </select><br/>
    <input type="submit" value="Rate"/>
    </div>
    </form>'

    I don't want the dropdown menu , just want a single rate button , which will post vale "5" only.
    Thanks in advance.

    #2
    PHP Code:
    print '<form action="file.php?file='.$file.'&amp;sort='.$sort.'&amp;p='.$p.'" method="post"> 
    <div> 
    <input type="hidden" name="rating" value="5"/><br/>
    <input type="submit" value="Rate"/> 
    </div> 
    </form>'
    ;

    // Or:

    print '<form action="file.php?file='.$file.'&amp;sort='.$sort.'&amp;p='.$p.'" method="post"> 
    <div> 
    <input type="text" name="rating" value="5"/><br/>
    <input type="submit" value="Rate"/> 
    </div> 
    </form>'
    ;

    // Or:

    print '<form action="file.php?file='.$file.'&amp;sort='.$sort.'&amp;p='.$p.'" method="post"> 
    <div> 
    <input type="radio" name="rating" value="5"/>5<br/>
    <input type="submit" value="Rate"/> 
    </div> 
    </form>'

    <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

    Comment

    Working...
    X