රිප්ලයි නැති නිසා තව ත්‍රෙඩ් එකක් දැම්ම - HTML PHP

AnuradhaRa

Well-known member
  • දැං සීන් එක මෙහෙමයි
    දැනටමත් මම index.html ෆයිල් එකට මේ කෝඩ් එක ගහල ඩේට බේස් එකට ඇඩ් කරල තියෙන්නෙ
    <form action="pass_data.php" method="POST">

    මේක දාන්නෙ එතකොට කොහෙටද :lol: <form action="welcome.php" method="post">
    https://www.w3schools.com/php/php_forms.asp
     
    • Like
    Reactions: NRTG

    hichchiputha

    Well-known member
  • Jan 3, 2018
    39,989
    35,925
    113
    වොන්ඩර් ලැන්ඩ්
    දැං සීන් එක මෙහෙමයි
    දැනටමත් මම index.html ෆයිල් එකට මේ කෝඩ් එක ගහල ඩේට බේස් එකට ඇඩ් කරල තියෙන්නෙ
    <form action="pass_data.php" method="POST">

    මේක දාන්නෙ එතකොට කොහෙටද :lol: <form action="welcome.php" method="post">
    https://www.w3schools.com/php/php_forms.asp

    html hoya gatta pakayata kana palenna gahanna tiyenne uta thibuna oka easy widiyakata karanna
     
    • Haha
    Reactions: AnuradhaRa

    uditha88

    Junior member
  • Jul 23, 2010
    61
    71
    18
    Either use pass_data.php or welcome.php to read form data.
    not both.
    Inside either of above, you can just read data or
    you use pass_data to read data, then show a link to welcome.php inside that

    therunaada danne naha?


    <form action="pass_data.php" method="POST">

    pass_data.php =

    <?php
    if($login==1){
    <a href="/welcome.php">
    }
    ?>


    OR

    pass_data.php =
    include("welcome.php");
     
    • Like
    Reactions: AnuradhaRa

    AnuradhaRa

    Well-known member
  • Either use pass_data.php or welcome.php to read form data.
    not both.
    Inside either of above, you can just read data or
    you use pass_data to read data, then show a link to welcome.php inside that

    therunaada danne naha?


    <form action="pass_data.php" method="POST">

    pass_data.php =

    <?php
    if($login==1){
    <a href="/welcome.php">
    }
    ?>


    OR

    pass_data.php =
    include("welcome.php");
    දෙකම එකට දාපුහම වැඩ නෑ තමා
     

    Walter Hartwell White

    Well-known member
  • Sep 30, 2020
    2,621
    8,683
    113
    67
    Albuquerque, New Mexico
    <form action="welcome.php" method="post"> <=මේක දාන තැන ද අහන්නේ? මේක කොහොමත් තියෙන්නේ form එකේ. ෆෝම් ටැග් එක ඇතුළේ නේ? දැන් form ඇතුළේ තියෙන හැම ෆෝම් අයිටම්ටැග් එකකටම නේම් එකක් අනිවාර්යයි. එහෙම නේම් එකක් නැත්නම් ඒ අයිටම් පොස්ට් මෙතඩ් එකෙන් අප්ලෝඩ් කරන්න බෑ. ඩේටාබේස් එකට ඉන්සර්ට් වෙන්නෙත් නෑ.
     
    • Like
    Reactions: NRTG and AnuradhaRa

    AnuradhaRa

    Well-known member
  • හරි දැං මට කියපල්ල

    echo $_POST["name"];

    මේකට තව වචනයක් හරි වාක්‍යයක් හරි ඇඩ් කරන්නෙ කොහොමද කියල

    echo "Thank you" $_POST["name"];

    වගේ ගැහුවොත් වැඩ කරන්නෙ නෑනෙ

    https://www.w3schools.com/php/phptryit.asp?filename=tryphp_func_string_echo5 (y)
    ------ Post added on Dec 1, 2021 at 7:10 PM
     
    • Like
    Reactions: NRTG

    geeko

    Well-known member
  • Mar 18, 2013
    7,482
    4,484
    113
    හරි දැං මට කියපල්ල

    echo $_POST["name"];

    මේකට තව වචනයක් හරි වාක්‍යයක් හරි ඇඩ් කරන්නෙ කොහොමද කියල

    echo "Thank you" $_POST["name"];

    වගේ ගැහුවොත් වැඩ කරන්නෙ නෑනෙ

    https://www.w3schools.com/php/phptryit.asp?filename=tryphp_func_string_echo5 (y)
    ------ Post added on Dec 1, 2021 at 7:10 PM
    <?php echo "Thank you ". $_POST["name"]; ?>
     

    Lakshan-Seram

    Well-known member
  • May 31, 2011
    24,751
    12,688
    113
    127.0.0.1:8080/Kandy
    ubata one ekama file ekakata forms dekak send karannada?


    ehema puluwan ban


    form eka asse
    HTML:
    <input type="hidden" name="form" value="form1">
    HTML:
    <input type="hidden" name="form" value="form2">

    wage set karapan.

    itapasse PHP walin

    ekama file eke.

    PHP:
    $form = isset( $_REQUEST['form'] ) ? $_REQUEST['form'] : 'form1';
    if( $form == 'form2' )
        /** Form 2 handles here */
    else
        /** Form 1 handles here */

    ohoma one magulak karaganin.
     
    • Like
    Reactions: AnuradhaRa

    AnuradhaRa

    Well-known member
  • ubata one ekama file ekakata forms dekak send karannada?


    ehema puluwan ban


    form eka asse
    HTML:
    <input type="hidden" name="form" value="form1">
    HTML:
    <input type="hidden" name="form" value="form2">

    wage set karapan.

    itapasse PHP walin

    ekama file eke.

    PHP:
    $form = isset( $_REQUEST['form'] ) ? $_REQUEST['form'] : 'form1';
    if( $form == 'form2' )
        /** Form 2 handles here */
    else
        /** Form 1 handles here */

    ohoma one magulak karaganin.
    මට ඕන මචං ෆෝම් එකේ තොරතුරු ඩේට්බේස් එකට යන ගමං
    යූසර්ටත් ඇතුලත් කරපු පේන විදියට වෙබ් පිටුවක් ඕපන් වෙන්න
     

    Lakshan-Seram

    Well-known member
  • May 31, 2011
    24,751
    12,688
    113
    127.0.0.1:8080/Kandy
    Ehemath nettam
    PHP:
    <form action="file.php?form=form1">
    PHP:
    <form action="file.php?form=form2">

    PHP:
    $form = isset( $_REQUEST['form'] ) ? $_REQUEST['form'] : 'form1';
    if( $form == 'form2' )
        /** Form 2 handles here */
    else
        /** Form 1 handles here */
     
    • Like
    Reactions: AnuradhaRa