Jump to content

lazy-man

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by lazy-man

  1. all right, here is it <?$con = mysql_connect("you will","not get","my password"); // :Dmysql_select_db("database", $con);$podaci = mysql_query("SELECT * FROM pisoar WHERE autor='mama'") or die(mysql_error());while ($mama = mysql_fetch_array( $podaci )) { ?><ul><li><? echo $osoba['biser']; ?></li></ul> <?}?><textarea rows="10" cols="10" name="biser"></textarea><?$biser = $_POST['biser'];$data = mysql_real_escape_string($biser);mysql_query("INSERT INTO pisoar (id, autor, biser) VALUES ('', 'mama', '$biser');") or die (mysql_error());mysql_query("DELETE FROM pisoar WHERE biser=''") or die (mysql_error()); // this is because every time when webpage reload, empty data sneds to my database?> I have database with table 'pisoar' with columns 'id', 'autor', 'biser' (it is on my mother tongue, if it is weird to you :D )So, this is not a big problem, every1 of you is more xp in this, because, I am just a teenager, but unlike my teens, I don't play computer games or wasting time on fb, but learning this, this is my first webpage, I relly want to learn

  2. thank you, it works, no errors. But there is no button for sending data to database, just textarea. If I put it to form , when user press submit button, data is not sending to database, but it is opening new tab with text like 'not found' or similar. Can anyone help me with this, I would be grateful, if it means anything to you :D

  3. hello everyone!I am new on this forum, I guess chose right topic for my question.it is about php and mysql databaseI have database with table 'pisoar' with columns 'id', 'autor', 'biser' (it is on my mother tongue, if it is weird to you :D ) here is a code, so, can anyone detect error please. It is in <html><body><div> tag after connecting and selecting database <textarea rows="10" cols="10" name="biser"></textarea><?php$biser = $_POST['biser'];$data = mysql_real_escape_string[$biser]; // my output is that there is unexpected '[' here, but I don't think somysql_query("INSERT INTO pisoar (id, autor, biser) VALUES ('', 'mama', '$biser');") or die (mysql_error()); // id is auto_increment?> So, here is what I want to do.when user write something in textarea, it will be data for sending to a database Thanks

×
×
  • Create New...