carnot Posted December 26, 2006 Author Share Posted December 26, 2006 i think i will just kill myself... i don't freaking understand why the hell this isn't working, when there isn't a error, the submit button just doesn't work... Quote Link to comment https://forums.phpfreaks.com/topic/31840-parse-error/page/2/#findComment-147734 Share on other sites More sharing options...
ted_chou12 Posted December 26, 2006 Share Posted December 26, 2006 try this independtly, just upload it as one single page! i am gona sleep soon[attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/31840-parse-error/page/2/#findComment-147735 Share on other sites More sharing options...
carnot Posted December 26, 2006 Author Share Posted December 26, 2006 ... Quote Link to comment https://forums.phpfreaks.com/topic/31840-parse-error/page/2/#findComment-147736 Share on other sites More sharing options...
ted_chou12 Posted December 26, 2006 Share Posted December 26, 2006 still doesnt work?do you have your mysql connection made?because I dont know your username and password or sql serverthis is what you should also include:mysql_connect("localhost", "username", "password") or die(mysql_error());echo "Connected to MySQL"; Quote Link to comment https://forums.phpfreaks.com/topic/31840-parse-error/page/2/#findComment-147739 Share on other sites More sharing options...
carnot Posted December 26, 2006 Author Share Posted December 26, 2006 dude, i think u didn't understand... first i want to get information from the database... then put it into a formulary so that i can edit the form!!! so when opening the page, it updates the textarea(where i'm supposed to edit) with the info it found on the database...i had the mysql connection, but it's login root password gogetawhen i do like... http://127.0.0.1/editar.php?editar=1 IT has to get 'titulo' and 'conteudo' information from the id 1 do u understand now? Quote Link to comment https://forums.phpfreaks.com/topic/31840-parse-error/page/2/#findComment-147741 Share on other sites More sharing options...
ted_chou12 Posted December 26, 2006 Share Posted December 26, 2006 i dont care about you portuguese...dont call be dude, here ill explain:$result = mysql_query("SELECT titulo, conteudo FROM supernews WHERE ID='$id'") or die(mysql_error()); $row = mysql_fetch_array( $result );this fetchs the result in the databse you want, and it displays them in here:<input name="titulo" value="<?php echo $row['titulo']?>" type="text" size="30" maxlength="30" /><input name="conteudo" value="<?php echo $row['conteudo']?>" type="text" size="30" maxlength="30" />echo $row['titulo']echo $row['conteudo']these two are the previous value shown in the input field so the user can see what is in the database previously *before the editing,here:resultado = mysql_query("UPDATE titulo FROM supernews titulo='$titulo' WHERE ID='$id'") or die(mysql_error()); $resultado = mysql_query("UPDATE conteudo FROM supernews conteudo='$conteudo' WHERE ID='$id'") or die(mysql_error());}}these two lines write into the database, so that it gets updated, and i had tried it already, besides i dont have the database youve got, everything works perfectly, so i dont know what is the problem you are having...Ted Quote Link to comment https://forums.phpfreaks.com/topic/31840-parse-error/page/2/#findComment-147742 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.