PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
CurtisH
Life Cycles Becoming CPU Cycles


Joined: Mar 15, 2004
Posts: 638
Location: Waco, TX

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

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?
View user's profile Send private message Yahoo Messenger
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2363

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

addfields
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message
CurtisH
Life Cycles Becoming CPU Cycles


Joined: Mar 15, 2004
Posts: 638
Location: Waco, TX

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

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
View user's profile Send private message Yahoo Messenger
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2363

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

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.
View user's profile Send private message
CurtisH
Life Cycles Becoming CPU Cycles


Joined: Mar 15, 2004
Posts: 638
Location: Waco, TX

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

Thank you so much! I will try it out tomorrow and post my results. RavensScripts
View user's profile Send private message Yahoo Messenger
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2363

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

I think nuke might use sql_logout(); for mysql_close(); Anyone?????
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum