505 Posted Topics

Member Avatar for trektrak

You need to have two distinct processes. One to log in and another to log out. With the approach you have suggested, what if someone forgets to enter the code for a second time to logout? With regard to your database structure, I would suggest a user table, and then …

Member Avatar for trektrak
0
123
Member Avatar for RazorRamon

When defining your database table, typically the unique identifier is a numerical field, where the value automatically increments. MySQL will then keep a track of what the next id number should be based on those it has previously allocated. Auto increment would not reallocate the same id value, unless you …

Member Avatar for diafol
0
170
Member Avatar for davy_yg

I usually use this plugin... [url]http://jquery.malsup.com/cycle/pagerHover.html[/url]

Member Avatar for davy_yg
0
99
Member Avatar for Xufyan

It looks as though it is storing the time against the post, so that the same post is used for an entire day. Another way to achieve something similar would be use the query: [CODE] global $wpdb; $timestamp = strtotime(date('Y-m-d')); $sql = "SELECT * FROM `wp_posts` WHERE `post_type` = 'post' …

Member Avatar for Xufyan
0
956
Member Avatar for ilmkidunya

Binding the onkeypress event to the body tag might do it. And it would only work when the browser window is active But why would you want to? What are you trying to accomplish?

Member Avatar for jimdj
0
800
Member Avatar for uvishere

Three options would be to: 1. Create a [URL="http://codex.wordpress.org/Shortcode_API"]shortcode[/URL], which you could enter into the content field of a normal WordPress page, and that could take the ebook for display on that page as an argument, and then render the flash markup. 2. Create a custom WordPress [URL="http://codex.wordpress.org/Theme_Development"]page template[/URL] and …

Member Avatar for blocblue
0
208
Member Avatar for vedro-compota

The whole point of the web root is that web accessible content should be in the web root or lower. Content above the web root, e.g the server OS and other important files are protected. You can access these protected files via other scripts within the web directory, but you …

Member Avatar for vedro-compota
0
188
Member Avatar for FakeTales

Why not simply add the user type to the query when looking up the username and password? [CODE] $sql= mysql_query("SELECT userID FROM user WHERE username='$superUser' AND password='$password' AND userTypeId = 1 LIMIT 1"); [/CODE]

Member Avatar for blocblue
0
436
Member Avatar for cascer1

You need to start the session before any other output is sent to the browser, because it sends a PHPSESSID cookie in the response headers.

Member Avatar for broj1
0
89
Member Avatar for phorce

This is quite a common question on programming tests... Is that coincidence? :)

Member Avatar for phorce
0
129
Member Avatar for rockyada

The require statements in Zend Framework are relative to the Zend directory. You therefore need to add Zend Framework to your include path: [CODE] set_include_path(implode(PATH_SEPARATOR, array( '/path/to/Zend', get_include_path(), ))); [/CODE] R.

Member Avatar for blocblue
0
128
Member Avatar for stoopkid

What data type is your date field? Varchar? One reason MySQL stores dates in the format YYYY-MM-DD is that it allows the field values to be quickly searched. For example, if searching for values between 26/12/2011 and 09/01/2012, MySQL would be able to discard all fields that start with anything …

Member Avatar for stoopkid
0
94
Member Avatar for bflack

You can only download one file per server response, because you can only send one set of response header. If you want to download multiple, based on which checkbox values are selected, write them to a [URL="http://php.net/manual/en/class.ziparchive.php"]ZIP archive[/URL] and return that instead. R.

Member Avatar for bflack
0
8K
Member Avatar for rotten69

Hi, I think you've answered your last question yourself. PHP session data is stored on the server, although there is a cookie that is stored on the client's machine to tell PHP which session to use. It largely depends on what you need to do with the session data. JavaScript …

Member Avatar for phorce
0
163
Member Avatar for rse

Hi, It's not working because your selector doesn't exist: [CODE] $('#datepicker'); // This means an element with id="datepicker" $('input[name=datepicker]'); // This means an input element with name="datepicker" [/CODE] To resolve, change your selector, or add an id attribute of datepicker to your input field. R.

Member Avatar for rse
0
215
Member Avatar for Shawn.Dohmen

Hi, A couple of options that I can think of are: 1. Disable case sensitivity on Apache. This [URL="http://keystoneit.wordpress.com/2007/02/19/making-apache-case-insensitive/"]article[/URL] might help. 2. Use mod rewrites to redirect requests for lowercase URLs to uppercase, etc. R.

Member Avatar for Shawn.Dohmen
0
270
Member Avatar for opjjuly

Just looking at the calculations you have, you're checking whether the ratio is [B]exactly[/B] equal to 0.8 or 0.7 or whatever. The probability of a user entering measurements that would give you exactly that ratio is very remote. Consider someone having a waist of 30" and hips of 32". That's …

Member Avatar for blocblue
0
162
Member Avatar for jaycastr
Member Avatar for diafol
0
1K
Member Avatar for gunnerone

Did you not like the [URL="http://www.daniweb.com/web-development/php/threads/396257"]answer[/URL] that I posted to this same question yesterday?

Member Avatar for blocblue
0
97
Member Avatar for gunnerone

If you want to take plain text from a textarea, and treat each new line as a separate bullet point, you could store the plain text in the database, and then parse the content as follows when retrieving it: [CODE=php] <?php $bullet_points = explode("\n", $plain_text); ?> <ul> <?php foreach($bullet_points as …

Member Avatar for blocblue
0
1K
Member Avatar for fcvolunteer

Have you confirmed whether the counter value in the database is being incremented? I don't mean to tell you something you might already know, but check the wp_options table, and search by option_name for [I]cf7-counter[/I]. If the value is being incremented, that means you've set up the action correctly. Then …

Member Avatar for fcvolunteer
0
910
Member Avatar for geneh23

As @jogesh pointed out, there is no such function as mysql_results. Drop the [B]s[/B] - [B]mysql_result[/B]. Also, mysql_result only returns false on error, otherwise it returns a MySQL result object, even if no rows are found. You would therefore need to use the mysql_num_rows function to determine whether no results …

Member Avatar for geneh23
0
233
Member Avatar for Eldyvoon

I used the code snippet in this [URL="http://jqueryfordesigners.com/fixed-floating-elements/"]tutorial[/URL] and it worked rather well. Just add jQuery and the JavaScript to your theme and the CSS to your stylesheet. R.

Member Avatar for blocblue
0
46
Member Avatar for jacob21

Do you have the GD library installed on the server where it isn't working?

Member Avatar for jacob21
0
136
Member Avatar for narekm

Why don't you look at the database object from one of the many PHP libraries? E.g. [URL="http://framework.zend.com/manual/en/zend.db.html"]Zend[/URL], [URL="http://docs.kohanaphp.com/libraries/database/builder"]Kohana[/URL], etc? Why re-inventing the wheel?

Member Avatar for diafol
0
266
Member Avatar for gvkatashi01

When the form is submitted, you can access the input value from the POST array: [CODE] var_dump($_POST[$id]); [/CODE] Also, your method for selecting random questions doesn't look too efficient. You're making a separate query for each question. An alternative would be to move the random element into the SQL query. …

Member Avatar for blocblue
0
114
Member Avatar for albo1125

If you're running Apache, and PHP, have you installed and configured mod_php5? This is what essentially links the two and tells the web server to parse the PHP code, rather than just return it.

Member Avatar for SQLpower
0
125
Member Avatar for rajeevphp2011

I assume you need to dynamically add the city id to the navigation item. If you do, then I think you're going to need to write and pass a [URL="http://codex.wordpress.org/Function_Reference/wp_nav_menu"]custom walker[/URL] to the wp_nav_menu function. Also, bear in mind that just because WordPress provides a menu function, it doesn't mean …

Member Avatar for blocblue
0
106
Member Avatar for narekm

HTTP requests in themselves are stateless. The only way to persist data/variables between requests is to persist them in a file (database, session, cookie). The singleton pattern will only work during the same request. So if during a single AJAX request, you get a database instance twice using getSingleton, it …

Member Avatar for narekm
0
447
Member Avatar for baig772

Can you post your code? And you might get more help in the [URL="http://forum.kohanaphp.com"]Kohana forum[/URL].

Member Avatar for baig772
0
93
Member Avatar for omlac

If you write a script to write the data to a file with a .xls extension as an HTML table, it will open in Excel. Then all you need to do is select and iterate through all the tables and rows you want to export from your MySQL database.

Member Avatar for chrishea
0
80
Member Avatar for samsnov

Are you asking how you can use the search term Action, Documentary, etc in the Wordpress search form and for it to display posts filed under the searched category? If so, Wordpress strangely enough doesn't do this by default. Instead, you need to override the search query in Wordpress. This …

Member Avatar for blocblue
0
169
Member Avatar for mwenyenia07

Why not just use a HTML form, with the PHP file path set as the action. Generally, hitting enter in a text field will submit the form. If not, use JavaScript to force form submission when the enter key is pressed.

Member Avatar for blocblue
0
95
Member Avatar for Felipevd

At a guess, I assume your table `Usuarios` has more than just two columns. If so, on line 10, you need to specify the fields for which you're providing values. E.g. [CODE] INSERT INTO table_name (column1, column2, column3,...) VALUES (value1, value2, value3,...) [/CODE] If that still fails, run the query …

Member Avatar for cwarn23
0
223
Member Avatar for jpknoob

Why not try something like: [CODE=php] if($country == 'GB') $delivery = 1.15; elseif(in_array($county, array('AI', 'AD', 'AM', 'AT', 'BY', 'BE')) $delivery = 2.15; else $delivery = 3.15; [/CODE] All, variable names are case sensitive, and strings should be wrapped in single quotes (or double depending on usage). This may help explain …

Member Avatar for jpknoob
0
153
Member Avatar for narekm

I've tried quite a few over the years. I found Notepad++ to be a very simple IDE, which does the basics very well. But I did find that I missed a project/file list. I found Eclipse to be feature packed, but very bloated. Zend Studio is again feature packed, but …

Member Avatar for diafol
0
165
Member Avatar for calebcook

You have just answered your own question. The link you have provided appears to use JavaScript to do exactly what you ask. Why not view the source and extract the code? Otherwise, find the ingredient measurements for a single serving and multiply this value by however many people the recipe …

Member Avatar for calebcook
0
1K
Member Avatar for mary_forum

[CODE=php] header("Location:edit_products.php?catid={$_POST['catidHd']}&catname={$_POST['catnameHd']}"); [/CODE]

Member Avatar for ddymacek
0
1K
Member Avatar for web_master

I'm not too familiar with Joomla, but could you not check the name of the menu being rendered, and if it's the header, use one template, otherwise use the default?

Member Avatar for blocblue
0
88
Member Avatar for mwenyenia07
Member Avatar for blocblue
0
74
Member Avatar for klemme

Have you considered using a JavaScript library, like jQuery or Mootools for performing AJAX and other JavaScript tasks? These libraries perform all of the heavy listing and are thoroughly tested to ensure maximum cross-browser compatibility.

Member Avatar for blocblue
0
199
Member Avatar for titusnainggolan
Member Avatar for iThaos

Do you understand the purpose of object inheritance? Simply, the idea is that when two objects have similar attributes and methods, rather than declare the attributes and methods twice, you can use inheritance - DRY - Don't Repeat Yourself. From the example you have provided, I cannot see why an …

Member Avatar for iThaos
0
214
Member Avatar for Danny159

Hi, Below is a .htaccess file from WordPress. The third and fourth lines check whether the requested path is an actual file or directory. If either returns true, then the rewrite rule will not be followed. [CODE] <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule …

Member Avatar for Danny159
0
132
Member Avatar for gordo58

Unless you've simplified your code for posting it in this forum, and as such some steps are missing, you have gone about the process of redirecting to that URL in a very long winded way. A more succinct method might be: [CODE] include 'connect.php'; $m = (int)$_GET['m']; // Assumed integer …

Member Avatar for gordo58
0
246
Member Avatar for Blitz-labs.com

If you amended your notification links to have their own subdirectory, to something like: [CODE=html] <a href="/report/dead?id=123" title="Report dead link">Report dead link</a> [/CODE] Then you could use a robots.txt file to exclude the /report directory. This should stop robots from indexing any page in that directory. R.

Member Avatar for Blitz-labs.com
0
201
Member Avatar for geekme

You haven't specified the field names in your insert query: [CODE=mysql] INSERT INTO `jlt`(`id`, `name`) VALUES (1, 'example'); [/CODE] And by not escaping your input variables, you're leaving the script open to SQL injection attacks.

Member Avatar for geekme
0
174
Member Avatar for Stefano Mtangoo

My first question would be, why are you writing your own MVC framework? Why do you think you can do it better than any of the other people who have already released frameworks? I'm not asking to be mean, it's a genuine question you need to ask yourself. Could your …

Member Avatar for Stefano Mtangoo
0
399
Member Avatar for Aardwolf

You could do: [CODE=php] $name = $firstName . ' ' . $lastName; $name = "{$firstName} {$lastName}"; $name = "$firstName $lastName"; [/CODE] R.

Member Avatar for karthik_ppts
0
131
Member Avatar for varoluscu_prens

Input fields need to have the attribute name specified, and this is then used as the key for the $_POST array. E.g. [CODE=html] <input type="text" id="name" name="name" /> [/CODE]

Member Avatar for varoluscu_prens
0
187

The End.