Jump to content

flexybash

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

flexybash's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, Thanks for all the responses, i do have mamp, i do know what phpmyadmin is etc, But i have seen there is a way you make a textfile a database and you can just change the content from the .txt i want to do this because its a easier way to manage a website, just open up the .txt and change the content instead of having to go to phpmyadmin etc
  2. hello guys i heard there is a way that you can make something like a database on a text editor and when ever u want to change the info you just open a text editor and change the information How is this called? where can i find a tutorial? any tips? thanks you very much
  3. flexybash

    Fail

    mmmmmm....... LOL note:its a very helpfull site
  4. My bad i never knew there was a css section,feel free to move ,sorry
  5. Hello Guys well i was making my website and i realise some backgrounds dont show up on firefox ill leave My HTML and CSS codes, dont worry i just started so it is not so large! HTML <head > <link rel="stylesheet" href="style.css" type="text/css"/> </head> <body> <div id="body_t"> <div id="navigator"></div><!--end navigator--> </div><!--end body_t--> <div id="body_b"> <div id="leftnav"> <div id="leftnav_t"></div> <div id="leftnav_l"></div> <div id="menuleft"> <ul> <li id="inicio"></li> <li id="registrarse"></li> <li id="como_c"></li> <li id="arma_p"></li> <li id="reglas"></li> <li id="foro"></li> <li id="reportar_b"></li> </ul> </div><!--end menuleft--> <div id="leftnav_r"></div> <div id="leftnav_b"></div> </div> <div id="container"></div> </div><!--end body_b--> </body> CSS body{margin: 0;overflow-x: hidden;overflow-y: scroll} #body_t{ width: 1816px ; height: 354px; background: url(images/skycastle_bg_t.jpg) no-repeat;margin: 0;padding: 0} #body_b{width: 1815px ; height: 776px; background: url(images/skycastle_bg_b.jpg) no-repeat;margin: 0;padding: 0} #navigator{width: 1115px ;height: 162;background: url(images/navigation_bg_service.png) no-repeat;margin: 0;padding: 0} #leftnav{float: left; width: 266px;height: 776px;margin: 0px 150px 0px 120px;background: url('images/content_bg.jpg') center top} #leftnav_t{height: 17px; width:266px;float: left;background: url(images/menu_tapa.png) no-repeat} #leftnav_l{height: 736px; width:17px;float: left;background: url(images/menu_sides.png) repeat-y center} #leftnav_r{height: 736px; width:20px;float: right;background: url(images/menu_sides.png) repeat-y center} #leftnav_b{height: 17px; width:266px;clear: left;background: url(images/menu_tapa.png) repeat-y center} #menuleft{height: 736px;width: 229px;margin: 0;padding: 0;float: left} #menuleft ul{margin: 0;padding: 0;list-style-type: none} #menuleft li{height: 40px;width: 170px;margin: 10px 0px 0px 25px;padding: 0} #menuleft a{margin:0;padding:10px 10px 10px 10px} #inicio{background: url(images/menuleft_inicio.png) no-repeat} #inicio:hover{background: url(images/menuleft_inicio_h.png) no-repeat} #registrarse{background: url(images/menuleft_registrarse.png) no-repeat} #registrarse:hover{background: url(images/menuleft_registrarse_h.png) no-repeat} #como_c{background: url(images/menuleft_c.png) no-repeat} #como_c:hover{background: url(images/menuleft_c_h.png) no-repeat} #container{ float: left; width: 600px;height: 776px} [attachment deleted by admin]
  6. Thank you very much dragon u solved my problem i will study this code!
  7. Okey so i made a table that you put your name,author,and message when you submit it , it echoes a table with the name,author and message written (and it also echoes a delete buttom,so delete this post oif necessary) im new to php and i have been with this problem for a couple of weeks so i guess its time to ask for some help the problem is that i dunnot know how to make my delete buttom work! i tried if statement but it dosent work i also tried ternary operation and dint work :S i read that there is something like $post[iD](and this is supposed to get the ID of the post submmited, and delete it) im not sure, im so confused! help! XD this is the code <?php $tittle=$_POST['tittle']; $author=$_POST['author']; $message=$_POST['message']; if ($_POST['submitnews']){ $currentdate= date("y-m-d"); $currenttime=date("H:i:s",strtotime("-6 hours")); $post=mysql_query("INSERT INTO news VALUES('','$tittle','$author','$message','$currentdate','$currenttime')"); echo"Posted!"; } $select=mysql_query("SELECT * FROM news ORDER BY id DESC"); while ($row= mysql_fetch_assoc($select)) { $id=$row['id']; $tittle=$row['tittle']; $author=$row['author']; $message=$row['message']; $date=$row['date']; $time=$row['time']; if ($_SESSION['admin']) { echo " <table width='488px' id='news_table'> <tr> <td> </td> <td> <center><font size='5'>$tittle</font></center><br> </td> </tr> <tr> <td> </td> <td> $message </td> </tr> <tr> <td> </td> <td> <font size='1'>Posted By:<font color='green'>$author</font> on <font color='gray'>$date</font> at <font color='gray'>$time</font></font> <input name='delete' type='submit' value='delete'> <td> </td> </tr><br><br> </table>";
  8. thanks rifts but i cant do that in some cases because i have to have php tags, ill just pass you the entire code , i hope u have time to give it a fast check thanks! <?php $tittle=$_POST['tittle']; $author=$_POST['author']; $message=$_POST['message']; if ($_POST['submitnews']){ $currentdate= date("y-m-d"); $currenttime=date("H:i:s",strtotime("-6 hours")); $post=mysql_query("INSERT INTO news VALUES('','$tittle','$author','$message','$currentdate','$currenttime')"); echo"Posted!"; } $select=mysql_query("SELECT * FROM news ORDER BY id DESC"); while ($row= mysql_fetch_assoc($select)) { $id=$row['id']; $tittle=$row['tittle']; $author=$row['author']; $message=$row['message']; $date=$row['date']; $time=$row['time']; if ($_SESSION['admin']) { echo " <table width='528px'> <tr> <td> </td> <td> <center><font size='5'>$tittle</font></center><br> </td> </tr> <tr> <td> </td> <td> $message </td> </tr> <tr> <td> </td> <td> <font size='1'>Posted By:<font color='green'>$author</font> on <font color='gray'>$date</font> at <font color='gray'>$time</font></font> <input id='delete' name='delete' type='submit' value='Delete' > <td> </td> </tr><br><br> </table> "; //this is what i want to do // echo a table and a delete button // and if you click on the delete button it echoes out "DELETED" } } ?>
  9. Ill explain again Okey i echoed out a table and at the end of the table i echoed a delete button and when i click on that delete button, its supposed to echo "DELETED" this is how i have the code at the moment with modifications made echo " <table width='528px'> <tr> <td> </td> <td> <center><font size='5'>$tittle</font></center><br> </td> </tr> <tr> <td> </td> <td> $message </td> </tr> <tr> <td> </td> <td> <font size='1'>Posted By:<font color='green'>$author</font> on <font color='gray'>$date</font> at <font color='gray'>$time</font></font> <input id='delete' name='delete' type='submit' value='Delete' > "; if(isset($_POST['delete'])) {echo("DELETED";} echo " <td> </td> </tr><br><br> </table> ";
  10. Thanks for the quick replies @Ken i tried breaking the echo´s up like you just did, but it still is not working :S @Rifts , i think the line of code giving a problem here its if ($_POST['delete']) { echo "DELETED"; } that is why i am asking if its possible to write an if inside an echo EDIT: i just tho its not working because this line is inside the echo (1) <input id='delete' name='delete' type='submit' value='Delete' > and this like its outside the echo (2) if ($_POST['delete']) { echo "DELETED"; } and since they are related(line 2 asks line 1) maybe thats why they dont work? (just an idea) XD
  11. Hello guys im new to php i been coding for like a week now, i need some help here i have been stuck for like 6 hours XD,is it possible to write an IF Statement inside an echo? //this is what i want to do // echo a table and a delete button // and if you click on the delete button it echoes out "DELETED" echo " <table width='528px'> <tr> <td> </td> <td> <center><font size='5'>$tittle</font></center><br> </td> </tr> <tr> <td> </td> <td> $message </td> </tr> <tr> <td> </td> <td> <font size='1'>Posted By:<font color='green'>$author</font> on <font color='gray'>$date</font> at <font color='gray'>$time</font></font> <input id='delete' name='delete' type='submit' value='Delete' > if ($_POST['delete']) { echo "DELETED"; } <td> </td> </tr><br><br> </table> ";
×
×
  • 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.