Jump to content

HTML > PHP > MySql


petenetman

Recommended Posts

Hi thanks for the reply.

 

I can't seem to get the html file to post the variable to the PHP. I put together some simple code and still didn't  :confused:

 

<html>

<head>

<title>Data Survey</title>

</head>

 

<body>

 

 

<form id="form1" name="html" method="post" action="SurveyAdd.php">

  Clock No:

  <label>

  <input name="Clock" type="text" />

  </label>

  <p> Group:

    <input name="group" type="text"  />

  </p>

  <p>

    <input type="submit" name="Submit" value="Submit" />

    <input type="reset" name="Submit2" value="Reset" />

  </p>

</form>

</body>

</html>

 

<html>

<head>

<Title>Post page</title>

</head>

 

<body>

 

<?php

 

$Clock = $_POST['Clock'];

$group = $_POST['group'];

 

?>

 

<table border=0 cellspacing=0 cellpadding=3>

<tr><td>

Your Staff No:

<td>

<?=$Clock?>

<tr><td>

Your Task Group:

<td>

<?=$group?>

<tr><td>

 

</body>

</html>

Link to comment
https://forums.phpfreaks.com/topic/208656-html-php-mysql/#findComment-1090168
Share on other sites

Have a look at the html page source after submitting the form. See if the <?=$Clock?> and <?=group?> tags are showing up in it. You need to get rid of the quick-echo syntax, and use full tags anyhow. It will cause you headaches in the future.

 

<?php echo $Clock; ?>

Link to comment
https://forums.phpfreaks.com/topic/208656-html-php-mysql/#findComment-1090174
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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