0

Hello Guys,
So im a student at 12 grade and im trying to build a website from scratch and i've been successfull until now, i've been stuck in this error for 2 or 3 days, i cant send the text area + other input to database at the same type and when i do it goes in separate ways example in 1st print.

            <textarea name="txtDesc" row = "50" cols = "50" id="txtDesc"></textarea>
            <?php
            if(isset($_POST['formSubmit']))
            {
            $con = mysql_connect ('localhost','usename','password') or die(mysql_error()); 
            mysql_select_db('database') or die(mysql_error());
            $desc = ($_POST['txtDesc']);
            $sql = "INSERT INTO registo_anomalias (`desc`)"."VALUES('$desc')";
            $result = mysql_query($sql) or die(mysql_error());
            }
            ?>
            <button type="submit" value="submit" class="button-submit button-block-submit" name="formSubmit"/>Submeter</button>
Attachments Print1.png 9.41 KB
2
Contributors
1
Reply
8
Views
3 Months
Discussion Span
Last Post by benanamen
0

You first need to start with code that is not dangerous and obsolete and removed from Php. Start with this tutorial
Click Here

Where ever you are learning that code from, toss it!

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.