Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,812 members, 7,813,677 topics. Date: Tuesday, 30 April 2024 at 04:06 PM

How Do I Use This In Several Programs - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / How Do I Use This In Several Programs (684 Views)

Java online compiler for swing programs / C/C++ Doctor: Get Help In Writing C/C++ Programs / Step-by-step Method Of Writing Contiki Programs (2) (3) (4)

(1) (Reply)

How Do I Use This In Several Programs by ckdoublene: 8:21pm On Jan 23, 2011
<?php
$apt=$_POST['search_term'];
$stat = mysql_connect("localhost","root",""wink;
$stat = mysql_select_db("prerentdb"wink;
$query = "SELECT name FROM payments Where apt='$apt'";
$stat = @mysql_fetch_assoc(mysql_query($query));
echo $stat["name"];
?>
Re: How Do I Use This In Several Programs by Beaf: 2:58am On Jan 24, 2011
Throw that code away, because it wouldn't take a toddler to download your whole database.

Start from scratch, properly validate all user input and encapsulate you code in a class. You can then call the class through an include file on any page its functionality is needed.

(1) (Reply)

Cmsms / Help! Programming Languages And How To Use / Help On Linux Based Command Line

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 6
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.