Jump to content

Recommended Posts

Dear People,

 

This is funny!

 

Mouse click on "submit" works, but not when I put an entry and push "Enter" on via the keyboard. (But we can't stop user right)

 

Can you help me, stick this on your pc and try!

 

 

(Test.php)

 

 

<?php
ob_start();
?>
<head>
</head>
<body>
<?PHP

$NumberOfTxtBoxes=1;
$NumberOfTxtBoxesMustBeFilled=1;

//Transfer Data from Screen to Memory
if (isset($_POST['Submit'])) 
{
for ($i=1; $i<=$NumberOfTxtBoxes; $i++)
{
	$InputFromScreen[$i]=$_POST["Txt".$i];
}
}
else
{
for ($i=1; $i<=$NumberOfTxtBoxes; $i++)
{
	$InputFromScreen[$i]="";
}
}
?>
<form id="form1" name="form1" method="post" action="Test.php">
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td><table width="765" border="0" align="center" cellpadding="5" cellspacing="0">
        <tr>
          <td> </td>
        </tr>
        <tr>
          <td><table width="755" border="0" cellpadding="5" cellspacing="0">
            <tr>
              <td> </td>
            </tr>
            <tr>
              <td width="745"><table width="745" border="0" cellpadding="5" cellspacing="0">
                <tr>
                  <td width="170" class="FieldName">ID Number</td>
                  <td width="555" class="FieldName"><input name="Txt1" type="text" class="FieldValue" id="Txt1" value="<?PHP echo $InputFromScreen[1]; ?>" size="13" maxlength="12"/></td>
                </tr>
                <tr>
                  <td class="FieldName"> </td>
                  <td class="PHPRunTime"><?PHP
$TxtBoxesNotFullyFilled=0;
for ($i=1; $i<=$NumberOfTxtBoxesMustBeFilled; $i++)
{
if ($InputFromScreen[$i]=="")
{
	$TxtBoxesNotFullyFilled=1;
	break;	
}
}	
if ($TxtBoxesNotFullyFilled==1)
{
echo "Field Should be Filled!";
}
else
{
if ($InputFromScreen[1]==1)
{
	echo "You typed 1";
}
else
{
	echo "You DID NOT typed 1";
}
}					
?>                  </td>
                </tr>
                <tr>
                  <td class="FieldName"> </td>
                  <td class="FieldValue"><input name="Submit" type="submit" id="Submit" value="Submit" /></td>
                </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td> </td>
        </tr>
      </table>
      </td>
    </tr>
  </table>
</form>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/72549-solved-help-me-with-submit/
Share on other sites

MadTechie,

 

I confirm it is with IE, because OPRA and FIREFOX is doing OK.

 

You suggestion (1) did not work yet. Can we do a some twitching?

 

Surprise, when I hav two or more inputs it is fine with IE but one input I have this problem, I can't control users.

 

help

 

 

YES

 

"

 

if (isset($_POST))

 

"

works! ;D

 

I only have one button for all single input pages, but I do have two button pages as well, but incidently, each button addresses a few dedicated inputs each.

 

Will I have new problem by implanting your solution?

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.