505 Posted Topics

Member Avatar for kartikkp

`date('h', time());` returns the current hour in 12-hour format. The value will therefore always be between 1 and 12. What you're probably looking for is `date('H', time());` which returns the current hour in 24-hour format. Further, your third check `if($newTimeFormat > 21 && $newTimeFormat <= 3)` will never return true. …

Member Avatar for Zagga
0
189
Member Avatar for garyjohnson

The easiest method would be to pass the video name, real or alternate, to the page where it will be played, and then to embed the video. E.g. <a href='uploads/upload/browseplayer.php?video=funny'>funny</a> Then within the `browseplayer.php` script, using the `$_GET['video']` parameter, query the database, find the actual file name and output it …

Member Avatar for LastMitch
0
244
Member Avatar for iamthwee

I think it's reasonable to assume that you should be able to write HTML and CSS from memory, however remembering the older doctypes isn't easy, nor reasonable IMO. You could have always used the HTML5 doctype: `<!DOCTYPE html>`. That's easy to remember. However, in that situation, if they wanted specifically …

Member Avatar for LastMitch
0
232
Member Avatar for Stardemos

No. The values for each row need to be separated with a comma. E.g. `(198,198,1), (199,199,1), ...`

Member Avatar for blocblue
0
88
Member Avatar for paine_today

You could always use a robots.txt file to disallow Google bots indexing the click counter links.

Member Avatar for paine_today
0
618
Member Avatar for <M/>

I'm not familar with the JavaScript library you're using, but if you're willing to consider changing libraries, I know that the jQuery accordion has this functionality built in and is configurable via the init options.

Member Avatar for <M/>
0
164
Member Avatar for LastMitch

I used to use Zend Framework, then started looking at something a bit lighter. I found and have tried Kohana and am presently trying out FuelPHP, which uses the new functionality available in PHP 5.3.

Member Avatar for LastMitch
2
163
Member Avatar for Nirmeen Ased

What level of education are you talking about here? If it's a college graduation project then you shouldn't be working on simple ideas. The project has to merit the qualification it will contribute towards. How about something like: 1. A hosted ecommerce platform 2. A hosted Facebook page platform 3. …

Member Avatar for ryantroop
-1
148
Member Avatar for onofej

The form action should be an absolute or relative path from the webroot directory. Looking at the file path you've included, I would suggest changing your form action to: `<form action="/dia/index.html" method="post">`

Member Avatar for diafol
0
1K
Member Avatar for Violet_82

It's quite difficult to follow your code, with various sections omitted. Could you add an id attribute to each image based on the value of i and j in the loops and use this in the else part of your loop to retrieve the image by id? `$('#image-id').data('value');`

Member Avatar for Violet_82
0
138
Member Avatar for DaveyMoyes

Do you mean you'd like to remove the numbered page links, but leave the previous and next links? If so, you should be able to just delete everything from line 17 - 76 inclusive.

Member Avatar for DaveyMoyes
0
681
Member Avatar for NinjaMediaD

That should be simple enough. Question, are the hashes meant to be numbers, or can they be letters too? How about something like: echo format_serial('EU12345678'); // EU 12345678 echo format_serial('eu abcd1234'); // EU ABCD1234 echo format_serial('EUz34jaMLA'); // EU Z34JAMLA function format_serial($serial) { return preg_replace('/^(eu) ?([a-z\d]{8})$/ie', 'strtoupper("$1 $2")', $serial); }

Member Avatar for NinjaMediaD
0
154
Member Avatar for 417linux

@417linux - You emailed me asking whether a previous thread I'd commenting on regarding dynamic or variable variables was applicable to your problem... The number of times you'll actually need to use dynamic variables is very low indeed. The problem you have is just to preserve a user's selection of …

Member Avatar for 417linux
0
250
Member Avatar for jax001

> Also, all the code must be written by you. Sounds like you have a lot of work to do :) I'd suggest you start by Googling for HTML, CSS, JavaScript and specifically client-side data storage. If you comeback with **specific** questions, I expect members of the forum will help …

Member Avatar for blocblue
0
194
Member Avatar for dante123

You could start by adding the class to the appropriate menu item array: `last-item.php => array('text' => 'Last Item', 'class' => 'last-item'),` The `draw_menu` function will then probably need to be modified. Can you post the code for that function and show what you've tried?

Member Avatar for diafol
0
150
Member Avatar for rakibtg
Member Avatar for rakibtg
0
876
Member Avatar for ajay.motah

If you're loading the page content with AJAX, then the problem might be that the element to which the click event is applied on line #11 no longer exists (i.e. it has been replaced when the page content loaded). Try using the `live` function to bind click events to all …

Member Avatar for blocblue
0
427
Member Avatar for vlowe

Strange. I can confirm that the rules work correctly for me, which would suggest it's a server config issue, rather than a problem with the rules themselves. I had to disable MultiViews to get the rewrite to pass the parameters through, but even without that, it wasn't returning a 404. …

Member Avatar for vlowe
0
230
Member Avatar for haimz
Member Avatar for diafol
0
207
Member Avatar for coreyavis

By "query", are you referring to the length of the value for `p` in the URL? Does the value of `p`, when it doesn't work correspond to the name of another physical file? E.g. if you visit /hello, is there a file called hello.php? Can you provide some example URLs …

Member Avatar for coreyavis
0
766
Member Avatar for bLuEmEzzy

The popup window doesn't display because you're outputting the code, but then redirecting the user to another page. You will need to modify your code to check for an error, and display the popup **OR** perform the redirect.

Member Avatar for blocblue
0
143
Member Avatar for simplypixie

Yes, you can dynamically set the value of instance variables within an object. As best I can determine from the code you have posted, if there is a key called `time` and it has a value, then it should work and be accessible. Can you `var_dump` `$result` on line 3 …

Member Avatar for simplypixie
0
5K
Member Avatar for diafol

How about something like: <?php session_start(); $_SESSION['lang'] = 'en'; $content=<<<CONTENT <p>{{Dyma destun||Here's some (more) text}}</p> <p>{{Cymru||Wales}}</p> ... CONTENT; function translate($content) { $lang = isset($_SESSION['lang']) ? $_SESSION['lang'] : 'en'; $pattern = '/\{\{([^\|\|]*)\|\|(.*)\}\}/'; $replacement = ($lang == 'cy') ? '$1' : '$2'; return preg_replace($pattern, $replacement, $content); } echo translate($content);

Member Avatar for diafol
0
323
Member Avatar for davy_yg

You're passing an id with the value `0`. If you read the definition for the function `empty`, you'll see that 0 is one such value that evaluates as being empty. It will therefore never return true. Can you not use a non-zero value for the id? If not, you could …

Member Avatar for davy_yg
0
217
Member Avatar for dyingatmidnight

In short, you can't do a redirect **and** return a 404. To change the URL, you'll be doing a redirect, which will return a status code of 301 or 302. This could be considered a *soft 404*, rather than a *hard 404*. I believe that Web crawlers however require a …

Member Avatar for dyingatmidnight
0
180
Member Avatar for johndohmen1963

It doesn't work because JavaScript is executed on the client side, and PHP is executed on the server side. You could try using a normal form to post the confirmation back to the server, of if you want it to function asynchronously, you could use AJAX. If using AJAX, I'd …

Member Avatar for Citytech.tester
0
206
Member Avatar for dourvas

Character encoding can be a pain in the proverbial. You could try converting all of content to a single character encoding using the `iconv` function. I would suggest changing if from windows-1253 to UTF-8. Would another alternative option be to try changing the character encoding of the Excel file?

Member Avatar for blocblue
0
130
Member Avatar for abdulkadir.s.mainassara

You've not said which scripting language you're using, so here's an example using PHP. http://www.php.net/manual/en/mysql.examples-basic.php

Member Avatar for PhilEaton
1
54
Member Avatar for Djmann1013

@rotten69 and @simplypixie 'and' and 'or' operators are both perfectly acceptable in PHP. http://php.net/manual/en/language.operators.logical.php

Member Avatar for Djmann1013
0
165
Member Avatar for flourishit

Yes, but WordPress required MySQL. It cannot run on MSSQL. http://codex.wordpress.org/Install_Internet_Information_Services_7.0_and_WordPress_3.0.3_by_Using_the_Microsoft_Web_Platform_Installer_3.0

Member Avatar for baig772
0
158
Member Avatar for weirdCreature7

It's not appearing, because you're rendering content on the current page, then immediately redirecting the user to a different page, before they see the content. <script type="text/javascript"> if(confirm('You entered an incorrect password')) window.location = 'homebody_admin.php'; </script>

Member Avatar for weirdCreature7
0
180
Member Avatar for davy_yg

Your public and private keys aren't valid for the domain. Go back to Recaptcha and create new ones for the current domain, or create universal public and private keys.

Member Avatar for davy_yg
0
1K
Member Avatar for viktor.jiracek.5

The server doesn't have permission to write the file to the target directory. On Linux, you'd need to set the ownership of the directory to the same user as the web server, and the permissions to 755. Unfortunately I don't use Windows, so I'm not sure exactly how to resolve …

Member Avatar for viktor.jiracek.5
0
1K
Member Avatar for memccool

Can you post your database table schema, as it could be that MySQL doesn't understand the input you're passing it for the time field. Based on your code, your time field most likely needs to be a TINYINT, thus accepting values between -128 and 127. If storing time values however, …

Member Avatar for broj1
0
297
Member Avatar for vizz

Building themes for WordPress isn't that difficult. I'd recommend you start by reading the [theme development](http://codex.wordpress.org/Theme_Development) section of the WordPress site. It can also be useful to reverse engineer the one of the default WordPress themes, looking up the functionality of the template tags used. For the about and contact …

Member Avatar for vizz
0
195
Member Avatar for decade

Your array definition isn't quite correct, if you're planning to use that within PHP, rather than defining it for our benefit. It should be: $array = array( 0 => array('value1', 'value2', 'value3'), 1 => array('value4', 'value5', 'value6'), 2 => array('value7', 'value8', 'value9'), ); Where the array keys are optional, but …

Member Avatar for blocblue
0
115
Member Avatar for mtho

Sounds reasonable enough. <?php $advert = true; do { // Output your article HTML if($advert) { // Output your advert } $advert = false; } while($row_getPosts = mysql_fetch_assoc($getPosts));

Member Avatar for mtho
0
101
Member Avatar for jadzrev13

Most likely an error with the SQL query on line 206. Output the query and test it in the MySQL console or PHP MyAdmin.

Member Avatar for ryantroop
0
341
Member Avatar for AmrReflection

I'm not sure how many developers will know both PHP and .NET sufficiently to be able to give you the pros and cons of both languages. Also, asking that question in a PHP forum may skew any responses you receive. Loads of information [here](https://www.google.co.uk/search?q=pros+and+cons+of+asp.net+vs+php&sugexp=chrome,mod=18&sourceid=chrome&ie=UTF-8) though.

Member Avatar for blocblue
0
87
Member Avatar for thecameraman

A couple of basic questions: When you click a link in your email, does it open the link in the same browser in which you were previously signed-in? I ask, because I know I read my email in one browser, and develop in another. Does the script that you're taken …

Member Avatar for thecameraman
0
207
Member Avatar for Squidge

In response to your question, you could use the `strpos` function. However, why not just validate that it's an actual email address? Why do you care if the string contains a @ symbol, if it isn't an email address? It still wouldn't be valid. Have you thought about looking at …

Member Avatar for Squidge
0
205
Member Avatar for Sunday1290

The problem stems from the fact you're not wrapping HTML attribute values in quotes. Replace lines 8 and 9 with the following respectively. echo '<option value="'.$g1.'" selected="selected">'.$g1.'</option>'; echo '<option value="'.$g1.'">'.$g1.'</option>'; Oh, and I also believe line 4 should be as follows, as you're currently comparing the value to the array …

Member Avatar for blocblue
0
110
Member Avatar for Threza
Member Avatar for blocblue
0
289
Member Avatar for adishardis

I'm not quite sure that this would be a maintainable model (one file for every user), but: `include("{$session->username}/file.php");`

Member Avatar for adishardis
0
124
Member Avatar for apanimesh061

> str_pos() returns boolean (TRUE or FALSE) Incorrect. It returns the index (starting from 0) at which the needle was found in the haystack. If the needle wasn't found, it returns false. Hence why you need to test for absolutely equal to false, rather than equal to false to avoid …

Member Avatar for apanimesh061
0
159
Member Avatar for apanimesh061

Bear in mind that URLs can be both absolute and relative. E.g. http://example.com/my/page.html /my/page.html my/page.html You may also need to account for mailto:, tel: and other link types too.

Member Avatar for apanimesh061
0
1K
Member Avatar for newbie26

http://www.lornajane.net/posts/2011/getting-dates-from-week-numbers-in-php

Member Avatar for blocblue
0
286
Member Avatar for brainfo

You've added a custom re-write slug, but have you flushed the rewrite rules? http://codex.wordpress.org/Function_Reference/register_post_type#Flushing_Rewrite_on_Activation You can do this programmatically, as per the link above, or by updating the permalink structure via the admin panel (note you don't need to change anything, just resave).

Member Avatar for blocblue
0
247
Member Avatar for dyingatmidnight

> for($i = 1; $i <= $_POST["files"]; $i++) The problem looks to be with your outer most loop. Without seeing your HTML, I am guessing this should probably be something like: `for($i = 1, $count = count($_POST['files']); $i <= $count; $i++)`

Member Avatar for dyingatmidnight
0
176
Member Avatar for suavedesign

If it's just a background image, with no other arguments, have you tried `background-image:url(images/image.jpg);` I've never known IE7 to take issue with background images before. It's more likely to be a combination of factors causing the issue. Do you have a web accessible link you can provide or could you …

Member Avatar for JorgeM
0
96

The End.