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?? Quote 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? Quote 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 Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.