Jump to content

php form that displays data or another form


bigmark

Recommended Posts

Can anyone tell me if this is possible. I need a form that has fields-username,password,comp_name and round.

then i need the results to show in grid, however if the user has not input results for that round before then the grid shows a drop down list and submit button.

What the user does is choose 1 of 2 teams to win from a drop down list of names in the database, there are 8 games per round(16 teams).

So when a user inputs their username,password and round number, it displays the grid for that round with the teams picked, but if they havent picked teams for that round then they choose from drop down lists.

All the back end mysql is already done but i need some help desperately as the football season is starting in 2 weeks and i cant figure out how to do it. The form needs to go in a tabbed panel and i would like the results php_self or if not possible to open up a new window so when they close the pop up window they session out. I am willing to pay anyone who can help if that is whats required.

Link to comment
Share on other sites

it is possible, also if you are willing to pay people to do it for you, then you should have post it in

 

http://www.phpfreaks.com/forums/index.php/board,8.0.html

 

 

<form action="" method="post" enctype="application/x-www-form-urlencoded">
<table>
<tr>
    <td><label for="username">Username</label>:</td>
    <td><input type="text" id="username" name="username" /></td>
</tr>
<tr>
    <td><label for="password">Password</label>:</td>
    <td><input type="text" id="password" name="password" /></td>
</tr>
<tr>
    <td><label for="comp_name">Competition name</label>:</td>
    <td><select id="comp_name" name="comp_name">
        <option value="comp_one">First competition</option>
        <option value="comp_two">Second Competition</option>
    </select></td>
</tr>
<tr>
    <td><label for="round">Round</label>:</td>
    <td><input type="text" id="round" name="round" /></td>
</tr>
<tr>
    <td colspan="2"><input type="submit" id="submit" name="submit" /></td>
</tr>
</table>
</form>

 

<?php

if ($_SERVER['REQUEST_METHOD'] == 'POST') {
   if (!empty($_POST['username']) && !empty($_POST['password'])) {
      // do something, login or so
      // get result or something
   }

    // if no input results (whatever that may be), then show dropdown and submit button
}

?>

Link to comment
Share on other sites

Thanks thats a start, i was looking at that forum for paid work but it looks like there are 100 postings for 1 reply so i didnt bother.

 

if you are interested in my project let me know, i have half the script made but need a login with editable grid, with the editable regions under a certain condition.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.