Membership login to admin backend

By (Deleted User) - December 13, 2010

Hi Chris / Jason,

Quick question: On the form fields in the signup page you have the value below. How do I insert or create a default value in the event that the user doesn't fill in the textfield? i.e. I don't want the field to be mandatory but I do want something to be filled in automatically if the user leaves it blank. e.g. if the user leave the website field blank then it must use a default value of "no website" automatically.

value="<?php echo htmlspecialchars(@$_REQUEST['web_address']); ?>"

regards
Shawn

Re: [smesa] Membership login to admin backend

By Jason - December 13, 2010

Hi Shawn,

You can do a check just before you insert the record in the database like this:

if(!@$_REQUEST['web_address']){
//set a default value if value not entered by the user.
$_REQUEST['web_address']="no website";
}


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Membership login to admin backend

By (Deleted User) - December 14, 2010

Works like a charm! Thanks Jason.