shadiadiph Posted April 14, 2009 Share Posted April 14, 2009 I have tried this several times but to no success can anyone give me an example I am trying to create a mail table but using the username in the table for example the tabel needs to be called usernamemail I can't seem to figure out how to use $username to do it?? Link to comment https://forums.phpfreaks.com/topic/154115-how-to-create-users-mail-table/ Share on other sites More sharing options...
jackpf Posted April 14, 2009 Share Posted April 14, 2009 $username = $_COOKIE['Username']; $sql = mysql_query("SELECT * FROM table_users WHERE Username='$username'"); Something like that possibly? Link to comment https://forums.phpfreaks.com/topic/154115-how-to-create-users-mail-table/#findComment-810135 Share on other sites More sharing options...
shadiadiph Posted April 14, 2009 Author Share Posted April 14, 2009 not what i am looking for i am tring to do something like this but don't know if it is possible $createtable ="create table '$username'mail (`mailID` int(11) NOT NULL auto_increment,`subject` varchar(50),`message` varchar(255))"; $resultcreat = my_sql_query($createtable); Anyway thanks for the input i am going to sleep hopefully i will think of anyother way around this Link to comment https://forums.phpfreaks.com/topic/154115-how-to-create-users-mail-table/#findComment-810139 Share on other sites More sharing options...
jackpf Posted April 14, 2009 Share Posted April 14, 2009 Why not just have one mail table and a column for the username of who owns that message? That's what I have; works pretty well for me. Link to comment https://forums.phpfreaks.com/topic/154115-how-to-create-users-mail-table/#findComment-810140 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.