|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Php / mysql dynamically generated multi user website
I need a php / mysql programmer to fix the errors in the functions.php page. You will find a copy of the functions.php below. The code is 90% correct. I am presently using it but there are errors.
The functions.php is still looking in too many places. Only fk_accounts 24, 25, and 26 hold that data is needed for the website. 25 = Name 24 = email 26 = ID # The code is looking in too many places which is causing errors and omissions. The functions.php retrieves each member's data by looking up the "id=" querrystring. Such as: http://www.uc2.biz/isb.php?t=1&id=000-03-9425 Each member has their own personal dynamically generated website. If you are willing to fix the functions.php code, I will give you a quick overview of what the code is to do, although that should be self evident. Best Regards Liberate <?php ##functions.php function dbc() { //connect to mysql and choose database. mysql_connect("mysql1.xxxxxxxxxx.com","xxxxxxx","xxxxxxx"); mysql_select_db("maillist"); } dbc(); function checkid() { global $id; //is this ID# a valid one from the DB? $result = mysql_query("select value from swd_doppar where value='$id'") or die(mysql_error()); if(mysql_num_rows($result) > 0) { return 1; }else{ return 0; } } if(!checkid()) { print("<script Language=\"JavaScript\">location.href=('http://www.uc2.biz/adm/not_registered.php');</script></NO SCRIPT>"); exit; } function getuid($id) { global $uid; //get fk_user value from db table 'swd_doppar' based on $id $result = mysql_query("select value,fk_user from swd_doppar where value='$id'") or die(mysql_error()); $row = mysql_fetch_array($result); $uid = $row['fk_user']; return $uid; } dbc(); $uid = ""; getuid($id); function printName() { global $uid; //locator id's $id1 = 25; $id2 = 17; $id3 = 21; //get name $qry = "select * from swd_doppar where fk_user='$uid' and fk_fields='25'"; $result = mysql_query($qry) or die(mysql_error()); $result = mysql_query("select * from swd_doppar where fk_user='$uid' and fk_fields='$id1'"); if(mysql_num_rows($result) == 0) { $result = mysql_query("select * from swd_doppar where fk_user='$uid' and fk_fields='$id2'"); if(mysql_num_rows($result) == 0) { $result = mysql_query("select * from swd_doppar where fk_user='$uid' and fk_fields='$id3'"); } } $row = mysql_fetch_array($result); print($row[2]); } function printEmail($toggle) { global $uid; //locator id's $id1 = 24; $id2 = 20; $id3 = 24; //get email $result = mysql_query("select * from swd_doppar where fk_user='$uid' and fk_fields='$id1'"); if(mysql_num_rows($result) == 0) { $result = mysql_query("select * from swd_doppar where fk_user='$uid' and fk_fields='$id2'"); if(mysql_num_rows($result) == 0) { $result = mysql_query("select * from swd_doppar where fk_user='$uid' and fk_fields='$id3'"); } } $row = mysql_fetch_array($result); //display email in a way that it won't be harvested... //explode email into two different parts if($toggle==1) { $expld = explode("@",$row[2]); ?> <SCRIPT language="JavaScript" type="text/javascript"> <!-- var name = "<? print($expld[0]); ?>"; var domain = "<? print($expld[1]); ?>"; document.write('<a href=\"mailto:' + name + '@' + domain + '\">'); document.write(name + '@' + domain + '<\/a>'); // --> </SCRIPT> <? }else{ $rec_email = $row[2]; return $rec_email; } } ?> |
|
#2
|
|||
|
|||
|
is this a paid fix?
the link to my online resume: tellmama.com:800/cds/resumeComp.html Email : wndrer@earthling.net |
![]() |
| Viewing: Dev Shed Forums > Other > Project Help Wanted > Php / mysql dynamically generated multi user website |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|