Jump to content

PM System


Cetanu

Recommended Posts

yeah that can be pretty annoying that session_start();

try doing a switch so your index file will look something like:

<?
include "includes/db.php";

session_start();

switch($_GET['action']){

case 'login':
include ('pages/login.php');
break;

case 'logout':
include ('pages/logout.php');
break;

case 'register':
include ('pages/register.php');
break;

case 'profile':
include ('pages/profile.php');
break;

case 'profilecp':
include ('pages/profilecp.php');
break;

case 'messages':
include ('pages/messages.php');
break;

case 'members':
include ('pages/members.php');
break;


default: 
include ('pages/main.php');
break;
}

?>

 

much easier I find, I have spent hours once trying to figure out why my query wouldnt work lol

 

and if everything if fixed "topic solved" on the left bottom, click it.

 

oh and also, if you want to switch hosting company's.. I find freehostia works wonders, check em out.

Link to comment
Share on other sites

I don't think switching hosts would be good, since I've already advertised the Freezoka site all over.

 

What does the switch do?!! It looks so strange.

 

 

Not solved yet; I still need to test the code after I unblock the site...somehow...

Link to comment
Share on other sites

No switch. I didn't know I need it. ::)

 

But this is what it looks like:

<?php
include "db.php"; 

session_start();

$id=$_GET['id'];

mysql_query("DELETE FROM messages WHERE `ID`='$id' AND `to`='{$_SESSION['username']}'");

    header('Location: http://mythscape.freezoka.com/pmindex.php');
?>

 

 

Link to comment
Share on other sites

db.php

<?php
//db_connect.php
$con = mysql_connect("-----","------","------") or die(mysql_error());
$db = mysql_select_db("zoka_3628910_users",$con) or die('Error: '.mysql_error());

function protect($string)
{
$string = mysql_real_escape_string($string);
return $string;
}?>

Link to comment
Share on other sites

You're using the same login system as me  :o

try this:

$con = mysql_connect("-----","------","------") or die(mysql_error());
$db = mysql_select_db("zoka_3628910_users",$con);

I dont think it has to do with the db but...

Im very confused.. I dont see what could be causing it to not delete them.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.