39,323 Topics

Member Avatar for
Member Avatar for williebens

Hello Forum: I am trying to write a php script that will take as input a zip code and output the zip code with its respective city and state with the name of any companies/businesses in that zip code. Ok, I got this part working. The other part is that …

Member Avatar for kylegetson
0
158
Member Avatar for the_programmer

Hey; I'm trying to build a custom call API file so it makes it harder for hackers to attack my application. My question is do I have to put every custom variable like[CODE] $test = array(); [/CODE]through my API? How exactly should I go around to building a custom API?

Member Avatar for the_programmer
0
88
Member Avatar for kayblack

Hello guys, I'm trying to make my PHP mailing script mail an html webpage. I've pasted the page code but I've been getting alot of error pages complaining about the tags in the html code (style, table width, etc) How do I get around this?

Member Avatar for Atli
0
181
Member Avatar for Namibnat

I am busy with a project for fun and I am finding it tricky to set balues for mysql queries. If I do the following: [CODE]function CalcPostByTime(){ include 'DB_connection.php'; $result = mysql_query("SELECT ztime FROM blogpost;");[/CODE] What is the simplest way to set an array, which will be a return value …

Member Avatar for kekkaishi
0
131
Member Avatar for psyb0rg

I have Ghostscript and IMagemagick installed on my local machine. I can access the IM functions from the command line. The environment variables are also set. The problem is that when I try to execute the IM function using PHP's exec() method, I get no result. The same script works …

Member Avatar for ShawnCplus
0
137
Member Avatar for ykjadeja2020

[CODE]<?php $host="localhost"; // Host name $username="root"; // Mysql username $password=""; // Mysql password $db_name="sort"; // Database name $tbl_name="test_mysql"; // Table name // Connect to server and select database. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); // Retrieve data from database $sort=""; $select=$_REQUEST["select"]; if($select==1) { $sort="Order by name asc"; …

Member Avatar for ShawnCplus
-1
94
Member Avatar for sethm

I have the script updating everything else in my table with no issues at all, but when I go to update the image it never updates the image, but replaces the current image with the image that is only supposed to show if there is no image uploaded to begin …

Member Avatar for sethm
0
129
Member Avatar for soccertainer

I've embeded the below into PHP dynamically, and for some reason although its displaying my windows media player, its not playing the tracks. Can anyone help please? [CODE]<embed height="20px" type="application/x-mplayer2" name="MediaPlayer" src="thepower.wav" autohref='true' autoplay='true' />[/CODE]

Member Avatar for psyb0rg
0
61
Member Avatar for sumain

Hi All, Hope all are fine. I need some help, that is i want to show email address after provides the username and password. it will happen in my personal site.

Member Avatar for diafol
0
158
Member Avatar for monicka87

Hi I need some help to get this done using php: 1 - I have few hyperlinks say 500 in format like: [code=html]<a href="http://domaina.com/1.html" target="_blank">http://domaina.com/1.html</a> <a href="http://domainb.com/1.html" target="_blank">http://domainb.com/1.html</a> <a href="http://domainc.com/21.html" target="_blank">http://domainc.com/21.html</a> <a href="http://domaind.com/new.php" target="_blank">http://domaind.com/new.php</a>[/code] etc etc Now I want to convert them into format like: [code=html]<a href="http://domaina.com/1.html" target="_blank">keyword 1</a> <a …

Member Avatar for diafol
0
280
Member Avatar for just_me

hi guys.. I have problem regarding my project. I have drop down menu which contains of maximum and minimum. I want it if user choose maximum, the description (located in the table in same page) will be change to "larger is better" and if user choose "minimum", the description will …

Member Avatar for just_me
0
61
Member Avatar for colweb

For a project I'm working on, lots and lots of jpg files need to be converted to thumbnails and shown on a website. It is not complicated to read a directory, filter out all the jpg files and create thumbnails. So far no problem. But.... Some files do contain characters …

Member Avatar for colweb
0
319
Member Avatar for bingot

hi there . im new here and also in developing a site using php. if could anyone give me an idea for for adding a textarea after a others value was selected on select(dropdown) ohh i can explain it clear. ok im just gonna give a sample [url]http://ph.jobstreet.com/myjobstreet/registration.htm[/url] when you …

Member Avatar for muralibobby2015
0
141
Member Avatar for portfood

I am having trouble getting into my website on Wordpress. I get the following message and cannot sign-in. Parse error: syntax error, unexpected T_STRING in /home/portfood/public_html/portfood/wp-admin/admin.php on line 9 Here is the text that is on that page. Can someone help ? <?php define('WP_ADMIN', TRUE); if ( defined('ABSPATH') ) require_once( …

Member Avatar for portfood
0
109
Member Avatar for Namibnat

I am sorry to ask such a beginner question: I am just learning to use classes and objects in php and would like to know one simple thing - how to you reference one function (or should I call them methods?) from another within the class. When I specify a …

Member Avatar for omoabobade
0
160
Member Avatar for lifeworks

Hi So story goes, Ive recently started hashing user passwords to protect access, but have come to a bit of a problem in that if a user forgets their password, Im unable to retrieve it for them, because all I have is the salted-md5 hash? How has everyone else overcome …

Member Avatar for liamfriel
0
265
Member Avatar for masocha

My banner rotating script dispalys first image only. script is like: [code=php]<?php $bannerCounter = 1; $bannerCode[$bannerCounter] = "<a href=\"http://www.kganyang.co.za\"/scanners.php target=\"_top\"> <img src=\"images/adverts/maq10.jpg\" width=\"90\" height=\"83\" alt=\"Buy a Scanner!\" border=\"0\"></a>"; $bannerCounter++; $bannerCode[$bannerCounter] = "<a href=\"http://www.kganyang.co.za\"/scanners.php target=\"_top\"> <img src=\"images/adverts/maq2.jpg\" width=\"90\" height=\"83\" alt=\"Buy a Scanner!\" border=\"0\"></a>"; $bannerCounter++; $bannerCode[$bannerCounter] = "<a href=\"http://www.kganyang.co.za\"/scanners.php target=\"_top\"> <img src=\"images/adverts/maq3.jpg\" …

Member Avatar for liamfriel
0
84
Member Avatar for dandixon

Im very new to php, but im trying to create a bit of code that you type in the part number and quantity you want and it returns the part number and the word "limited" if its the same "not enough" if it's less than and "in stock" if its …

Member Avatar for kekkaishi
0
152
Member Avatar for sarithak

Hi frnds... here i m doing search for my website... [CODE] $mcat='abc'; $query="SELECT * FROM news WHERE topic LIKE '%$mcat%' "; [/CODE] here , the problem is in my db table $mcat value stored as doublequotes ...the word itself having double qoutes.... the above query working for all other sarch …

Member Avatar for sarithak
0
183
Member Avatar for AdventDeo

Ok I'll try to be as clear as possible with what I want, but for all I know the solution might be so damn simple... anw... I have a picture, alright.. usual way of putting it: [CODE] <table><tr><td> <img src='bla bla' height='100%' width='100%'> </td></tr></table>[/CODE] And I actually wanted it to …

Member Avatar for diafol
0
115
Member Avatar for samarudge

Hi, I have created a script to upload files [CODE=php]$filename = $_FILES['Filedata']['name']; $filetmpname = $_FILES['Filedata']['tmp_name']; $fileType = $_FILES["Filedata"]["type"]; $fileSizeMB = ($_FILES["Filedata"]["size"] / 1024 / 1000); //Irrelevant validation here move_uploaded_file($_FILES['Filedata']['tmp_name'], $_SERVER['DOCUMENT_ROOT']."/content/songs/file.mp3");[/CODE] And that returns OK to the browser allong with my success message but the file doesn't exist, when I look …

Member Avatar for network18
0
101
Member Avatar for Nareshdeven

How to make program that i have one text box and select box, If i type "a" in text box show all words start with "a" from select box. If i typed "india" in text box then automatically also select "india" from select box in PHP?

Member Avatar for network18
0
68
Member Avatar for whiteyoh

Hi all, The following code displays the form, but when i click submit, it empties all of the fields. I get no error messages at all. Im stumped [code] <?php include("includes/connectpdomysql.php"); if (isset($user_username, $user_password, $user_email)) { //Prevent SQL injections $user_id = mysql_real_escape_string($_POST['user_id']); $user_username = mysql_real_escape_string($_POST['user_username']); $user_password = md5($_POST['user_password']); $user_fname = …

Member Avatar for diafol
0
140
Member Avatar for web3

When i put in this code WHERE to='$username' won't work? [CODE]<?php $connect = mysql_connect ("localhost","root","") or die (mysql_error()); mysql_select_db ("login4") or die (mysql_error()); session_start(); $_SESSION['username']; $username = $_SESSION['username']; $query = mysql_query("SELECT * FROM pm ORDER BY id DESC"); $message = '' ; while ($row = mysql_fetch_array($query)){ $id = $row['id']; $to …

Member Avatar for web3
0
110
Member Avatar for macneato

Hi, so im pulling arrays from facebook. But i would like to sort them. Here is how the arrays look [CODE] Array ( [0] => Array ( [eid] => 203966119376 [name] => Funtastic - a show for the whole family! [tagline] => [nid] => 0 [pic] => http://profile.ak.fbcdn.net/object2/857/53/s203966119376_6012.jpg [pic_big] => …

Member Avatar for macneato
0
202
Member Avatar for vaultdweller123

hello guys im a php programmer and im new to homebased programming jobs. I just want to have an idea on how homebased programming job works? how do i find some clients? how to transfer files? how to receive my payments? And they say you are paid per hour? but …

Member Avatar for vaultdweller123
0
155
Member Avatar for perosf

Hi I found this code and do as it should but I just code as to add my website [QUOTE]Well first you need to download the GeoLite Country database in binary format [I][URL="http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz"]http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz[/URL][/I]. Next, upload it to your server. Afterward, download the [I][url]http://geolite.maxmind.com/download/geoip/api/php/geoip.inc[/url] [/I]file and save it on your server …

Member Avatar for diafol
1
1K
Member Avatar for futhonguy

Dear all, I am trying to submit my data on a php created form to mysql database where it is separate by 2 tables (device) and (location). As some of the devices shared the same location, 2 tables are created as below. For location table, i had created 2 fields: …

Member Avatar for futhonguy
0
198
Member Avatar for Stefano Mtangoo

There is good script by KKeith [url]http://www.daniweb.com/forums/post951182.html[/url] I want to use it as my base script with some modification. Before I customize it, I want to Make it OOPized into class with functions in functions.php and login+register.phps Please help me on doing that! I'm intermediate btn newbee and intermediate developer …

Member Avatar for Stefano Mtangoo
0
233
Member Avatar for j_limboo

Hi newbee to php mysql appreciate if anyone can help in change password in sha1 Current mysql table [CODE] `users` ( `id` int(255) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(100) NOT NULL, `firstname` varchar(50) DEFAULT NULL, `lastname` varchar(50) DEFAULT NULL, `password` varchar(40) NOT NULL, `active` int(1) NOT NULL DEFAULT '0', `ip` …

Member Avatar for j_limboo
0
138

The End.