450 Posted Topics

Member Avatar for BIOLA OMOTOSO

there is a saying at my place of work which is, don't build what you can buy. I imagine that text messaging is fairly cheap and I know that there are several companies offering it and will provide an API for you to use. That is unless this is a …

Member Avatar for R0bb0b
0
68
Member Avatar for rajandass65

You should go with a reputable one like Zend. Something that is going to continue to update years from now and stay with that one. You don't want to end up in a situation where you are trying to update php or apache and have it break, just to find …

Member Avatar for R0bb0b
0
134
Member Avatar for Vai

[QUOTE=nav33n;645021] [code=php]$test="<table border=1><tr><td>Cell 1</td><td>Cell 2</td></tr></table>";[/code][/QUOTE] Wow! That really works! I've always done just plain csv files, I didn't know you could use html. You've made my day. [CODE=php] <?php $file="test.xls"; header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=$file"); ?> <table cellpadding="0" cellspacing="0"> <tr> <td>cell one</td> <td>cell two</td> <td>cell three</td> <td>cell four</td> </tr> <tr> …

Member Avatar for sumitgupta225
0
447
Member Avatar for charlie123

All web applications are subject to the same sql and header injection tactics, and as of php6 register globals along with some other not necessary poor programming tactics but commonly used incorrectly tactics will no longer be available. These are things that php has been under scrutiny about for a …

Member Avatar for kwesiaryee
0
248
Member Avatar for arctushar

There are actually several ways to do this, some being more costly and some being less secure. I will list the ones that I know of and give you the method that I would choose. You can use apache or .htaccess file to keep users from accessing a specific directory …

Member Avatar for arctushar
0
135
Member Avatar for Ruko

[QUOTE=Ruko;1429293]How do I replace 63 strings in a .sql via php. Im making a multiforum software and I can't figure this out.[/QUOTE] create two arrays, one with 63 different strings and another with the 63 associated replacements and then use str_replace or str_ireplace or case insensitive replacement.

Member Avatar for R0bb0b
0
64
Member Avatar for itisnot_me

here yo go, chew on this for a while, I didn't really test any of it but it should give you kind of an idea of the purpose of a class and maybe something to start with. [CODE=php] <?php class MyDBClass { private $arrDBConns = array(); public $arrErrors = array(); …

Member Avatar for R0bb0b
0
368
Member Avatar for ankit.pandey3

I use aes_encrypt and aes_decrypt for mysql. You just need to figure out a way to securely use a key to encrypt and decrypt with.

Member Avatar for cereal
0
2K
Member Avatar for mrlol

[QUOTE=mrlol;1425495]Hi guys, Need your help. Currently my development server using Wamp server. please read below for services details: * Apache/2.2.11 (Win32) PHP/5.3.0 * MySQL client version: mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $ * PHP extension: mysqli * Server: localhost (MySQL host info: localhost via TCP/IP) * Server version: …

Member Avatar for R0bb0b
0
368
Member Avatar for R0bb0b

I have a photo management system that I have build locally which uses mysql to store the images. the problem is that I exceed the max_allowed_packet value when my images are too large. I know how to set the max_allowed_packet value through the CLI with: [CODE=sql]SET GLOBAL max_allowed_packet=16*1024*1024*1024;[/CODE] The problem …

Member Avatar for R0bb0b
0
166
Member Avatar for anniejolly

[QUOTE=anniejolly;1426438]How to find the minimum or maximum value across several columns in sql server[/QUOTE] I am pretty sure that you will have to use a query for each column so you are looking at multiple queries. Look [URL="http://www.electrictoolbox.com/find-length-longest-string-mysql/"]here[/URL] for info on querying a single field.

Member Avatar for R0bb0b
0
59
Member Avatar for Dragonbaki

This may or may not solve your problem, but either way. I don't know if you have ever used this before but after using it for some time, I will never send mail without it. It's an amazing class with a lot of ready made functionality, has been around for …

Member Avatar for richieking
0
135
Member Avatar for Dante2

you need javascript. Jquery makes this real easy: [URL="http://flowplayer.org/tools/scrollable/index.html"]http://flowplayer.org/tools/scrollable/index.html[/URL]

Member Avatar for Dante2
0
193
Member Avatar for hmhb.in

There is no method overloading in php. Any solution to this, and there are many, will be a hack.

Member Avatar for Shanti C
0
118
Member Avatar for David 78
Member Avatar for divyakrishnan

You will have to convert it to plain text first, which is going to be a pain in the ass. There are some classes that claim to be able to do it. Open source options probably won't be as reliable as commercial but it has been about a year since …

Member Avatar for cereal
0
907
Member Avatar for mbarandao

here you go: url = [url]http://yourdomain.com?selid[/url][]=one&selid[]=two&selid[]=3 [CODE=php] <?php if(isset($_GET['selid']) && is_array($_GET['selid']) && count($_GET['selid']) > 0) { echo '<select id="selid" name="selid"> '; foreach($_GET['selid'] as $key=>&$value) { echo '<option value="' . $key . '">' . $value . '</option> '; } echo "</select> "; } ?> [/CODE]

Member Avatar for mbarandao
0
210
Member Avatar for kiranbvsn

This is not making much sense to me. You only want to bind the #lnkbtnUnitAdd click event to the button when you call the function? Usually when I see this being done it is in a .ready function call like so: [CODE=javascript] $(document).ready(function() { $("#lnkbtnUnitAdd").click(function () { $("#divUnit").show("slow"); return false; …

Member Avatar for kiranbvsn
0
321
Member Avatar for zlegend
Member Avatar for diafol

personally, I would go with a database. Session data that large, even though it shouldn't hinder the server since it is just a flat file, does hinder the users experience if it gets too large because the server has to read the entire session file every time the page is …

Member Avatar for diafol
0
727
Member Avatar for shafeequeom

here is a tutorial: [URL="http://phpeasystep.com/phptu/6.html"]http://phpeasystep.com/phptu/6.html[/URL]

Member Avatar for somedude3488
0
261
Member Avatar for Awah Mohamed

first thing that comes to mind is this: [CODE=php] $_SESSION['username'] == $username; $_SESSION['name'] == $name; [/CODE] should be: [CODE=php] $_SESSION['username'] = $username; $_SESSION['name'] = $name; [/CODE]

Member Avatar for Awah Mohamed
0
246
Member Avatar for Russ_Kauk

so upon submission of this upload file, I assume that this is a standard form submission and the page refreshes. the server processes the file and then populates the values in this <div> tag. If that's the case then you would want to somehow tap into the already written functionality …

Member Avatar for Russ_Kauk
0
193
Member Avatar for nonshatter

this is not tested but I am about 99% sure that it will work: [CODE=javascript] <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script type="text/javascript" language="javascript"> var blnOpenStatus = false; $(document).ready(function() { $("#linkID").click(function() { if(blnOpenStatus) { blnOpenStatus = false; $("#BDInfo").hide(); $("#linkIDImg").attr("src","path/to/closed.jpg"); } else { blnOpenStatus = true; $("#BDInfo").show(); $("#linkIDImg").attr("src","path/to/open.jpg"); } }); }); </script> …

Member Avatar for Airshow
0
147
Member Avatar for kooia

I think what you are looking for is: [CODE=javascript] <script type="text/javascript"> function factoryMouseOver() { document.getElementById("factory").style.display="block"; } function factoryMouseOut() { document.getElementById("factory").style.display="none"; } </script> [/CODE] but jquery offers a much more elegant way of doing it which I will post in a few minutes if you want to wait.

Member Avatar for R0bb0b
0
1K
Member Avatar for itisnot_me

I don't know what you are trying to do with the loop but I think this is what you are looking for: [CODE=php] <?php $store = array(); $store["fieldone"] = $fieldone; $store["fieldtwo"] = $fieldtwo; $store["fieldthree"] = $fieldthree; ?> [/CODE]

Member Avatar for itisnot_me
0
91
Member Avatar for shoucate

Does the book actually say "PHP 5/mySQL" in the title. That is horrible. PLEASE!! do yourself a favor: [url]http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470413964.html[/url]

Member Avatar for shoucate
0
108
Member Avatar for shenbagam

I've used this one a lot. It's jQuery not php though. [URL="http://flowplayer.org/tools/demos/scrollable/plugins/index.html#autoscroll"]http://flowplayer.org/tools/demos/scrollable/plugins/index.html#autoscroll[/URL]

Member Avatar for shenbagam
0
70
Member Avatar for raevin

I would do something like this: [CODE=php] <?php //header script, include in all scripts accept your ajax php script session_start(); $_SESSION['pageAuth'] = microtime(); if(__FILE__ == "/var/www/websitename/index.php") { $fp = fopen('/var/webSec/websitename.txt', 'w'); //needs to be writable by apache, make apache the owner or writable and readable by all fwrite($fp, $_SESSION['pageAuth']); fclose($fp); …

Member Avatar for raevin
0
194
Member Avatar for feoperro

You have a disconnect somewhere because this certainly is possible to do. I have to agree with ardav, make sure that you have a "session_start()" at the beginning of all of your scripts.

Member Avatar for diafol
0
194
Member Avatar for Awah Mohamed

this is a combination coding and sysadmin question. I have been coding in php professionally for over 5 years and consider myself a professional developer and I cannot say that I can do this with confidence, security wise. I would recommend you do some research on open source software or …

Member Avatar for Awah Mohamed
-2
145
Member Avatar for scodex

let's run some standard debugging. throw an: [CODE=php] echo $sql . "<br />"; [/CODE] right after line 17 to show the actual query being sent to the database, then run that query against the database in phpMyAdmin or whatever database management system you are using. If that also gives you …

Member Avatar for scodex
0
206
Member Avatar for dan1992

You can do a standard html redirect in 60 seconds which you can surround with <noscript></nostript> to provide a noscript option, but in order to display a timer you will need javascript.

Member Avatar for R0bb0b
0
67
Member Avatar for arctushar

something else is going on besides just mysql_real_escape_string, I think possibly you are double escaping but that is just a guess. You will need to post your code.

Member Avatar for R0bb0b
0
62
Member Avatar for jsmiley77

the semi colon shouldn't make a difference since it is the last property being specified. Make sure though that you are specifying the unit of measure for font-size: for example 12px or 12em where px and em are the unit of measure and won't do anything if you don't include …

Member Avatar for Borzoi
0
174
Member Avatar for george61

you could try jquery. Search for "Creating New Elements" at [url]http://api.jquery.com/jQuery/[/url]. Chances are you will have to tweak the concept a little to get it to work for your project but because it is jQuery, it will probably work cross browser.

Member Avatar for Airshow
0
169
Member Avatar for Xtremefaith

my first guess would be a sql error and I am suspicious of your column name "Company/Name". I have never seen this done and am guessing that you may have to escape that "/" so it would be "Company\/Name". I would try to change the column name in the future …

Member Avatar for Xtremefaith
0
152
Member Avatar for rolandrogers

I have tried this and it seems to work as expected, I think. Can you please explain what it is you are trying to do and what the desired and undesired results are that you are getting. This is probably a simple logical error.

Member Avatar for rolandrogers
0
138
Member Avatar for shenbagam

Also, you should never store plain text passwords in your database. I would do some research in the php function md5 to create an md5 hash of the passwords and then you can compare the md5 hash version of the password submitted by the user to the md5 hash version …

Member Avatar for joehms22
0
109
Member Avatar for bouncycastle

for starters, and I mean starters: this page [url]http://www.chinesetutorscentre.co.uk/UK/oxford.php[/url] has many urls, the urls extremely outweigh the text content of the page and google really hates that. Google wants to provide content to its users and if you have a hundred links and one small sentence in the body of …

Member Avatar for Borzoi
0
118
Member Avatar for Pereguin

[CODE=javascript] <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> </head> <body> <script type="text/javascript" language="javascript"> function callPHPScript() { $.ajax( { url:'scriptFileName.php', type:'GET', success:function(response) { alert(response); // or do what ever else you might want to do here } }); } $(document).ready(function() { $("#imgID").click(function(){ callPHPScript(); }); }); </script> <img id="imgID" src="test.jpg" height="50" width="50" /> </body> …

Member Avatar for R0bb0b
0
174
Member Avatar for zerey02

If you really want to impress someone, mix in some jQuery. PHP is nice but for a project like this I would use ajax to communicate with your PHP api and then provide some eye candy on the font end.

Member Avatar for R0bb0b
0
521
Member Avatar for praveen_dusari

Alt + PrntScrn never fails, although it is possible to intercept these keys with js, but then again disabling js would beat that.

Member Avatar for DanielTulp
0
828
Member Avatar for terence193

[QUOTE=GrimJack;703237]Heh,heh - love the pic. You know that pigeons are cliff-dwellers which is why the find cities so home-like - hawks take pigeons in the air so the pigeons stay on the ledges when they can. The hawks have started landing on the ledges and nudging the pigeons until one …

Member Avatar for vegaseat
0
885
Member Avatar for vmanes
Member Avatar for macgurl70
1
1K
Member Avatar for Benbo1980

Try this [CODE=php] <strong>Update multiple rows in mysql</strong><br> <?php $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name="test"; // Database name $tbl_name="test_mysql"; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM $tbl_name"; $result=mysql_query($sql); …

Member Avatar for freshmem
0
1K
Member Avatar for joshSCH

All hail joshSCH [URL="http://upload.wikimedia.org/wikipedia/commons/4/45/Mooning.jpg"]http://upload.wikimedia.org/wikipedia/commons/4/45/Mooning.jpg[/URL]

Member Avatar for jbennet
-3
486
Member Avatar for Dani

I am a web developer. When you ask me to come up with a website scheme that will appeal to the public, the first thing that I think of is a square. But on the other hand if you give me a design, I can duplicate it, create the db …

Member Avatar for anuj_sharma
2
765
Member Avatar for himi

[QUOTE=himi;648277]Hi , I am trying to create a webpage. It has 3 frames (left, middle and right). I want to be able to drag images from the left and the right frame into the middle frame. Each time i try to drag an image from one frame to another , …

Member Avatar for peter_budo
0
107
Member Avatar for The Dude

[QUOTE=The Dude;618736]Enjoy :) [url]http://video.google.com/googleplayer.swf?docid=-8627390594491892243[/url][/QUOTE] Wow, that is insane. I could watch that for hours.

Member Avatar for GrimJack
0
215

The End.