450 Posted Topics
Re: 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 … | |
Re: 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 … | |
Re: [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> … | |
Re: 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 … | |
Re: 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 … | |
Re: [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. | |
Re: 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(); … | |
Re: 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. | |
Re: [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: … | |
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 … | |
Re: [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. | |
Re: 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 … | |
Re: you need javascript. Jquery makes this real easy: [URL="http://flowplayer.org/tools/scrollable/index.html"]http://flowplayer.org/tools/scrollable/index.html[/URL] | |
Re: There is no method overloading in php. Any solution to this, and there are many, will be a hack. | |
Re: [edit] sorry, let me think about that for a moment. | |
Re: 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 … | |
Re: 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] | |
Re: 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; … | |
Re: I'm sure that they can but I'm also pretty sure that they won't. | |
![]() | Re: 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 … ![]() |
Re: here is a tutorial: [URL="http://phpeasystep.com/phptu/6.html"]http://phpeasystep.com/phptu/6.html[/URL] | |
Re: 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] | |
Re: 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 … | |
Re: 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> … | |
Re: 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. | |
Re: 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] | |
Re: 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] | |
Re: 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] | |
Re: 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); … | |
![]() | Re: 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. ![]() |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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. | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: 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 … | |
Re: [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> … | |
Re: 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. | |
Re: Alt + PrntScrn never fails, although it is possible to intercept these keys with js, but then again disabling js would beat that. | |
Re: [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 … | |
Re: %$&%^)&*(/*-+789)*(&J3@$9#$ You let your child in again, didn't you!?? | |
Re: 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); … | |
Re: 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] | |
Re: 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 … | |
Re: [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 , … | |
Re: [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. |
The End.