2,113 Posted Topics

Member Avatar for rchawdhari

If the invoice numbering goes, for example, from 2009/04/01 to 2010/03/31 then the column year should take both years or the full date string, something like: 2009-2010 Or: 20090401-20100331 Then it can work as you desire: create table invoices( years char(9) not null, invoice_number int unsigned not null auto_increment, primary …

Member Avatar for cereal
0
1K
Member Avatar for iConqueror

Hi, dont' use `+` to concatenate strings like in javascript, use dots: die ("Cannot delete data from the database! " . mysql_error());

Member Avatar for diafol
0
277
Member Avatar for mokshi

> I need to generate six tables one by one but i am not able to generate with proper alignment its running out of page Hi, can you provide some sample data, for example how the array in `$data2` is structured, and a screenshot or a generated PDF could be …

Member Avatar for cereal
0
663
Member Avatar for brugernavn

Hi, this happens in Javascript and PHP when using float numbers, to avoid this problem you can use the **BC Math** library: echo bcdiv(bcmul(47.60, 554.82), 100, 2); Which returns `264.09`, the third argument of `bcdiv()` is rounding to the second decimal. If you want `264` then remove the third argument: …

Member Avatar for brugernavn
0
622
Member Avatar for ultmt.punisher

Those are control words, used as the HTML tags to give formatting to the document. If you want to convert the above to plain-text then try this library: - https://github.com/joshribakoff/rtf Regarding `application/octet-stream` this is a generic mime used for binary data, you can get an `.exe` as a `.doc` with …

Member Avatar for ultmt.punisher
0
489
Member Avatar for davy_yg
Re: form

**@AndrisP** By the way, do not use `$_SERVER['HTTP_HOST']` because it can be set by the client header request, it's not a value set by the server, so it can be dangerous. Bye!

Member Avatar for cereal
0
175
Member Avatar for Sharmilamega

Hi, if you're referring to the execution time of a PHP script, then change the value of `max_execution_time`: * http://php.net/manual/en/info.configuration.php#ini.max-execution-time The value can be modified at PHP level through the function `ini_set()`, or by editing your **php.ini** file. Default is 30 seconds. If the problems starts while submitting the input, …

Member Avatar for cereal
0
62
Member Avatar for jaspertan

Hi, you can include it via composer, in your shell write: composer require lightopenid/lightopenid:dev-master Or edit **composer.json** and to `require` add: "lightopenid/lightopenid": "dev-master" And perform `composer update` from the terminal. I didn't tested, but it should work like this: Route::get('/openid', function() { $opID = new LightOpenID('yourdomain.tld'); if( ! $opID->mode) { …

Member Avatar for cereal
0
434
Member Avatar for faisal.qureshi.7121614_1

If you simply paste the url into the html output, then it will be the client (i.e. the browser of the user) to execute the request to the remote server, your server in this case won't be involved. But there are at least two problems with your approach: 1. a …

Member Avatar for cereal
0
189
Member Avatar for ultmt.punisher

Hi, check the `name` index: $_FILES['datafile']['name'] Below you can read the full array structure returned by `$_FILES`: * http://php.net/manual/en/features.file-upload.post-method.php

Member Avatar for cereal
0
260
Member Avatar for silent lover

Hello, first, are you sure your script can access the link? Because from the browser, it displays fine, but from script it returns error 503, that's due to a restriction. I had to set a **user agent** through a stream context to the `file_get_contents()`: // Create a stream $opts = …

Member Avatar for silent lover
0
308
Member Avatar for Siberian

By the way, use another website for the check: Google doesn't allow to be embedded into external frames and if you load the javascript console, you'll see the reason: Refused to display 'https://www.google.com/?gws_rd=ssl' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN' It depends on the `X-Frame-Options` header. Whenever a …

Member Avatar for Siberian
0
344
Member Avatar for adebayo23

Hi, let me understand: do you want an autocomplete function over an input text field? Or a select dropdown? Also, can you show the form?

Member Avatar for wikit
0
312
Member Avatar for Inspiron

It generally happens when you output something before the `header()` function, for example: <?php echo 'hey!'; header('Location: /'); You should write your script to avoid these situations or, if you can modify your php.ini, then you can change the `output_buffering` directive to `4096` or to `On`, for more information check …

Member Avatar for almostbob
0
122
Member Avatar for davy_yg

Change `post_max_size`, default is 8MB and by conseguence modify also `memory_limit`, it must be higher than `post_max_size`: * http://php.net/manual/en/ini.core.php#ini.post-max-size

Member Avatar for cereal
0
249
Member Avatar for Dani

It's not cool to kick trashcans Dani :p I hope you'll get better soon!

Member Avatar for <M/>
0
367
Member Avatar for hriti

*Sounds* like you've reached the size limit. Check the contents of `$_FILES` array by placing this at the top of your upload script: die(print_r($_FILES)); Then check the value of the index key `error`, if you get `0` there's no errors, so you will may want to paste your code here. …

Member Avatar for cereal
0
267
Member Avatar for wikit

Try with the flow control function `CASE`: * http://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html#operator_case I don't know your table structure, so here's an example: * http://sqlfiddle.com/#!2/a9e87/3 Bye!

Member Avatar for wikit
0
312
Member Avatar for joshl_1995

Try with `appendImages()`, like in this example: <?php $list = array( './i/001.jpg', './i/002.jpg', './i/003.jpg', './i/004.jpg' ); # first image to start Imagick() $im = new Imagick($list[0]); $ilist = array(); # loop the others for($i = 1; $i < count($list); $i++) { $ilist[$i] = new Imagick($list[$i]); $im->addImage($ilist[$i]); } $im->resetIterator(); $combined = …

Member Avatar for cereal
0
3K
Member Avatar for khurram123

First problem: <p>Budget<br /> <input id="subject" name="subject" class="text" /> </p> <p>Nature of Business<br /> <input id="subject" name="subject" class="text" /> </p> Here you have two input fields with same **id** and the same **name**, you can use the same name, as long you use an array `name=subject[]` but it's better to …

Member Avatar for cereal
0
228
Member Avatar for hallianonline

It seems possible by adding a filter, read the documentation: * http://codex.wordpress.org/Custom_Queries * http://codex.wordpress.org/Function_Reference/add_filter * http://codex.wordpress.org/Plugin_API/Filter_Reference * http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_orderby

Member Avatar for hallianonline
0
252
Member Avatar for SimonIoa

Hi, have you tried this? * http://jqueryui.com/autocomplete/ * http://api.jqueryui.com/autocomplete/

Member Avatar for DJBirdi
0
231
Member Avatar for ghosh22

Hi, if you choose PHP then use variables, for example: <p>Client Name: <?php echo "$firstname $lastname"; ?></p> To assign the values to the variables `$firstname` and `$lastname` you can use the input submitted by a form: <form method="post" action="document.php"> <label for="firstname">Firstname:</label> <input type="text" name="firstname" /> <br /> <label for="lastname">lastname:</label> <input …

Member Avatar for cereal
0
213
Member Avatar for DJBirdi

In addition read this thread: * http://www.daniweb.com/web-development/databases/threads/473598/is-better-store-images-in-a-blob-or-in-directories

Member Avatar for JorgeM
0
232
Member Avatar for Hilal2009

You can save the datetime as UTC in the `posts` table, and then convert it to the user timezone, basing on his profile preferences. For example: <?php $times = DateTimeZone::listIdentifiers(); $utc = key(array_slice($times, -1, 1, TRUE)); $getTZ = array_key_exists('tz', $_GET) ? (int)$_GET['tz'] : $utc; # generate list of timezones $list …

Member Avatar for diafol
0
5K
Member Avatar for mexabet

Hi, It seems you're using some **user defined** functions: `apologize()`, `query()`, `render()` and `redirect()` are not PHP functions, so we cannot help much. Check the included file at the top of the script, it should contain those functions and the instructions on their results. Anyway, on line `51` you wrote: …

Member Avatar for cereal
0
345
Member Avatar for accra

Hi, try to append the query string to the action of the form: <form method="post" action="receiving.php?<?php echo $_SERVER['QUERY_STRING']; ?>"> Or use an hidden input field: <input type="hidden" name="code" value="<?php echo $_SERVER['QUERY_STRING']; ?>" /> But in this last case, then check for `$_POST['code']` instead of `$_GET['code']`. Or, if you're using `$_SESSION`: …

Member Avatar for cereal
0
458
Member Avatar for mc3330418

If the condition doesn't match then redirect with an error message, for example: <?php session_start(); if($_POST['submit']) { $db = /* connection to database */ $stmt = $db->prepare("SELECT username FROM users WHERE username = ?"); $stmt->execute(array($_POST['username'])); $row = $stmt->fetch(PDO::FETCH_NUM); # if FALSE then the username does not exists if($row === false) …

Member Avatar for almostbob
0
242
Member Avatar for nadiam

Place `session_start()` on top of this script otherwise `$_SESSION` won't be loaded and the IF statement will return false. Bye!

Member Avatar for cereal
0
561
Member Avatar for garyjohnson

From your panel you should be able to set up a redirect, check this: * http://support.hostgator.com/articles/cpanel/url-redirect-how-to-create

Member Avatar for vps9.net
0
194
Member Avatar for Excizted

Hi, can you paste an output hash? For example, I tried this: * http://runnable.com/U7VgPEukzj4rsw6n/java-hash-test And it returns the same hash of `md5()` in PHP: echo md5("hello"); // 5d41402abc4b2a76b9719d911017c592 But I don't know JAVA well, so my example could be wrong.

Member Avatar for Excizted
0
1K
Member Avatar for learner001

Hi, the query at line `18` is not correct because you're going to set `1` to the `unfavorite` column, no matter what is the value of `$_REQUEST['favorite']`. Try to avoid `$_REQUEST` and use `$_POST` or `$_GET`, otherwise the script can receive input from different sources: cookies, post & get requests. …

Member Avatar for learner001
0
1K
Member Avatar for Chirag_97

As Pritaeas asked, did you got errors? Maybe I'm missing a point, but I'm taking some samples from [here](http://samples.mplayerhq.hu/SWF/) and it seems I can convert swf files without any problems, both with `ffmpeg` and `avconv`: ffmpeg -i source.swf out.mp4 avconv -i source.swf -b 128k output.mp4 Also you can list supported …

Member Avatar for pewaltersgo
0
7K
Member Avatar for Ventech_IT

Remove all the spaces at the left side of `EOF;` and then go to a new line, so remove also any spaces after `EOF;`, so: <?php require_once 'config.php'; $title = "Home!"; $content = <<<EOF <h3>Current Statistics</h3> Our Home Page! EOF; include 'layout.php'; ?> From documentation: > The closing identifier must …

Member Avatar for cereal
0
545
Member Avatar for ms061210

Hi, can you show the form? Looking at the array output, it seems most of the values are under the index key `txtbox` while only the first is under `txt` which is the one you're trying to loop: array(4) { ["txt"]=> array(1) { [0]=> string(5) "item1" } ["qty"]=> array(1) { …

Member Avatar for cereal
0
108
Member Avatar for jKidz

Look at `group_concat()` in MySQL: * http://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html#function_group-concat To create a query like this: select s.name, group_concat(sa.artist order by sa.artist) as artists from songs s, songartists sa where s.id = sa.sid group by sa.sid; But I would create an `artists` table, so you don't have to repeat the same artist each …

Member Avatar for ms061210
0
221
Member Avatar for showman13

Otherwise use `INSERT ... ON DUPLICATE KEY UPDATE`, you have to create a unique key index: ALTER TABLE tablename ADD UNIQUE KEY(pg_name,mem_id,ct_year,ct_month); Then your insert query becomes: INSERT INTO tablename (pg_name, mem_id, ct_year, ct_month, count) VALUES('page.html', 1, 2014, 7, 1) ON DUPLICATE KEY UPDATE count = count + 1; Docs: …

Member Avatar for cereal
0
330
Member Avatar for hriti
Member Avatar for Priti_P

Try by adding a backslash: mv Abhishek\�_xyz.docx newname.docx Or with double quotes: mv "Abhishek�_xyz.docx" newname.docx Or by using a wildcard: mv Abhish* newname.docx By the way which kind of shell are you using? Bash?

Member Avatar for cereal
0
85
Member Avatar for davy_yg

It's probably due to this: > If you are using MySQL 3.23 or later, you can copy the .frm, .MYI, and .MYD files for MyISAM tables between different architectures **that support the same floating-point format.** And: > If you want to move applications to another machine having a different architecture …

Member Avatar for cereal
0
159
Member Avatar for jaspertan

Are you using Eloquent? If yes, right after you save something call the `id` property, for example: $post = new Post; $post->title = 'Title'; $post->body = 'Bla bla bla...'; $post->save(); $post->id; // <- last inserted id Otherwise use the `insertGetId()` method: $id = DB::table('users')->insertGetId( array('email' => 'john@example.com', 'votes' => 0) …

Member Avatar for jaspertan
0
587
Member Avatar for showman13
Member Avatar for cereal
0
281
Member Avatar for Daemon_CC

Hi, set a slave for the log database, then stop the replication, read the data you need and restart the replication: * http://dev.mysql.com/doc/refman/5.6/en/replication.html

Member Avatar for kgariando
0
210
Member Avatar for computer1

Hi, start from PHP documentation: * http://www.php.net//manual/en/features.file-upload.post-method.php * http://www.php.net/manual/en/features.file-upload.multiple.php Then, if you have difficults, show your code.

Member Avatar for rpv_sen
0
54
Member Avatar for surya32

Hi, to be sure ask to the hosting support, regarding OpenShift check this link: * https://www.openshift.com/developers/openshift-environment-variables it seems you can get the listening IP by echoing few system variables: * OPENSHIFT_<cartridge>_IP * OPENSHIFT_<cartridge>_PORT In practice from ssh run commands like these: echo $OPENSHIFT_APPNAME_IP echo $OPENSHIFT_APPNAME_PORT Source: * http://stackoverflow.com/a/21799762

Member Avatar for JorgeM
0
223
Member Avatar for jaspertan
Member Avatar for iamthwee
Member Avatar for Athirah Yusri

Hi, check line `12` in your config file: the `host` and `dbname` values are hardcoded, change the line with: $db = new PDO("mysql:host={$host};dbname={$dbname}", $username, $password);

Member Avatar for cereal
0
3K
Member Avatar for SimonIoa

Also, each subquery requires an alias, for example: select a.total from (select count(*) as total from tablename) as a; Otherwise you get an error, to see it use `mysql_error()`. In addition try this query: $query=mysql_query("select a.total + b.total as total from (select count(*) as total from message_believe as mb where …

Member Avatar for urtrivedi
0
149
Member Avatar for Ehsan_3

Have you tried `upper()`? Example: select UPPER(CONCAT('CMRC', LPAD(UUID(), 10, '0'))); * http://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_upper

Member Avatar for Ehsan_3
0
1K

The End.