Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.1
Author Message
CurtisH
Life Cycles Becoming CPU Cycles



Joined: Mar 15, 2004
Posts: 638
Location: West Branch, MI

PostPosted: Thu Jul 22, 2004 6:19 am Reply with quote

I am trying to determine how to make certain fields required in the new user registration and change info forms. Is this something that can be handled by a database modification or is it coded directly into the php?

_________________
Those who dream by day are cognizant of many things which escape those who dream only by night. ~Poe 
View user's profile Send private message Visit poster's website Yahoo Messenger
sixonetonoffun
Spouse Contemplates Divorce



Joined: Jan 02, 2003
Posts: 2496

PostPosted: Thu Jul 22, 2004 7:52 pm Reply with quote

addfields http://www.ulsoft.scarbridge.co.uk/

_________________
[b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8 
View user's profile Send private message
CurtisH







PostPosted: Thu Jul 22, 2004 8:36 pm Reply with quote

I guess I should have mentioned that I am using NSN Your Account. The mod that you have suggested will replace key files in my version breaking its functionality (in other words I already tried that. *LOL*) and is in fact more suited for adding fields, I only want to make a few required. That is why I asked how to make them required.

Thank you for the quick reply though! That is one of the wonderful things about this site, the staff are very friendly and quick to reply. Smile
 
sixonetonoffun







PostPosted: Thu Jul 22, 2004 8:59 pm Reply with quote

Makiing existing ones requireds not so hard.
Before the insert statment add something like this.
if( $email == "" ) error( "E-mail required" );


In mainfile.php or the same file add something like this to print out pretty error pages.

function error( $error )
{
include("header.php");
OpenTable();
echo "<p align=\"center\"><font size=\"4\">Error: $error</font></center>\n";
echo "<p align=\"center\"><a href=\"javascript:history.back()\"><b>Back</b></a></p>\n";
CloseTable();
include("footer.php");
mysql_close();
exit;
}

Your validation of the $_POST variables could be a lot more complex this just looks to see if it has a value and if there is none throws and error page up.
 
CurtisH







PostPosted: Thu Jul 22, 2004 9:04 pm Reply with quote

Thank you so much! I will try it out tomorrow and post my results. RavensScripts
 
sixonetonoffun







PostPosted: Thu Jul 22, 2004 9:05 pm Reply with quote

I think nuke might use sql_logout(); for mysql_close(); Anyone?????
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.1

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©