2,113 Posted Topics

Member Avatar for Ventech_IT

Hi, at line `10` use `mysqli_error()`: if ( ! $result = mysqli_query($con, $query)) { printf("Errormessage: %s\n", mysqli_error($con)); } It should explain the reason that makes the query return boolean `FALSE`. Docs: http://php.net/manual/en/mysqli.error.php

Member Avatar for cereal
0
212
Member Avatar for lloydsbackyard

In particular search for **autocomplete** scripts, for example this: * http://jqueryui.com/autocomplete/ * http://api.jqueryui.com/autocomplete/ bye!

Member Avatar for lloydsbackyard
0
278
Member Avatar for garyrichard

Create a script, for example **display.php**: $f = $_GET['image']; header("Content-type: image/jpeg"); echo base64_decode($f); Now your link becomes: <a href="display.php?image=<?php echo $img_str; ?>"> <img src="data:image/jpeg;base64,<?php echo $img_str; ?>" width=150 height=150 /> </a>

Member Avatar for cereal
0
2K
Member Avatar for NuGG

It could be line `3` instead of the `json_decode` function, `print_r` requires brackets, so change it to: print_r($data);

Member Avatar for NuGG
0
328
Member Avatar for iamthwee

The stable version is 2.2.0, which is a security upgrade. Version 3.0 is not stable: * http://ellislab.com/blog/entry/codeigniter-2.2.0-released * https://github.com/EllisLab/CodeIgniter/tree/release/3.0 I will try it, however I would wait a stable release before using it in production, bye! :)

Member Avatar for cereal
0
354
Member Avatar for bobgodwin

What if two or more images are the largest? Anyway, here's an example with `glob()`: <?php $f = glob('./path/*.{jpg,png,gif}', GLOB_BRACE); $r = array(); foreach($f as $file) { list($w, $h) = getimagesize($file); $r[$w*$h][] = array( 'name' => $file, 'width' => $w, 'height' => $h ); } $keys = array_keys($r); # all …

Member Avatar for veedeoo
0
387
Member Avatar for ashalatha

Create a unique key in your table scheme and then use a raw query: $row = array( $row['Category Id'], $row['Category Name'] ); $sql = "INSERT IGNORE INTO tablename SET cat_id = ?, name = ?"; $this->db->query($sql, $row); By using `INSERT IGNORE` when a duplicate key is found, it will continue …

Member Avatar for ashalatha
0
3K
Member Avatar for vizz

Regarding PHP try this: <?php $url = $_SERVER['QUERY_STRING']; if($_GET) { if(filter_var($url, FILTER_VALIDATE_URL) !== FALSE) { header('Location: ' . $url); } } Save it, for example, as **noref.php**, then use a link like this: http://yourwebiste.tld/noref.php?http://otherwerbsite.tld I'm not sure it's enough, but I've made few tests and seems to work.

Member Avatar for vizz
0
135
Member Avatar for filipgothic

Hi, define the error you get on line **42** and add `mysql_error()` to this query and to the previous.

Member Avatar for filipgothic
0
228
Member Avatar for garyjohnson

It seems possible, check their documentation: * http://support.hostgator.com/articles/specialized-help/technical/php-email-from-header If you still have problems then paste your code here. Bye!

Member Avatar for jKidz
0
324
Member Avatar for davy_yg

@davy read carefully your script, you have at: line 5: $post_id = isset($_POST['post_id']) ? $_POST['post_id'] : ''; line 14 & 15: if (!empty($_GET['post_id'])){ $result = mysql_query("SELECT * FROM static_page WHERE post_id =".$_GET['post_id']) or die(mysql_error()); line 17: $post_id = $data['post_ID']; line 35: if ( $_POST['post_id'] !=0) line 41: $sqlstr = "UPDATE …

Member Avatar for Topnews
0
395
Member Avatar for ravi142

Try to use the `row()` method: $row = $cnt->row(); $new_cnt = $row->Counter_field + 1; But you could also run a single query: $this->db->query("UPDATE Job_Description SET Counter_field = Counter_field + 1 WHERE id = ?", array($id)); Docs: * http://ellislab.com/codeigniter/user-guide/database/results.html * http://ellislab.com/codeigniter/user-guide/database/queries.html

Member Avatar for cereal
0
139
Member Avatar for jKidz

At line `17` you're closing the paranthesis of the `while` loop, so add another one: } // close while loop } // close if else {

Member Avatar for jKidz
0
258
Member Avatar for Jha_1

Hi, there are few errors here: $query = "SELECT arCompanyname, arAddress FROM ar WHERE $dropdown like'$search'" or die (mysql_error()); $result = mysql_query($query) or die (mysql_error()); $num=mysql_numrows($result); `$query` is a string, so do not include `or die(mysql_error())` otherwise the `mysql_query()` will return `FALSE`. Then, `mysql_numrows()` does not exists, the correct function …

Member Avatar for cereal
0
391
Member Avatar for cilla

Maybe some of those browsers are in quirk mode (a.k.a standard mode). These links are for IE9/10, but it should be similar for IE11 too: * http://windows.microsoft.com/en-us/internet-explorer/products/ie-9/features/compatibility-view * https://www.cs.tut.fi/~jkorpela/quirks-mode.html

Member Avatar for cereal
0
164
Member Avatar for jKidz

Hi, you can use `substr()`: <?php $reportID = 'MPS141'; echo substr($reportID, 5); Will return all the characters after `MPS14`, but you can also create a function to return an array of all the elements of the `reportID`, an example: function reportToArray($id) { $data['CompanyName'] = substr($id, 0, 2); $data['Article'] = substr($id, …

Member Avatar for jKidz
0
189
Member Avatar for itisnot_me

It seems you want to search and replace a string in a json encoded array, correct? If yes, then each element is probably surrounded by quotes, example: $a['blog'] = 'blogtitle'; echo json_encode($a); // outputs {"blog":"blogtitle"} Which is different from `{blog:blogtitle}`, the correct code should be: if($blogname != "") { $r …

Member Avatar for itisnot_me
0
1K
Member Avatar for FakeTales

Have you created separated **virtualhosts** directives for each sub-website? * http://httpd.apache.org/docs/current/vhosts/examples.html * http://httpd.apache.org/docs/current/vhosts/index.html * http://httpd.apache.org/docs/current/mod/core.html#virtualhost

Member Avatar for FakeTales
0
823
Member Avatar for [NOPE]FOREVER

>The only thing I have really found is that a master page is like a template? Yes, but **master page** is a definition for ASP.Net and Visual Studio (I think), in PHP we (or at least, I would) simply talk about templates. * [ASP.NET Master Pages](http://msdn.microsoft.com/en-us/library/vstudio/wtxbf3hh(v=vs.100).aspx)

Member Avatar for Sikander Nasar
0
935
Member Avatar for arafath077

It seems possible, check their documentation: * https://developers.google.com/analytics/devguides/reporting/core/v2/gdataReferenceDataFeed

Member Avatar for cereal
0
119
Member Avatar for iamthwee

You could create a library and use it to pull the constants from the database, for example, here the table: CREATE TABLE `constants` ( `name` varchar(255) NOT NULL, `value` varchar(255) DEFAULT NULL ) ENGINE=MyISAM; insert into constants(name, value) values('blue', '#0000ff'); insert into constants(name, value) values('dodger blue', '#1e90ff'); insert into constants(name, …

Member Avatar for iamthwee
0
4K
Member Avatar for Stefce

The parameters order is: * host * username * password * database name * port * socket Last two are optional, so: mysqli_connect("host","username","password","db_name"); Docs: * http://www.php.net/manual/en/mysqli.construct.php

Member Avatar for cereal
0
136
Member Avatar for moregraphics

I see it in the right side of the page, not to the left. Anyway you could add an `id` to the `td` tag containing the menu, declare it as `position:relative` and then set `top` and `left` for `ul.MenuBarHorizontal` basing on the parent position, so: #mymenu001 { position:relative; } ul.MenuBarHorizontal …

Member Avatar for moregraphics
0
412
Member Avatar for iamthwee

Hi, I don't understand the scheme, how it works the relation between id and parent?

Member Avatar for Alberto Bucur
0
2K
Member Avatar for rakibtg

And search in the forum: http://www.daniweb.com/web-development/php/threads/398419/domain-availability-check

Member Avatar for HelgeSverre
-2
1K
Member Avatar for mark.giles.14

PDO supports many databases, where MySQLi is limited only to MySQL and his forks. MySQLi instead has a better support for MySQL features and it can be used also in procedural style. For more information read the documentation & the comments: * https://php.net/manual/en/mysqlinfo.api.choosing.php

Member Avatar for pritaeas
0
476
Member Avatar for fedaa91

Hello, use this format: data-validation-length="45-60" Example: http://jsfiddle.net/3XYA4/ & docs: http://formvalidator.net/#default-validators_length

Member Avatar for fedaa91
0
381
Member Avatar for ankit1122

Hi, the problem is given by this: $abc=mysqli_query($con, $s) or die('cannot show tables'); if($abc) print_r($s); The function `mysqli_query()` returns `FALSE` on wrong queries, then it returns an `OBJECT` for *SELECT, SHOW, DESCRIBE* or *EXPLAIN* queries, and `TRUE` for other successful queries, like for example an *ALTER* query: $sql = "alter …

Member Avatar for cereal
0
169
Member Avatar for faisal.qureshi.7121614

Use `group by` and count, for example: select count(approved) from pma where approved in(0,1) group by approved; live: http://sqlfiddle.com/#!2/f52df/1

Member Avatar for faisal.qureshi.7121614
0
410
Member Avatar for bukhari.sana

Hi, have you tried these instructions? * http://www.oracle.com/technetwork/java/javase/download-142937.html You must read the **setup instructions** link in the above document. If it still doesn't work for you, please explain the reason, provide the error codes you get, otherwise we cannot help much.

Member Avatar for cereal
0
151
Member Avatar for ankit1122

Yes, you can use multiple submit buttons in your forms: > submit buttons: When activated, a submit button submits a form. A form may contain more than one submit button. and: > If a form contains more than one submit button, only the activated submit button is successful. source: http://www.w3.org/TR/html401/interact/forms.html …

Member Avatar for iamthwee
0
402
Member Avatar for phoenix_2000

Hello, the *Unexpected value translate(NaN,0)* problem seems to be generated by the `range` value: {"range":"0 - 5","percentage":12,"qty":1326} which is used to set the `x` attribute of the `rect` tag: <g transform="translate(37.5,0)"> <rect y="0" x="NaN" height="300" width="36.5"></rect> <text x="1" y="-15.78947368421052" dy=".75em">38%</text> </g> If you change all the values of your array …

Member Avatar for phoenix_2000
0
3K
Member Avatar for filipgothic

Hi, assuming you're using method **GET** for your form, you need to read the value assigned to `$_GET['grupa_select']` and to use it as condition in your select query. So, something like: $values = array( $_GET['grupa_select'] ); $sql = "SELECT * FROM concerts WHERE groupnaziv = ?"; $query = $pdo->prepare($sql); $query->execute($values); …

Member Avatar for filipgothic
0
163
Member Avatar for davy_yg

Have you tried **datepicker** from the JQueryUI package? * http://jqueryui.com/datepicker/ * http://api.jqueryui.com/datepicker/

Member Avatar for cereal
0
35
Member Avatar for garyjohnson

Hi, actually they seem to use the post ID as **local part** of the poster email address. So, they receive an email from a user on their servers and, then, they redirect it to the original email address. It works as a relay. But they also create unique aliases for …

Member Avatar for cereal
0
111
Member Avatar for hiiiiii@

Hi, You can use the `required` attribute: <form method="post" action=""> <label for="fruits">Choose an option:</label> <select name="fruits" required> <option value="">------</option> <option value="fujiapple">Apple</option> <option value="vanillaorange">Orange</option> <option value="pandoracherry">Cherries</option> </select> <input type="submit" name="submit" value="submit" /> </form> By adding an empty option the form will not be submitted. You could also add a javascript check, …

Member Avatar for hiiiiii@
0
157
Member Avatar for mmcdonald

Hello, try with: .dropdown-menu { max-height: 450px; overflow-y: auto; overflow-x: hidden; } Source: * https://github.com/twbs/bootstrap/issues/1989

Member Avatar for mmcdonald
0
673
Member Avatar for dlmagers

Hello, I think the problem is in the `cents` variable, this is modified after each IF statement, but doing: cents = cents%0.25; Will return `0.065` which means `0`, so the other statements will return empty. Try: var calculate_click = function () { var cents = $("cents").value; if (cents > 24){ …

Member Avatar for dlmagers
0
6K
Member Avatar for cilla

Regarding the 500 error, check the error log of your server, an external redirect cannot generate an error like that, unless your server config is accepting some headers set from remote. A part that, if you look at `f`, `c` and `ch` values, these are base64 strings, concatenated by `-` …

Member Avatar for cilla
0
346
Member Avatar for eburlea

The reason is probably given by their PDO library, check lines `266`, `320` and `323`: * https://github.com/zendframework/zf2/blob/a1085b769953be15296c3a4976e026927b5b9584/library/Zend/Db/Adapter/Driver/Pdo/Connection.php#L266 The `$options`, created by the `resources.db.params.driver_options.1002` variable is used as 4th argument in the PDO connection string, for the character set. The `$charset` variable instead is used at line 323: $this->resource->exec('SET NAMES ' …

Member Avatar for eburlea
0
737
Member Avatar for malatamil

Hello, note that you are already overwriting the `$ids` variable on line 18: echo $ids = implode(',', $ids); So, when you try to perform the same action on line 19, you should get a warning like `implode(): Invalid arguments passed...` because it expects an array, and instead it gets a …

Member Avatar for malatamil
0
19K
Member Avatar for mark103

Since in `.htaccess` the rules have a cascading order, for a simple "manual" solution you could save this .htaccess file into the download directory: <Files "*"> order allow,deny deny from all </Files> <Files "Myxmlfilename.xml"> order allow,deny allow from all </Files> This would deny the direct access to all the files, …

Member Avatar for cereal
0
192
Member Avatar for dinhunzvi

You can use their **test mode**: * https://stripe.com/docs/testing bye!

Member Avatar for cereal
0
102
Member Avatar for Sujan Shrestha

Hi, is the URL helper automatically loaded? By enabling the log in CI you should be able to get more information about the error, just check into `application/logs/`. Try also to prefix the redirect link with a slash, for example: redirect('/login');

Member Avatar for Adrian_5
0
2K
Member Avatar for riahc3

In addition, you could try with a UDF. For example: * http://www.xaprb.com/blog/2007/10/30/how-i-built-the-now_usec-udf-for-mysql/ * http://stackoverflow.com/a/8986802 But if you want to save it, you have to use `varchar` instead of a `datetime` column.

Member Avatar for riahc3
0
3K
Member Avatar for tony75

Hello, have you followed the suggestions you have received in your precedent request? http://www.daniweb.com/hardware-and-software/linux-and-unix/threads/474312/compile-windwos-netcat-under-linux If yes, then give us more information about your issue.

Member Avatar for JasonHippy
0
5K
Member Avatar for burt.munn

Hello, you probably want something like this: <?php $temps = range(0, 100); ?> <table> <thead> <tr> <th>Fahrenheit</th> <th>Celsius</th> </tr> </thead> <tbody> <?php if(count($temps) > 0) { foreach($temps as $F) { $C = ($F - 32) * 0.55; echo " <tr> <td>{$F}</td> <td>{$C}</td> </tr> "; } } else { echo " …

Member Avatar for burt.munn
0
237
Member Avatar for Maideen

Hi, the `prepare()` method requires `execute()` not `query()`, so this: $sql = "SELECT * FROM user_right WHERE login_id = '$username' and password = '$password'"; $stmt = $dbh->prepare($sql); $stmt->setFetchMode(PDO::FETCH_ASSOC); if($stmt = $dbh->query($sql)){ ... Should be: $values = array( $username, $password ); $sql = "SELECT * FROM user_right WHERE login_id = ? …

Member Avatar for Maideen
0
371
Member Avatar for iamthwee

You can check the session in the constructor method, for example: class Test extends CI_Controller { public function __construct() { parent::__construct(); # Check the session if($this->session->userdata('is_valid') !== TRUE) { # unset session ... # redirect out redirect('/logout'); } } # other methods public function index() { return 'hello'; } } …

Member Avatar for cereal
0
283
Member Avatar for davy_yg

Hi, drop the table and retry. If it does not work check the status: show engine innodb status\G And verify if there are errors, you could also perform `check table infracom_admin` but this can stop the server, read the documentation before you try. Your issue can happen if you move …

Member Avatar for davy_yg
0
309

The End.