still waiting for some help in here
[/b]
Martial Status
Collapse
This topic is closed.
X
X
-
<span style="font-size:36pt;line-height:100%">?</span>
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ â“â“¡â“” â“ⓑⓛⓔ ⓣⓞ â“—â“”â“â“¡ !
ιη тнєσÑу, тнє ÏÑα¢тι¢є ιѕ α Ñєѕυℓт σƒ тнє тнєσÑу, вυт ιη ÏÑα¢тι¢є ιѕ тнє σÏÏσѕιтє.
-
hellspawn
MySQL command to add new row to table ibwf_users:
As far as I know there are only 2 sites running a chapel, DMP (half job) and mine (decent job), although that is only to get married. I'm guessing that you are asking for an option like the 1 seen on mocospace?Code:mysql -> ALTER TABLE ibwf_users ADD stats VARCHAR(15) NOT NULLED DEFAULT ' ';
here is the sql for my chapel script (as much as i am willing to give out)Code:CREATE TABLE `ibwf_chapel` ( `id` int(100) NOT NULL auto_increment, `ismd` char(1) NOT NULL default '0', `uid` int(100) NOT NULL default '0', `mid` int(100) NOT NULL default '0', `rpen` char(1) NOT NULL default '0', `mdy` int(100) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
ismd = if the marage is final or not
uid = the innitial person to request a marage with some1
mid = the person as to which the request is being made
rpen = if the marage is in request or not
mdy = the date as to which the marage was finalised
the coding is pretty easy to do
If you do take on the project, remember to add a option for the user to remove the status (unlike DMP's chapel where users can be married several times over lol)
Comment
-
by adding this sql to users in db will this script work? i mean the status ? please explain in brief brothers im not sure wht it is got lil doubts with this sqlFailure is not when a girls leaves you, its only when you let her go virgin. heheh!!
<span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

Comment
-
hellspawn
Will post my version...
Add this sql row to your database:
Add this option where needed:Code:mysql -> ALTER TABLE ibwf_users ADD ms INT(1) NOT NULLED DEFAULT '0';
Add this to your genproc.php:Code:else if($action=="ms") { $uid =getuid_sid($sid); if($uid>0) { addonline(getuid_sid($sid),"Updating marital status",""); } echo "<card id=\"main\" title=\"Marital status\">"; echo "<p align=\"center\">"; $uid = getuid_sid($sid); $mss = mysql_fetch_array(mysql_query("SELECT ms FROM ibwf_users WHERE id='".$uid."'")); echo "[size="1"]"; echo "Marital status: <select name=\"ms\" value=\"$mss[0]\">"; echo "<option value=\"0\">Single</option>"; echo "<option value=\"1\">Involved</option>"; echo "<option value=\"2\">Engaged</option>"; echo "<option value=\"3\">Maried</option>"; echo "<anchor>Update<go href=\"genproc.php?action=ms&sid=$sid\" method=\"post\">"; echo "<postfield name=\"ms\" value=\"$(ms)\"/>"; echo "</go></anchor> "; echo "[/size]<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>"; echo "</p>"; echo "</card>"; }
And add this to your user profile:Code://////////////////////////////////////mood else if($action=="ms") { addonline(getuid_sid($sid),"Updating marital status",""); echo "<card id=\"main\" title=\"WapTECH\">"; echo "<p align=\"center\">"; $uid = getuid_sid($sid); $ms = $_POST["ms"]; $isud = mysql_query("UPDATE ibwf_users SET ms='".$ms."' WHERE id='".$uid."'"); if($isud) { echo "<img src=\"images/ok.gif\" alt=\"o\"/>Marital status updated successfully "; }else{ echo "<img src=\"images/notok.gif\" alt=\"x\"/>Database error, please inform H3llsp@wn. "; } echo " <a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p></card>"; }
Thats pretty much it lol enjoyCode:$msq = mysql_fetch_array(mysql_query("SELECT ms FROM ibwf_users WHERE id='".$who."'")); echo "Marital status: "; if($msq[0]=='0') { echo "single "; } else if($msq[0]=='1') { echo "[b]involved[/b] "; } else if($msq[0]=='2') { echo "[b]engaged[/b] "; } else if($msq[0]=='3') { echo "[b]married[/b] "; }
NOTE: I added this as part of the registration form, hense the default is single lol
Comment
-
Guest -
this is a bugs free code.so whoever is looking for code marrital status,are requested to use it.Will post my version...
Add this sql row to your database:
Add this option where needed:Code:mysql -> ALTER TABLE ibwf_users ADD ms INT(1) NOT NULLED DEFAULT '0';
Add this to your genproc.php:Code:else if($action=="ms") { $uid =getuid_sid($sid); if($uid>0) { addonline(getuid_sid($sid),"Updating marital status",""); } echo "<card id=\"main\" title=\"Marital status\">"; echo "<p align=\"center\">"; $uid = getuid_sid($sid); $mss = mysql_fetch_array(mysql_query("SELECT ms FROM ibwf_users WHERE id='".$uid."'")); echo "[size="1"]"; echo "Marital status: <select name=\"ms\" value=\"$mss[0]\">"; echo "<option value=\"0\">Single</option>"; echo "<option value=\"1\">Involved</option>"; echo "<option value=\"2\">Engaged</option>"; echo "<option value=\"3\">Maried</option>"; echo "<anchor>Update<go href=\"genproc.php?action=ms&sid=$sid\" method=\"post\">"; echo "<postfield name=\"ms\" value=\"$(ms)\"/>"; echo "</go></anchor> "; echo "[/size]<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>Home</a>"; echo "</p>"; echo "</card>"; }
And add this to your user profile:Code://////////////////////////////////////mood else if($action=="ms") { addonline(getuid_sid($sid),"Updating marital status",""); echo "<card id=\"main\" title=\"WapTECH\">"; echo "<p align=\"center\">"; $uid = getuid_sid($sid); $ms = $_POST["ms"]; $isud = mysql_query("UPDATE ibwf_users SET ms='".$ms."' WHERE id='".$uid."'"); if($isud) { echo "<img src=\"images/ok.gif\" alt=\"o\"/>Marital status updated successfully "; }else{ echo "<img src=\"images/notok.gif\" alt=\"x\"/>Database error, please inform H3llsp@wn. "; } echo " <a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p></card>"; }
Thats pretty much it lol enjoyCode:$msq = mysql_fetch_array(mysql_query("SELECT ms FROM ibwf_users WHERE id='".$who."'")); echo "Marital status: "; if($msq[0]=='0') { echo "single "; } else if($msq[0]=='1') { echo "[b]involved[/b] "; } else if($msq[0]=='2') { echo "[b]engaged[/b] "; } else if($msq[0]=='3') { echo "[b]married[/b] "; }
NOTE: I added this as part of the registration form, hense the default is single lol[/b]
Comment
Comment