Jump to content

briguy9872

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

briguy9872's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=361416:date=Apr 3 2006, 07:40 PM:name=khendar)--][div class=\'quotetop\']QUOTE(khendar @ Apr 3 2006, 07:40 PM) [snapback]361416[/snapback][/div][div class=\'quotemain\'][!--quotec--] The rest is simple: Add a new column to your `pm` table which is called `trash`. Set the default value of `trash` to false - or no - or 0 When someone deletes their message, dont ACTUALLY delete it, just change the value of the `trash` field to true - or yes - or 1. [/quote] I really don't know how to do that. PLEASE WALK me through that. Here is DELPM.php [code] <body bgcolor="green"> <? error_reporting(E_ERROR);?> <?php include 'dbconnect.php'; include 'styleb.css'; session_start(); if (isset($_SESSION['user']))   {     $user=$_SESSION['user'];     $getuser="SELECT * from register where userid='$user'";     $getuser2=mysql_query($getuser) or die("Could not get user info");     $getuser3=mysql_fetch_array($getuser2);     print "<center>";     print "<table class='maintable'>";     print "<tr class='linktable'><td><center>Delete PM</td></tr>";     print "<tr class='posttable'><td>";    $user2=$_SESSION['user']; $ID = $_POST['id'];     $getyourpms="SELECT * from pm as a,register as b where a.reciever='$user' and b.userid=a.sender and subject='$ID'";     $getyourpms2=mysql_query($getyourpms) or die(mysql_error());     while($getyourpms3=mysql_fetch_array($getyourpms2))      $trash="INSERT into trash(sender,reciever,date,subject,message,status,time) value('$getyourpms3[sender]','$getyourpms3[reciever]','$getyourpms3[date]','$getyourpms3[subject]','$getyourpms3[message]','$getyourpms3[status]','$getyourpms3[time]')";        mysql_query($trash) or die("Could not put in trash can");           $delpm="DELETE FROM pm where reciever='$user' and subject='$ID'";        mysql_query($delpm) or die("Could not delete message");        print "PM deleted, back to <A href='pmbox.php'>PM Main</a>"; }     else     {        print "Are you sure you want to delete this PM?<br>";        print "<form action='delpm.php' method='post'>";        print "<input type='submit' name='submit' value='delete'></form>";      }       print "</td></tr></table>";           print "<font size='1'>Script Produced by <A href='http://www.tfws.dynu.com'>TFWS Scripts</a></font>";         ?> [/code] Now.. What do I put in mysql database. I assume that in table pm i put a field trash. Ok.. so i did. what are the values I should put. what is the default. after that, what should i change in delpm.php??? PLEASE PLEASE HELP!!!!! PLEEAAAASE!
  2. [!--quoteo(post=361416:date=Apr 3 2006, 07:40 PM:name=khendar)--][div class=\'quotetop\']QUOTE(khendar @ Apr 3 2006, 07:40 PM) [snapback]361416[/snapback][/div][div class=\'quotemain\'][!--quotec--] The rest is simple: Add a new column to your `pm` table which is called `trash`. Set the default value of `trash` to false - or no - or 0 When someone deletes their message, dont ACTUALLY delete it, just change the value of the `trash` field to true - or yes - or 1. [/quote] I really don't know how to do that. PLEASE WALK me through that. Here is DELPM.php [code] <body bgcolor="green"> <? error_reporting(E_ERROR);?> <?php include 'dbconnect.php'; include 'styleb.css'; session_start(); if (isset($_SESSION['user']))   {     $user=$_SESSION['user'];     $getuser="SELECT * from register where userid='$user'";     $getuser2=mysql_query($getuser) or die("Could not get user info");     $getuser3=mysql_fetch_array($getuser2);     print "<center>";     print "<table class='maintable'>";     print "<tr class='linktable'><td><center>Delete PM</td></tr>";     print "<tr class='posttable'><td>";    $user2=$_SESSION['user']; $ID = $_POST['id'];     $getyourpms="SELECT * from pm as a,register as b where a.reciever='$user' and b.userid=a.sender and subject='$ID'";     $getyourpms2=mysql_query($getyourpms) or die(mysql_error());     while($getyourpms3=mysql_fetch_array($getyourpms2))      $trash="INSERT into trash(sender,reciever,date,subject,message,status,time) value('$getyourpms3[sender]','$getyourpms3[reciever]','$getyourpms3[date]','$getyourpms3[subject]','$getyourpms3[message]','$getyourpms3[status]','$getyourpms3[time]')";        mysql_query($trash) or die("Could not put in trash can");           $delpm="DELETE FROM pm where reciever='$user' and subject='$ID'";        mysql_query($delpm) or die("Could not delete message");        print "PM deleted, back to <A href='pmbox.php'>PM Main</a>"; }     else     {        print "Are you sure you want to delete this PM?<br>";        print "<form action='delpm.php' method='post'>";        print "<input type='submit' name='submit' value='delete'></form>";      }       print "</td></tr></table>";           print "<font size='1'>Script Produced by <A href='http://www.tfws.dynu.com'>TFWS Scripts</a></font>";         ?> [/code] Now.. What do I put in mysql database. I assume that in table pm i put a field trash. Ok.. so i did. what are the values I should put. what is the default. after that, what should i change in delpm.php??? PLEASE PLEASE HELP!!!!! PLEEAAAASE! thanks for that much info so for though.
  3. [!--quoteo(post=361387:date=Apr 3 2006, 06:05 PM:name=ToonMariner)--][div class=\'quotetop\']QUOTE(ToonMariner @ Apr 3 2006, 06:05 PM) [snapback]361387[/snapback][/div][div class=\'quotemain\'][!--quotec--] All the cases where you use $var, $var2 $var3 etc etc. just use $var each time - help teh server out a little bit. [/quote] Well, that is becuase it will NOT work that way. they way that it was designed with not allow that to work. trust me. And i have NO idea how to do the 2nd part you said.
  4. hey i have a user log in system with mail. now, it all works, however, the thing that doesn't seem to work is the actually DELETING the messages into the trash can. but sending works fine. here is the code for delpm.php. please tell me if im doing something wrong!!! THANKS IN ADVANCE [code] <? session_start(); ?> <? error_reporting(E_ERROR);?> <?php include 'dbconnect.php'; include 'styleb.css'; if (isset($_SESSION['user']))   {     $user=$_SESSION['user'];     $getuser="SELECT * from register where userid='$user'";     $getuser2=mysql_query($getuser) or die("Could not get user info");     $getuser3=mysql_fetch_array($getuser2);     print "<center>";     print "<table class='maintable'>";     print "<tr class='linktable'><td><center>Delete PM</td></tr>";     print "<tr class='posttable'><td>";    $user2=$_SESSION['user']; $ID = $_POST['id'];     $getyourpms="SELECT * from pm as a,register as b where a.reciever='$user' and b.userid=a.sender and subject='$ID'";     $getyourpms2=mysql_query($getyourpms) or die(mysql_error());     while($getyourpms3=mysql_fetch_array($getyourpms2))      $trash="INSERT into trash(sender,reciever,date,subject,message,status,time) value('$getyourpms3[sender]','$getyourpms3[reciever]','$getyourpms3[date]','$getyourpms3[subject]','$getyourpms3[message]','$getyourpms3[status]','$getyourpms3[time]')";        mysql_query($trash) or die("Could not put in trash can");           $delpm="DELETE FROM pm where reciever='$user' and subject='$ID'";        mysql_query($delpm) or die("Could not delete message");        print "PM deleted, back to <A href='pmbox.php'>PM Main</a>"; }     else     {        print "Are you sure you want to delete this PM?<br>";        print "<form action='delpm.php' method='post'>";        print "<input type='submit' name='submit' value='delete'></form>";      }       print "</td></tr></table>";               ?> [/code]
  5. [!--quoteo(post=361057:date=Apr 2 2006, 08:08 PM:name=ToonMariner)--][div class=\'quotetop\']QUOTE(ToonMariner @ Apr 2 2006, 08:08 PM) [snapback]361057[/snapback][/div][div class=\'quotemain\'][!--quotec--] Anything that sends headers MUST come BEFORE ANY output! session_start(); is often simply placed at the very top of the file as you can set it and forget it!. Unless you are using outout buffering for caching then NO output should come before ANYTHING that has to send headers. [/quote] Thank you. i will try that
  6. sry to bother, but i need help again!!! [code] <style type="text/css"> body {background:}</style> <style> body,td,font,div,p{font-family:tahoma; font-size:10pt; color: #336699; line-height:8pt} b{font-family:tahoma; font-size:10pt; color: #0066FF; font-weight:bold} a:link, a:active,a:visited {font-family:tahoma; font-size:10pt; color: #0066FF; text-decoration:none} a:hover {font-family:tahoma; font-size:10pt; color: #0066CC; text-decoration:none} input,textarea {font-family:tahoma; font-size:10pt; color: #0066CC; background-color: 0099FF; border: solid 1px} body{scrollbar-face-color:#0066CC; scrollbar-shadow-color:#006699; scrollbar-highlight-color:#009900; scrollbar-3dlight-color:white; scrollbar-darkshadow-color:black; scrollbar-track-color: #0066CC; scrollbar-arrow-color: BLACK} </style><center> UNDER CONSTRUCTION!!! PLEASE PLEASE PLEASE WAIT!!!!! But for now.......<br><br> <?php include 'dbconnect.php'; session_start(); ?> <? if (isset($_SESSION['user']))   {     $user = $_SESSION['user'];     $getuser = "SELECT * from register where userid='$user'";     $getuser2 = mysql_query($getuser) or die("Could not get user info");     $getuser3 = mysql_fetch_array($getuser2); print "<BR>Welcome, $_SESSION[user], you may now access <a href='http://www.tbanskorner.com/mail'>mail! Click<a href=http://www.tbanskorner.com/logout.php> Here</a>To Logout.";    } else { print 'You are not logged in. Please <a href="http://www.tbanskorner.com/login.php">Log in</a>'; print ' Or <a href="http://www.tbanskorner.com/mail/register.php">Register</a>'; } ?> <P><a href="http://www.tbanskorner.com/mail/login.php">Click here to Login</a> <br><a href="http://www.tbanskorner.com/mail/register.php">Not a member? Click here to register for FREE</a> <br><a href="http://tbanskorner.com/mail/">Click here to access mail.</a><br> If you would like FREE mail to send to others on the site, click <a href="http://www.tbanskorner.com/mail/register.php"><b>here</b></a> [/code] i get back the error: Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/t/b/a/tbanskorner/html/index2.php:1) in /home/content/t/b/a/tbanskorner/html/index2.php on line 35 Thanks in advance ahhhh yes. i forgot to mention that it worked, however, the error came out. it said what i wanted it to say, but the error cam with it. I tried removing the session_start(); tag but it was fruitless.
  7. hey. im relatively new at php. I have a file called: forindex.php(which will eventually be merged with index.php) here is the code [code] <? include 'dbconnect.php'; session_start(); ?> <? if (isset($_SESSION['user']))   {     $user = $_SESSION['user'];     $getuser = "SELECT * from register where userid='$user'";     $getuser2 = mysql_query($getuser) or die("Could not get user info");     $getuser3 = mysql_fetch_array($getuser2); print "Welcome, $_SESSION[user]";    } else { print "Please <a href="http://www.tbanskorner.com/mail/login.php">Log in</a>"; print "Or<a href="http://www.tbanskorner.com/mail/register.php>Register</a>"; } ?> [/code] What comes back is a parse error saying: Parse error: parse error, unexpected T_STRING in /home/content/t/b/a/tbanskorner/html/forindex.php on line 19. PLEASE HELP!!!! Thanks in advance.
  8. hello!!! IM ONLY 13. i have a life and great grades. lol. well ill try hostscripts, and w3schools, but if anyone has any more ideas please share them! thanks
  9. hi im new. i don't know much about php, or mysql. i tried multiple scripts and none seem to work to the standards i need. i have a site(its temporarily down for a few days) that is supported by php and i have mysql. First off, i need a good login script. none of the ones on this site or any i have seen so far seem to work. i want the users to have profiles and stats. If anyone is familiar with neopets.com, then they will know that they have "neomail" in which you can send other users a message, through web, without actual email. i would like to know if there is a good script out there that can do this. i can't seem to figur out how neopets does it. if you have any suggestions or codes, please reply!!! THANKS IN ADVANCED LOL :) PLEASE HELP!
  10. hi im new. i don't know much about php, or mysql. i tried multiple scripts and none seem to work to the standards i need. i have a site(its temporarily down for a few days) that is supported by php and i have mysql. First off, i need a good login script. none of the ones on this site or any i have seen so far seem to work.[u] i want the users to have profiles and stats[/u]. If anyone is familiar with neopets.com, then they will know that they have "neomail" in which you can send other users a message, through web, without actual email. i would like to know if there is a good script out there that can do this. i can't seem to figur out how neopets does it. if you have any suggestions or codes, please reply!!! THANKS IN ADVANCED LOL :) PLEASE HELP!
×
×
  • 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.