2,113 Posted Topics
Re: If this CMS is developed over a framework there are some chances to use some sort of routing library embeded, otherwise search for routing solutions like http://fatfree.sourceforge.net/ note apart: if they've been hacked it's probably because of a misconfigured .htaccess file or for wrong permission on the parent folder, the … | |
Re: Just a little error: you are placing class="selected" inside <li> while your CSS is checking for the <a> tag. Change it like this: <li><a <?php echo ($thisPage == 'Home') ? ' class="selected"' : ''; ?> href="index.php">Home</a></li> bye! | |
Re: On CodeIgniter forum there is a thread about a similar problem (I think), but at the moment there aren't answers: http://codeigniter.com/forums/viewthread/209004/ I'm wondering if this can be related to Utf8 library, this is in System/Core, check if removing @ from iconv() and mb_convert_encoding() will display an error. Good luck! | |
Re: In linux you can use nslookup, in PHP gethostbyname() and gethostbynamel() to get the list: http://www.php.net/manual/en/function.gethostbyname.php http://www.php.net/manual/en/function.gethostbynamel.php bye :) | |
Re: Check the manual: [url]http://php.net/manual/en/control-structures.elseif.php[/url] [code]if {} # first elseif {} # in the middle else if {} # "elseif" and "else if" are the same else {} # last[/code] bye. | |
Re: Maybe it's a memory limit issue, i.e. the memory used by PHP scripts, did you get any error? If error reporting is disabled, place [icode]<?php error_reporting(E_ALL); ?>[/icode] at top of the script and see what it happens. | |
Re: Add single quotes around $keyword: [code]"SELECT FirstName, LastName, Age, Hometown, Job FROM people WHERE age <= '$keyword' "[/code] Also use CODE tags when posting to the forum, bye :) | |
Re: This is called database replication, you can apply different solutions, if you are using MySQL then read these: [url]http://dev.mysql.com/doc/refman/5.0/en/replication.html[/url] [url]http://www.howtoforge.com/mysql_database_replication[/url] bye | |
Re: Check line 23: [icode]setcookie("id", "id", time()+86400);[/icode] the second argument, the value, is "id" while it should be $id: [icode]setcookie("id", $id, time()+86400);[/icode] | |
Re: You could use crontab otherwise read these: - [url]http://www.fijiwebdesign.com/fiji-web-design-blog/create-a-background-process-on-the-server-with-php.html[/url] - [url]http://php.net/manual/en/function.ignore-user-abort.php[/url] | |
Re: Your code seems ok to me, but why do you have [icode]var_dump($x);[/icode] inside your javascript? var_dump() it's PHP, you need console.log there, or alert as you already wrote. And also you need to change your document.write to integrate the var as you did in the alert: [icode]document.write('<a href="' + unescapedUrl … | |
Re: Create a php page to display cookies and session values and then open it with iphone and a desktop. This will help you to understand what is not working. Also check error and access log files in apache. | |
![]() | Re: An example based on this comment: [url]http://www.php.net/manual/en/ref.simplexml.php#66259[/url] [code]<?php function display($in, $string) { if (file_exists($in)) { $xml = simplexml_load_file($in); } else { throw new Exception($in . " does not exist"); } $manifest = $xml->children('http://www.w3.org/1999/02/22-rdf-syntax-ns'); $a = ''; foreach ($manifest->xpath('//rdf:value') as $value) { if(trim($value) == trim($string)) { $a = $manifest->xpath('//rdf:object'); } } … |
Re: If you are referring to the e-commerce platform then look at system requirements: - [url]http://www.magentocommerce.com/system-requirements[/url] it works only on linux. Bye. | |
Re: You can extend the Form_validation library which is in System/Libraries or you can use callbacks: [url]http://codeigniter.com/user_guide/libraries/form_validation.html#callbacks[/url] To extend an existent library check at the end of this page: [url]http://codeigniter.com/user_guide/general/creating_libraries.html[/url] Also if you create a callback function set that public and if you don't want to be accessible from the url … | |
Re: Check the guide: [url]http://codeigniter.com/user_guide/database/active_record.html#delete[/url] [code]$this->load->library('database'); $this->db->where('id',$id); $this->db->delete('add_campaign'); $tables = array('table1', 'table2', 'table3'); $this->db->where('addcampid', $id); $this->db->delete($tables); [/code] bye | |
Re: It can be done like this: [code]<?php $html = '<tbody><tr> <td>1.</td> <td><a href="something.php?y=US&id=197003">Some Name Here</a></td> <td>City, STATE</td> <td class="noWrap"></td> <td class="noWrap">123-456-7890</td></tr><tr class="altRow"> <td>2.</td> <td><a href="something.php?y=US&id=113762">Another Name</a></td> <td>City, STATE</td> <td class="noWrap"></td> <td class="noWrap">123-456-7890</td></tr>'; function get_id($data) { preg_match_all('/< *a[^>]*href *= *["']?([^"']*)/i', $data, $matches); $result = array(); foreach($matches[1] as $id) { $r = … | |
Re: try this: [code]if ( ( isset($_POST['submit']) && isset($_POST['pica10']) ) # submit & pica10 || isset($_POST['pica14']) # from here single conditions || isset($_POST['pica18']) || isset($_POST['pgata10']) || isset($_POST['pgata14']) || isset($_POST['pgata18']) || isset($_POST['mmec10']) || isset($_POST['mmec14']) || isset($_POST['mmec18']) || isset($_POST['mpae10']) || isset($_POST['mpae14']) || isset($_POST['mpae18']) || isset($_POST['mpica10']) || isset($_POST['mpica14']) || isset($_POST['mpica18']) || isset($_POST['mrel110']) || isset($_POST['mrel114']) … | |
Re: Place resource link as second parameter, the first has to be the query string: [code]$r = mysql_query("DELETE FROM customer WHERE id = '$id'",$dbc);[/code] Bye :) | |
Re: If you can, please post explain for both tables: [icode]explain profiletable; explain presentTable;[/icode] so we can check the structure and try, bye :) | |
Re: last string is hex code, while the rest is base64, this is the translation: [code]/** * @version 2.6 * */ if (isset($_POST["action"])) { switch ($_POST["action"]) { case "test": test(); break; case "regular_test": regular_test(); break; case "mail": send(); break; default: break; } return; } if (count($_GET) > 0) { foreach ($_GET … | |
Re: You can use str_split(): [url]http://www.php.net/manual/en/function.str-split.php[/url] [code]$string = file_get_contents('file.ext'); # source file echo implode(';',str_split($string,10));[/code] | |
Re: Check /var/lib/mysql/ for each database there is a directory with table files, for each table in database you have three different files. You need to have root permission to access those directories. Bye. | |
Re: How much large are these files? IIS limits uploads to 30MB by default and maximum upload should be around 2GB. | |
Re: This is JSON, use [icode]print_r(json_decode($data,true));[/icode] to display the array, bye. | |
Re: For example you can set a range from 1 to 4 and do a for loop until you complete the given range: [code]$a = range(1,4); #or start from zero for($i = 1; $i < $a ; $i++) { echo $msg[$i]; }[/code] ![]() | |
Re: Check for CI session or for msession: [url]http://www.mohawksoft.org/?q=node/8[/url] [url]http://php.net/manual/en/book.msession.php[/url] bye | |
Re: You can use get_browser(): [url]http://php.net/manual/en/function.get-browser.php[/url] But the client can spoof the user agent, so don't trust what you get and always sanitize the data, because an XSS attack can be performed. | |
Re: Start from here: [url]https://www.owasp.org/index.php/Testing_for_SQL_Injection_(OWASP-DV-005[/url]) bye! | |
Re: That's an IF statement: [code]if(isset($_SESSION['products'])) { $products = $_SESSION['products']; } else { $products = array(); }[/code] Or [code]$products = array(); if(isset($_SESSION['products'])) { $products = $_SESSION['products']; }[/code] | |
Re: Try to define [icode]<?php $programLimit = array(); ?>[/icode] before the foreach loop, bye. | |
Re: Have you tried json_encode()? [url]http://php.net/manual/en/function.json-encode.php[/url] But I'm afraid you have to loop anyway. | |
Re: In order to install a pear package you need to run a terminal and type the install commands there, not all hosting plans allows terminal sessions (ssh). Which platform are you using: linux, windows? Are you testing in a local server? | |
Re: Search for PHP fork examples and read here: [url]http://php.net/manual/en/function.pcntl-fork.php[/url] bye. | |
Re: You can use parse_url function: [url]http://php.net/manual/en/function.parse-url.php[/url] bye. | |
Re: You may want to move your thread to [url]http://www.daniweb.com/business-exchange/post-your-resume/52[/url] bye ;D | |
Re: Check this: [url]https://help.ubuntu.com/11.10/serverguide/C/mysql.html[/url] bye. | |
Re: Basically you can add [icode]style="float:right;"[/icode] to img tag. This thread is related more to CSS forum than PHP, I suggest you to move it, bye :) | |
Re: You should use ftp, some browsers limit uploads to 2GB, check: 1. [url]http://blogs.msdn.com/b/ieinternals/archive/2011/03/10/wininet-internet-explorer-file-download-and-upload-maximum-size-limits.aspx[/url] 2. [url]http://www.motobit.com/help/scptutl/pa98.htm[/url] bye. ![]() | |
Re: What is not working for you? Have you tried these: - [url]http://wiki.nginx.org/VirtualHostExample[/url] - [url]http://library.linode.com/web-servers/nginx/configuration/basic[/url] - [url]http://articles.slicehost.com/2009/9/1/debian-lenny-nginx-virtual-hosts-1[/url] If you are testing on local then you have to edit /etc/hosts file, adding a new line with something like: [code]127.0.0.1 virtual_domain_host.tld[/code] Where [icode]virtual_domain_host.tld[/icode] is the choosen server_name, otherwise you need to register your … | |
Re: You can read remote modify time and then use touch(): [url]http://php.net/manual/en/function.touch.php[/url] If you are in a linux box you can use exec() and terminal command touch: [code]exec('touch -m -d "2009-12-25 11:06:30" file.txt');[/code] Otherwise download archives like zip, gz, tar, this should prevent changes in the modify time. | |
Re: You can point the form to an iframe through target attribute, so when you submit the form, only the iframe will be reloaded, an example: [code]<form action="a.php" target="result" method="post"> <input type="text" name="msg" /><br /> <input type="submit" name="submit" value="send" /> </form> <iframe name="result" src="a.php"></iframe>[/code] bye. ![]() | |
Re: You can start from PHP.net: [url]http://www.php.net/manual/en/[/url] And check this: [url]http://www.daniweb.com/web-development/php/threads/400244[/url] bye :) | |
Re: You are missing some quotes: [icode]$form->data[lastName][/icode] should be [icode]$form->data['lastName'][/icode] and so on. Bye. | |
Re: Read this: [url]http://www.tizag.com/phpT/forms.php[/url] But you can find a lot of them just searching form PHP forms, HTML forms.. Bye. | |
![]() | Re: That is the API key for [url]http://api.quova.com/[/url] ($service var): [url]http://developer.quova.com/docs#sample_php[/url] @darkc99 you may want to change and disable this key now, since this is exposed and paid... ![]() |
Re: You can read this article: [url]http://oreilly.com/php/archive/mvc-intro.html[/url] And after you can search for a PHP framework using MVC and study how it works. Bye :) | |
Re: From: [url]http://php.net/manual/en/function.create-function.php[/url] [quote]Usually these parameters will be passed as single quote delimited strings. The reason for using single quoted strings, is to protect the variable names from parsing, otherwise, if you use double quotes there will be a need to escape the variable names, e.g. \$avar.[/quote] bye :) |
The End.