SharpClown Posted January 2, 2008 Share Posted January 2, 2008 Ok so I am building a self replicating site and I am a newb at php and mysql but I know how to get info into the data base and get it out in text form. But my problem is that when some one registers it builds them a custom site, now part of this site is a form, and for the form to send there info to the right place when some one fills it out, it needs to grab info from the database and put it in the coding for their form.... and I dont know how to do that. This is the form part that need to have the code changed: <form action="http://www.responsemagic.com/signup.php" method="post"> <input type="hidden" name="frmOrigin" value="*********"> <input type="hidden" name="frmNotify" value="*"> <input type="hidden" name="frmUserId" value="****"> <input type="hidden" name="frmUser" value="****"> <input type="hidden" name="frmMUser" value=""> <input type="hidden" name="slaveForm" value=""> <input type="hidden" name="frmList" value="***"> <input type="hidden" name="frmFromEmail" value="*******"> <input type="hidden" name="hideSError" value="***"> I have to put in their info into the *** places Please help, Thanks Thomas aka SharpClown Quote Link to comment https://forums.phpfreaks.com/topic/84080-solved-grabbing-info-from-mysql-and-using-it-in-code-for-self-replicating-site/ Share on other sites More sharing options...
SharpClown Posted January 2, 2008 Author Share Posted January 2, 2008 Oh I poked around and figured that out but now I have a new problem, say if someone does NOT fill out information in a form, how do you make it fill in default information in the area where the database uses it or in the data base itself... Example If billy fills in the form but leaves out his real name, how do I make it so on the members area where it is suppose to show up as his name like “Welcome Billy” say “Welcome NONAME” instead of just blanking it like “Welcome ______ “ Quote Link to comment https://forums.phpfreaks.com/topic/84080-solved-grabbing-info-from-mysql-and-using-it-in-code-for-self-replicating-site/#findComment-427986 Share on other sites More sharing options...
rajivgonsalves Posted January 2, 2008 Share Posted January 2, 2008 well you have to put if statements post some of your code and I show you how.... Quote Link to comment https://forums.phpfreaks.com/topic/84080-solved-grabbing-info-from-mysql-and-using-it-in-code-for-self-replicating-site/#findComment-427989 Share on other sites More sharing options...
SharpClown Posted January 2, 2008 Author Share Posted January 2, 2008 what would you need? Quote Link to comment https://forums.phpfreaks.com/topic/84080-solved-grabbing-info-from-mysql-and-using-it-in-code-for-self-replicating-site/#findComment-427993 Share on other sites More sharing options...
rajivgonsalves Posted January 2, 2008 Share Posted January 2, 2008 lets take origin consider the following code $strOrigin = (isset($_POST['frmOrigin'])) ? $_POST['frmOrigin'] : "NONE"; $sqlQuery = "insert into user_table (orignin,....) values ('$strOrignin'...); thats one way... or default column value in mysql you can specify to that Quote Link to comment https://forums.phpfreaks.com/topic/84080-solved-grabbing-info-from-mysql-and-using-it-in-code-for-self-replicating-site/#findComment-427995 Share on other sites More sharing options...
SharpClown Posted January 2, 2008 Author Share Posted January 2, 2008 sorry I dont quite get the code you wrote can you explain where I would use this and where I write what I want it to be Quote Link to comment https://forums.phpfreaks.com/topic/84080-solved-grabbing-info-from-mysql-and-using-it-in-code-for-self-replicating-site/#findComment-427997 Share on other sites More sharing options...
rajivgonsalves Posted January 2, 2008 Share Posted January 2, 2008 In your signup.php file... you must be processing the form there your code should be there.. Quote Link to comment https://forums.phpfreaks.com/topic/84080-solved-grabbing-info-from-mysql-and-using-it-in-code-for-self-replicating-site/#findComment-427998 Share on other sites More sharing options...
SharpClown Posted January 2, 2008 Author Share Posted January 2, 2008 I just used the settings in the MYSQL THANKS!!!!!!!! Quote Link to comment https://forums.phpfreaks.com/topic/84080-solved-grabbing-info-from-mysql-and-using-it-in-code-for-self-replicating-site/#findComment-428020 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.