Jump to content

[SOLVED] Grabbing info from MYSQL and using it in code, for self replicating site


SharpClown

Recommended Posts

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

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 ______ “

 

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

 

 

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

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