Project Help Wanted
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherProject Help Wanted

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old January 20th, 2004, 08:18 PM
liberate liberate is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 34 liberate User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Functions page - php, mysql

I need to have this functions.php page written. This is over my head and I don't have the time to learn how to do it myself.

All of the table names are correct in the $result lines below, pointing at the required piece of data. The rest of the code is just to give you an idea of what this functions.php page needs to do.

This will give you the php hosting details, http://www.uc2.biz/phpinfo.php

Price to be determined.

Hoping to get this completed quickly.

Thank You
Tom
Preferred if you email me. 'liberate (at) uc2 (dot) biz'


<?php

##function.php

function dbc() {
//connect to mysql and choose database.
mysql_connect("host","user","pw");
mysql_select_db("name");
}

dbc();

function set_uid() {
global $pfs;
// Is ?pfs=username a valid username? If Yes - Return user1, if No - Return ?pfs=liberate
$result = mysql_query("select user1 from lm_users where user1='$pfs'") or die(mysql_error());
if(mysql_num_rows($result) > 0)
{
$field = mysql_result($result, 0, 'user1');
return $field;
}else{
return 'liberate';
}
}


// All data returned from db to be based
// from the ?pfs=username or the default ?pfs=liberate if username not found

dbc();
$uid = set_uid();


// Get username or default

function getpfs($uid) {

$result = mysql_query("select user1 from lm_users where user1='$uid'") or die(mysql_error());
$field = mysql_result($result, 0, 'user1');
return $field;
}

// The code above functions correctly, the code below still needs work.

$psf = getpfs($uid)


// Get ar_id or ar_id of default

function ar_id($uid) {

$result = mysql_query("select user2 from lm_users where user1='$uid'") or die(mysql_error());
$field = mysql_result($result, 0, 'user2');
return $field;
}


// Get name or name of default

function printName() {
global $uid;
$result = mysql_query("select user4 from lm_users where user1='$uid'") or die(mysql_error());
$field = mysql_result($result, 0, 'user4');
return $field;
}


// Get email or email of default.
// Email is added to simulated Post during formprocessing

function printEmail($toggle) {
global $uid;
$result = mysql_query("select email from lm_users where user1='$uid'");
$field = mysql_result($result, 0, 'email');


//display email in a way that it won't be harvested...
//explode email into two different parts

if($toggle==1) {
$expld = explode("@",$field);
?>
<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 = $field;
return $rec_email;
}
}

?>

To prevent email addresses from being harvested the email address is added to the form submission during the simulated Post of the formprocessor.

Last edited by liberate : January 20th, 2004 at 08:23 PM.

Reply With Quote
  #2  
Old January 22nd, 2004, 11:44 AM
liberate liberate is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 34 liberate User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Still Looking for someone to write php / mysql code.

Doesn't anyone want to earn a few bucks for about a half hour of work?

I have a list of needed programming, I just need a person that will solve out the problems as they come up.

If you keep your price reasonable, there will be other things to do beyond fixing the code of the functions page.

Tom
Preferred if you email me. 'liberate (at) uc2 (dot) biz'

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherProject Help Wanted > Functions page - php, mysql


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway