452 Posted Topics

Member Avatar for matthewwhite011

Well hasn't it always been so that there is an "intellectual few" and a "following mass"? "Intellectual" here does not mean "morally just" or anything like that, just clever people. Relatively, do you think there has been any change during "all" those centuries? I don't think that we've either become …

Member Avatar for Reverend Jim
0
962
Member Avatar for minitauros

Someone just notified me that a new free online space provider has launched, called Copy. If you know Dropbox: it's pretty much similar to that for as far as I can see now, only here you get a starting **15GB** for free (instead of 2? at Dropbox). They now have …

Member Avatar for Reverend Jim
0
555
Member Avatar for saadi06

Do you have any *NULL* values in your database? Because then you would have to append "AND value IS NOT NULL" to your query :).

Member Avatar for saadi06
0
203
Member Avatar for Dani

For as far as I can say now: I like the new looks. Only thing is that I find the topic overview pages too busy. I think it is because there are suddenly so many images and colors because all avatars are now shown. A bit too many colors, if …

Member Avatar for Dani
0
2K
Member Avatar for Phaelax

You can store the IP address of the user who is using the form and the time at which the form is submitted. When the form is then submitted again, you can check the time difference between now and the last time the form was submitted, and if that time …

Member Avatar for Atli
0
504
Member Avatar for atiqur_29

On a sidenote I would like to mention that I too have been messing around with my own AJAX scripts for quite some time, until I finally decided to give jQuery a try. It has a couple of AJAX functions built in, and they work like a charm, at least …

Member Avatar for minitauros
0
2K
Member Avatar for websponge

Well if you need only one row, using the mysql extension you could do the following: <?php $query = 'SELECT something FROM table ORDER BY id DESC LIMIT 1'; $result = mysql_query($query) or die(mysql_error()); $fetch = mysql_fetch_assoc($result); // Contains only the first row, as we're not using it in a …

Member Avatar for minitauros
0
180
Member Avatar for aVar++

Is it not easier to just let him on your computer for a couple of minutes while you're in class? :) Or aren't you in class?

Member Avatar for broj1
0
280
Member Avatar for minitauros

Does anybody know of a reason why a custom font would not load directly when a web page is loaded? When I visit the main page of my website, it uses a standard font instead of the custom font I selected, but if I then go to another page, that …

Member Avatar for pamsb2
0
420
Member Avatar for minitauros

Okay so I've been going through my HTML lately and I discovered that I was still using the <base> element to define my website's base path. I want to get rid of that - I would like to be able to use relative URLs all the time, without having to …

Member Avatar for minitauros
0
276
Member Avatar for BadManSam

This query: SELECT value FROM settings WHERE value = "Login Script" seems a bit odd to me. You are selecting the *value* field of records of which you already know what the *value* field contains (namely "Login Script"). It is something like saying: `SELECT "Login Script" AS value FROM settings …

Member Avatar for minitauros
0
173
Member Avatar for jc.viloria.9

Well have you checked if the file of which the servers says it is missing is actually there? :)

Member Avatar for TomH.PG
0
154
Member Avatar for JackieBunting66

Could be that it's overheating, and if it is, you could (like caperjack said) try to clean the dust inside. You could also buy a laptop cooling platform (with vents in it) or put something underneath the back side of your laptop so that it is tilted a bit, so …

Member Avatar for minitauros
0
74
Member Avatar for Olagsfark

You could check from which website the user is referred to a page? Check out $_SERVER['HTTP_REFERER']. You can also add CAPTCHA validation to your form, which should be different for every form that is submitted. You store the correct CAPTCHA answer in a session when the form page is loaded, …

Member Avatar for Olagsfark
0
643
Member Avatar for OldDeveloper01

For as far as I know, executing a COUNT instead of count_num_rows is faster, performance wise. Your new query would look like [code]SELECT COUNT(a_unique_field_occuring_in_every_record_that_is_selected) AS num_rows, * FROM products ORDER BY dateadded DESC[/code] I'm not 100% sure if it is faster though, but with this query, you could use mysql_fetch_assoc …

Member Avatar for nandkishor.sharma.372_1
0
862
Member Avatar for GlenRogers

Have you tried any MySQLi tutorials? Like: http://www.xphp.info/mysqli-tutorial/ or http://codular.com/php-mysqli ?

Member Avatar for GlenRogers
0
160
Member Avatar for minitauros

I am currently working on a project, and I had a name for it in mind. However, the .com domain with that name is already in use. What do you think I should do? Rename my project, or use a .net domain instead of a .com? The name would be: …

Member Avatar for bhav123
0
154
Member Avatar for patk570

Damn that is a whole lot of code man. Would you be so kind to specify the lines that you would like us to look at? ^^ By the way, on a side note, using $_REQUEST is considered unsafe/risky, as it may get defined by $_COOKIE, $_GET and $_POST values, …

Member Avatar for ndomba
0
479
Member Avatar for PF2G

My question would be the same as jkon's, what's in $contentToSave? And maybe you could read a bit about [MySQL Injection](http://www.tizag.com/mysqlTutorial/mysql-php-sql-injection.php), because your script seems not to be as secure as you might think :).

Member Avatar for minitauros
0
155
Member Avatar for mbarandao

A couple of things: - [session_register()](http://php.net/manual/en/function.session-register.php) appears to be a deprecated function. You don't need to use it. Using only `$_SESSION['key'] = 'value';` will suffice if you run a PHP version from less than a long time ago ;). - Should you not start a session using [session_start()](http://php.net/manual/en/function.session-start.php) in the …

Member Avatar for mbarandao
0
428
Member Avatar for bfitzgerald

You want to give the user an alert and then redirect him? Why not redirect him and then give him the alert? :)

Member Avatar for F-3000
0
476
Member Avatar for rolanduk

Well from a first look at it, it seems like your developer built this website for mozilla users only (but I'm not sure, haven't checked it thoroughly. Your website makes use of some CSS3 properties like border-radius and gradiests, at least I think they're CSS3 properties :p, but they're probably …

Member Avatar for madelinekim
0
367
Member Avatar for fheppell

In PHP (using mysql), fetching one result: <?php $q = "SELECT `download` FROM `images` WHERE `owner_un`='$owner' AND `url`='$url' LIMIT 1"; $rq = mysql_query($q); $fetch = mysql_fetch_assoc($rq); echo '<p>Result: ' . $fetch['download'] . '</p>'; Fetching all results: <?php $q = "SELECT `download` FROM `images` WHERE `owner_un`='$owner' AND `url`='$url' LIMIT 1"; $rq …

Member Avatar for minitauros
0
242
Member Avatar for hades.edy

You seem indeed to be using the output buffer while there is nothing you are buffering for output :). What an output buffer does is, shortly explained, this: Instead of writing your output to the screen, it buffers it. It allows you to set headers and do other stuff in …

Member Avatar for hades.edy
0
148
Member Avatar for Maideen

So are you getting an error or are you not getting an error? And if you are getting an error, what is the error you are getting? =)

Member Avatar for Maideen
0
552
Member Avatar for hallianonline

Your <form> element should have an "action" attribute that tells it which page to load and a "method" attribute to define what kind of request is being done. E.g. `<form action="do_action.php" method="post">` Then, on do_action.php, in this example, you should validate the user's input. If it is not valid, you …

Member Avatar for hallianonline
0
170
Member Avatar for osirelkhatim

You are aware of the fact that you have for($i = 0;$i <= count($info);$i++) { which loops through the info of a user, not through the array of users, and that in your echo's you are trying to access a *user* using the counter of the user info loop instead …

Member Avatar for minitauros
0
329
Member Avatar for spyece

More info on Javascript timing events can be found [here](http://www.w3schools.com/js/js_timing.asp). I guess you could use the setTimeout() function. E.g.: var timeout_time_in_seconds = 10; var timeout = setTimeOut(function() { //* Type here what needs to happen after the timer times out. }, (1000 * timeout_time_in_seconds));

Member Avatar for minitauros
-1
329
Member Avatar for hallianonline

> I require the text field should contains Alphabets in Upper and lower case, numbers, hyphen, fullstops forward and back slash and commas and spaces in it Try: $regex = '/[A-Za-z0-9\-\\,.]+/'; $is_valid = preg_match($regex, $address); // Becomes true or false. This does exactly what you ask. The following code is …

Member Avatar for iamthwee
0
8K
Member Avatar for mjsmitten

Hmm well in plain html you can add a maxlength using the *maxlength* attribute. For example: `<input type="text" maxlength="128" ...>` But with the code you provided.. I don't know. You seem to be using a class named ItemForm? You should maybe take a look how that class generates <input> elements.

Member Avatar for minitauros
0
145
Member Avatar for minitauros

I'm writing a report about public transport, and I'm not English, so I was wondering if anyone could help me with this: what is the correct way to use "public transport" in English? For example: Group x uses public transport to get from A to B Using public transport comes …

Member Avatar for Ancient Dragon
0
370
Member Avatar for shilu2

Well what it says is that you have not defined $id. $id is empty, and therefore you get an error and your script is not working. If you do not define $id in a way such as this: `$id = 'yourvalue';` Then it will be undefined and you will not …

Member Avatar for broj1
0
208
Member Avatar for amkaos
Member Avatar for michael123

Are you sure that mail() doesn't send anything at all if one recipient's email is invalid? If so, you could maybe use a loop to send separate mails to every email address in an array? E.g.: $email_addresses = array( 'email1@email.com', 'email2@email.com', // etc. ); // Fill these in with whatever …

Member Avatar for minitauros
0
211
Member Avatar for jLamp

Maybe you can open header.php separately and then edit it in the design view? :)

Member Avatar for minitauros
0
114
Member Avatar for weeraa

If the code you posted is currently all on one the same page, it is logical why it isn't working at the moment: you cannot read your $_GET if it has not been set. That means that if your select is changed right now, it does not set your $_GET …

Member Avatar for minitauros
0
2K
Member Avatar for mark2326l

So which fields are the matching fields? Suppose that you have two tables: persons (id, name) addresses (id, person_id, address) Each person can have one or multiple addresses, but each address is bound to only one person. Then you could execute the following query to select a person together with …

Member Avatar for cigoL..:)
0
231
Member Avatar for xianamersu

If you are not allowed to use a SQL database, use a NoSQL database, your teacher won't be happy but you have done as he asked ;). Here's another method: <?php $file_containing_names = 'file.txt'; $file_contents = file_get_contents($file_containing_names); $name_to_search_for = 'annie'; $regex = '/' . $name_to_search_for . '/i'; if(preg_match($regex, $file_contents, $matches, …

Member Avatar for diafol
0
344
Member Avatar for lloyd.farrell.7

So that's the one and only file there is? What happens if you just type `<?php session_start(); ?>` in an empty PHP file and open that? Are you sure it's not your installation that's sending its own header? Are you using XAMPP or something else?

Member Avatar for minitauros
0
389
Member Avatar for MargateSteve

Well I can think of at least two things that you could think about: 1. Instead of each <div> refreshing separately, why don't you create **one** file that retrieves all data that needs to be refreshed, and then use Javascript to place the retrieved data in the corresponding <div>s? 2. …

Member Avatar for minitauros
0
189
Member Avatar for jLamp

Well, I don't know WOWSlider, but the simple and obvious answer to your question would be: check out WOWSlider's documentation and check Google. For if I were to have to search an answer for you now, I would have to do the same ;). But maybe there is someone else …

Member Avatar for diafol
0
165
Member Avatar for dourvas

Did you try: 1. var_dump()-ing your query statement? 2. var_dump()-ing the result object of your query? 3. var_dump()-ing all input to your query, to see if your query is actually executed the way you expect it to be? :)

Member Avatar for diafol
0
175
Member Avatar for maharrington

So does your "OR die(...)" function get triggered, or does it pass that? Maybe your query did not return any results?

Member Avatar for minitauros
0
231
Member Avatar for dina85

Then have you checked if there is something wrong with conn.php? Also make sure your error reporting is turned on. In the first line of your root script, put this line to do that: `error_reporting(E_ALL ^ E_NOTICE);`

Member Avatar for dina85
0
157
Member Avatar for janicemurby
Member Avatar for rubai

In PHP? Here's a short example. Page 1: <form action="page2.php" method="post"> <input type="checkbox" name="array_name[]" value="true"><br> <input type="checkbox" name="array_name[]" value="true"> <input type="submit"> </form> Page 2: <?php if($_POST['array_name'] && is_array($_POST['array_name']) { // Loop through checked checkboxes. $checked_checkboxes = array(); foreach($_POST['array_name'] as $key => $value) { $checked_checkboxes[$key]; } } else { // Nothing …

Member Avatar for minitauros
0
166
Member Avatar for dhani09

Well this is some weird shit indeed, there does not seem to be anything wrong with your code. Have you tried echo-ing $limit? E.g.: `echo $limit;` And see what it is? Is it really -5,5? If yes, you could try echo-ing $pn each time its value changes, to see where …

Member Avatar for minitauros
0
124
Member Avatar for RoryGren

Pfew, I'm no expert on working with csv files, but I'd say try: if (($handle = fopen("../uploads/KZNCal.csv", "r")) !== FALSE) { while (($data = fgetcsv($handle, 1000, ";")) !== FALSE) { $Cal[] = $data; } fclose($data); } // Check if $Cal is what you need it to be: echo '<pre>'; print_r($Cal); …

Member Avatar for RoryGren
0
252
Member Avatar for gvsamrat

See here: http://php.net/manual/en/function.str-getcsv.php That should speak for itself :).

Member Avatar for minitauros
0
72
Member Avatar for zacharysr

For starts I see at line 14: `$('.messages:last-child')` But in your HTML I don't see anything with a classname of "messages". Should that dot not be a hashtag? In line 14? From a second look at it I would suspect that the error lies in your PHP file. Does it …

Member Avatar for zacharysr
0
397

The End.