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

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

 

 

 

 

 

 

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.