2,113 Posted Topics

Member Avatar for arjay1

There is also the **strong** tag inside the href attribute: http://www.famaspain.com/<strong>dogfactstemplate.php</strong>?name=$name Remove it: http://www.famaspain.com/dogfactstemplate.php?name=$name

Member Avatar for arjay1
0
475
Member Avatar for Edwinner

Use `AND` `OR` not comma. The logical operators available for MySQL are these: http://dev.mysql.com/doc/refman/5.0/en/logical-operators.html So your query becomes: $query = "SELECT * FROM customers WHERE firstname = '$firstname' AND lastname = '$lastname'";

Member Avatar for cereal
0
132
Member Avatar for Edwinner

Change line 5 and 6: $query = "SELECT * FROM customers WHERE firstname = '$firstname'"; $result = mysql_query($query);

Member Avatar for Edwinner
0
184
Member Avatar for cossay

In case you want to use a different name, it can also be used an alias: $this->load->model('Model_name', 'admin_user'); $this->admin_user->something(); http://ellislab.com/codeigniter/user-guide/general/models.html#anatomy

Member Avatar for cossay
0
181
Member Avatar for lewashby

There is also the zip command: zip my_archive -r directory_to_zip/ will create my_archive.zip

Member Avatar for cereal
0
146
Member Avatar for omar4288

Use backticks for table and field names, and quotes only for values as here: $sql ="SELECT * FROM `task_2` WHERE `username` = '$myusername' and `password` = '$mypassword'"; bye!

Member Avatar for cereal
0
211
Member Avatar for mrnutty

Yup, it's pretty simple: <?php function gravatar($email,$size = 75) { $avatar = md5(strtolower(trim($email))); return '<img class="avatar" src="http://www.gravatar.com/avatar/' .$avatar.'.jpg?d=identicon&s='.$size.'" alt="avatar" />'; } echo gravatar('random@mail.tld'); ?> It returns an image even if there's no registration there.

Member Avatar for mrnutty
0
231
Member Avatar for skliz
Member Avatar for mehnihma

Add `CURLOPT_RETURNTRANSFER`: curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); And try `simplexml_load_string` here: $xml = simplexml_load_file(utf8_encode($xml_url), 'SimpleXMLElement', LIBXML_NOCDATA); bye!

Member Avatar for mehnihma
0
2K
Member Avatar for Aaron_JY

Try to change quotes with backticks in the field names of the INSERT statement, as here: $req = "INSERT INTO $tablename(`$tablecol`) VALUES ('$tablecoldat')"; Also, to catch an error use `mysql_error()` at least in this stage: mysql_query($req, $connection) or die(mysql_error());

Member Avatar for Aaron_JY
0
173
Member Avatar for ska_defender

**@ska** check this: http://sourceforge.net/projects/php-proxy/ **But** if you set a proxy in your website to redirect youtube, you and the other users should also connect to it through a proxy or a VPN, so that authorities cannot trace your activity. Read this as reference: http://en.rsf.org/fighting-cyber-censorship-12-09-2012,43366.html

Member Avatar for cereal
0
832
Member Avatar for Fiorentino01^

Change this: <?PHP $username = $_POST['username']; print($username); ?> to: <?php if($_SERVER['REQUEST_METHOD'] == 'POST') { $username = $_POST['username']; print($username); } ?> and it should work, bye!

Member Avatar for Fiorentino01^
0
256
Member Avatar for Noth

Yup, add quotes to **$recover_password**: mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username' AND `recover_password` = '$recover_password'")

Member Avatar for urtrivedi
0
199
Member Avatar for daniel36

> This function sorts an array. Elements will be arranged from lowest to highest when this function has completed. source: http://php.net/manual/en/function.sort.php

Member Avatar for cereal
0
164
Member Avatar for Vincentas

Also, if you want to resend passwords then create a new one automatically, or use AES_ENCRYPT / AES_DECRYPT in MySQL, change the password field to text or blob as in this example: CREATE TABLE `users_test` ( `id` int(9) NOT NULL AUTO_INCREMENT, `username` varchar(255) NOT NULL, `password` blob NOT NULL, `password_hash` …

Member Avatar for cereal
0
169
Member Avatar for dinhunzvi

@lixamaga it's not safe because a user can disable javascript and submit malicious data, a server side filter, as blocblue suggested, is a necessary requirement.

Member Avatar for dinhunzvi
0
166
Member Avatar for Dani
Member Avatar for Lonestarjack

The first problem is `$xx` which is a string: var_dump($xx); # output: string(5) "$_GET" if you want to assign _GET as variable name then use `$$` as: $xx = '$' . $value; var_dump(${$xx}); # output: Notice: Undefined variable: $_GET but as seen, this is not enough, so change it to: …

Member Avatar for cereal
0
155
Member Avatar for cgull

You are missing the `echo` in the first group: <label for="accommodationYes" class="accomm" id="accommY"> <input name="accommodation" type="radio" id="accommodationYes" style="display:none;" value="Yes"<?php echo set_radio('accommodation', 'Yes'); ?>> <span class="custom radio"></span> Yes </label> <label for="accommodationNo" class="accomm" id="accomN"> <input name="accommodation" type="radio" id="accommodationNo" style="display:none;" value="No"<?php echo set_radio('accommodation', 'No'); ?>> <span class="custom radio"></span> No </label> __EDIT__ You don't …

Member Avatar for veedeoo
0
4K
Member Avatar for joshmac

Also, since you are querying a specific `mID` and then grouping by the same field, it's correct to get just a row. So try to change the `GROUP BY` clause. Bye!

Member Avatar for joshmac
0
229
Member Avatar for joshl_1995

You should get the file list inside the directory to delete, loop ftp_delete() for each and ftp_rmdir() for each subdirectory, but they need to be empty as the main directory to delete. So it's a bit tricky, the functions you need to use are: ftp_delete() ftp_nlist() ftp_rmdir() http://php.net/manual/en/ref.ftp.php You can …

Member Avatar for cereal
0
388
Member Avatar for developer707

You can use GeoIP library, for example: $countrycode = geoip_country_code_by_name($_SERVER['REMOTE_ADDR']); $loc = '/default/contents'; switch($countrycode) { case 'FR': $loc = '/fr/contents'; break; case 'IT': $loc = '/it/contents'; break; case 'US': $loc = '/us/contents'; break; } header('Location: '.$loc); at that point you can also place a cookie to switch automatically each time …

Member Avatar for cereal
0
407
Member Avatar for sainigks

Hello, if you are not referring to remote identification then try **php_uname()**: http://php.net/manual/en/function.php-uname.php echo php_uname(); there is also **posix_uname()** which returns the same information into an array format, but I'm not sure if it works on Windows without one of these: http://en.wikipedia.org/wiki/POSIX#POSIX_for_Windows print_r(posix_uname()); but in any case, as LastMitch wrote, …

Member Avatar for pritaeas
0
551
Member Avatar for luddite

Try: $andy->load_Array(array("andy","bill")); right now you are sending two arguments, otherwise use **func_get_args()**: http://php.net/manual/en/function.func-get-args.php Also instead of `var $element` use private|protected|public: public $element; bye!

Member Avatar for luddite
0
200
Member Avatar for ebc3142
Member Avatar for Fiorentino01^

Have you tried to use **mysqladmin**? mysqladmin -uroot password your_password -h localhost If you are using Windows browse to the directory which contains the tool and add the extension **.exe** to mysqladmin command, it should be something like `cd \Program Files\MySQL\MySQL server5.0\bin` and then: mysqladmin.exe -uroot password your_password -h localhost …

Member Avatar for drjohn
0
356
Member Avatar for lewashby

You can use cryptsetup: http://code.google.com/p/cryptsetup/ Here there is a tutorial for external drives: https://help.ubuntu.com/community/EncryptedFilesystemsOnRemovableStorage bye!

Member Avatar for lewashby
0
168
Member Avatar for kshahnazari

Here there's the example of PHP manual: http://php.net/manual/en/curl.examples-basic.php <?php $ch = curl_init("http://www.example.com/"); $fp = fopen("example_homepage.txt", "w"); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); fclose($fp); ?> but you can do the same with [**file_get_contents()**]( http://php.net/manual/en/function.file-get-contents.php) and [**file_put_contents()**](http://php.net/manual/en/function.file-put-contents.php): $url = 'http://www.example.com/'; $page = file_get_contents($page); file_put_contents('example_homepage.txt',$page);

Member Avatar for pritaeas
0
375
Member Avatar for LavanyaMahes

It's a bit old but you can download it from here: http://mirrors.fedoraproject.org/publiclist/Fedora/9/

Member Avatar for cereal
0
72
Member Avatar for davy_yg

You are missing the `$` sign in front of the variable name, change it to `$username`, bye!

Member Avatar for broj1
0
225
Member Avatar for Whilliam

In practice you need a web crawler and from that the ability to search contents, there are some ready solutions for these tasks, you can check for Sphider: http://www.sphider.eu/docs.php#commandline Or read here: http://www.daniweb.com/web-development/php/threads/365235/create-a-php-spider bye!

Member Avatar for cereal
0
96
Member Avatar for shuka79

Works fine for me, maybe it's the **$dir** variable? As suggestion use `print_r()` on line 11, just before the while loop, to check the **$files** array: print_r($files);

Member Avatar for shuka79
0
175
Member Avatar for pritaeas

Hello, I still didn't tested Laravel but it seems interesting. While searching I've found this blogpost which is enough explanatory, at least in comparison to CI: http://philsturgeon.co.uk/blog/2012/12/5-things-codeigniter-cannot-do-without-a-rewrite A good point is the support for composer packages: http://getcomposer.org/

Member Avatar for cereal
0
189
Member Avatar for GlenRogers

First this is wrong: if ($sql = $s){ here you are assignin a value, not comparing, to compare use `==` or for boolean `===`, so rewrite it to: if ($sql == $s){ Second, I don't see `$sql` declared anywhere, you will get an error here. Third, you have to extract …

Member Avatar for AARTI SHRIVAS
0
2K
Member Avatar for AARTI SHRIVAS
Member Avatar for cereal
0
208
Member Avatar for <M/>

Same problem here. By the way, I don't know if this was already the behave: it seems **Business Exchange** requires log in.

Member Avatar for <M/>
0
251
Member Avatar for kishoresai438

If you can, change the **DocumentRoot** in the Apache httpd.conf file or inside the virtual host configuration file: DocumentRoot /var/www/website/abc http://httpd.apache.org/docs/2.2/urlmapping.html#documentroot

Member Avatar for Dani
0
109
Member Avatar for cristian.stilpeanu.3

You can use the function **gethostbyname()**: http://www.php.net/manual/en/function.gethostbyname.php bye!

Member Avatar for tamilabisarva
0
164
Member Avatar for OsaMasw

Have you tried **pathinfo()**? http://php.net/manual/en/function.pathinfo.php

Member Avatar for OsaMasw
0
134
Member Avatar for zalexy

As already suggested elsewhere change: $db['default']['hostname'] = "//localhost/"; to: $db['default']['hostname'] = "localhost"; bye.

Member Avatar for zalexy
0
2K
Member Avatar for saadi06

This kind of libraries usually are very strict, so if there's something wrong in your HTML then it will break with an error like yours. It will be more useful if you paste here the code of your page. In addition, as suggestion, get the HTML output and try to …

Member Avatar for diafol
0
1K
Member Avatar for cereal

Hello, when I try to enter to the **PHP forum** (but also in the others under **Web Development** section) I get redirected to a malformed url: http://www.daniweb.com-development/php/17 I tried also with curl: curl --head http://www.daniweb.com/web-development/php/17 HTTP/1.1 301 Moved Permanently Date: Tue, 18 Dec 2012 15:31:11 GMT Server: Apache/2.2 Location: http://www.daniweb.com-development/php/17 …

Member Avatar for diafol
2
267
Member Avatar for LONGWAY

It seems **$FileHash** variable is false or not valid. Echo that and check if the path is correct.

Member Avatar for LONGWAY
0
466
Member Avatar for rjony321

Change line 14 in your controller, from this: $data['result'] = $this->user_admin_model->saveItInsInfoByUser($user_id); to this: $data['result'] = $this->user_admin_model->selectItinfoByUserId($user_id); bye!

Member Avatar for cereal
0
318
Member Avatar for cssweb

Also consider you can get some collisions with **rand()** and overwrite previously existing files. Add a check for existing files and, in that case, rename the new one again.

Member Avatar for diafol
0
206
Member Avatar for kiLLer.zoh

I cannot help you much on this but try **COM Library**: http://php.net/manual/en/book.com.php Use this article as reference: http://devzone.zend.com/238/com_dotnet/

Member Avatar for Atli
0
554
Member Avatar for ganesh641

It seems you are redirecting to a blocked directory, are you using **.htaccess** file to limit access?

Member Avatar for cereal
0
83
Member Avatar for rocky anish

It depends on the options you choose: you can use the entire disk, just free space or a specific partition; in any case it's best to backup data before performing an installation.

Member Avatar for JySysAdmin
0
104
Member Avatar for daniel36
Member Avatar for gon1387
0
120
Member Avatar for shihab2555

I'm not sure to understand what you need but you could add a primary key with both fields: alter table staff_info add primary key('fieldA','fieldB'); just make sure these are less than 1000 bytes and not nullable; if the same value combination is submitted the query will fail for duplicate entry. …

Member Avatar for vgaldikas
0
169

The End.