Jump to content
php.lv forumi

No 'submit' uz mainīgo. [Jau atradu]


x000x01

Recommended Posts

Man ir editbox ar nosaukumu "firstname" un poga ar nosaukumu "startcalc".

 

Kā lai es izdaru tā, ka pēc pogas nospiešanas tas, kas ir iekš "firstname" tiek piešķirts kādam mainīgajam, piemēram $firstname.

 

<INPUT type="text" name="firstname"><BR>
<INPUT type="submit" value="Calculate" name="startcalc">
<?php
/* TODO: Add code here */
?>

 

 

Jau atradu.

 

<html>
<form action="index.php" method="post">
<INPUT type="text" name="firstname" align="center"><BR>
<INPUT type="submit" value="Calculate" name="startcalc" align="center">
</form>
</html>


<?php
/* TODO: Add code here */
echo("Welcome, " . $_POST["firstname"]);
?>

Edited by x000x01
Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...