Jump to content

str0kes

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by str0kes

  1. Hello guys, I have problem with the script i was coding. This is a simple news script. I am not able to add information to the database. I don't know what Im doing wrong. Here is my php code: <?php if (isset($_POST['submit'])) { $title=$_POST['title']; $small_text =$_POST['small_text']; $full_text=$_POST['full_text']; include("connectmysql.php"); mysql_query("insert into main (id,title,small_text,full_text) values('$id','$title','$small_text','$full_text')"); } ?> here is html: <FORM name="forma2" action="?" method="post" enctype="multipart/form-data"> <TABLE> <TR> <TD>Title</TD> <TD> <input type="text" size="70" name="title"> </TD> </TR> <TR> <TD>small text</TD> <TD> <input type="text" size="80" name="small_text"> </TD> </TR> <TR> <TD>full text</TD> <TD> <textarea cols="60" rows="12" name="full_text"></textarea> </TD> </TR> <TR> <TD>picture</TD> <TD><input type="file" name="picture"></TD> </TR> <TR> <TD>picture</TD> <TD><input type="file" name="picture2"></TD> </TR> <TR> <TD>picture</TD> <TD><input type="file" name="picture3"></TD> </TR> <TR> <TD>picture</TD> <TD><input type="file" name="picture4"></TD> </TR> <TR> <TD>picture</TD> <TD><input type="file" name="picture5"></TD> </TR> <TR> <TD>picture</TD> <TD><input type="file" name="picture6"></TD> </TR> <TR> <TD></TD> <TD><input type="submit" value="submit"></TD> </TR> </TABLE> </form> I tried to use $id=Time("U"); and then i used $id=$_POST[id] but didn't get it working. Any help please? Thanks in advance
  2. Hello guys, thanks for viewing my first post here. I am new on php, started to learn it. Well, I am looking for simple news script. All I found till now are a bit complex for me. I need to understand first how this script work. All I need is for example: Todays news 1. News one - 08/07/2012 2. News two - 08/07/2012 Old news 1. news one - 07/07/2012 2. news two - 06/07/2012 Well, the script which automatically moves news to the archive (old news table on database) at the end of the day. I would like to fin such script and with comments, to understand how the things are working. Thanks in advance
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.