39,323 Topics
| |
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 … | |
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? | |
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? | |
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 … | |
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 … | |
[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"; … | |
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 … | |
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] | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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( … | |
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 … | |
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 … | |
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\" … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 = … | |
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 … | |
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] => … | |
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 … | |
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 … | |
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: … | |
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 … | |
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` … |
The End.