452 Posted Topics

Member Avatar for hiiiiii@
Member Avatar for minitauros
0
194
Member Avatar for joshua_8

What does the error message say? The value you filled in for "url" seems a bit odd to me - maybe that's a file that cannot be loaded?

Member Avatar for minitauros
0
138
Member Avatar for minitauros

So I've given RequireJS a try this weekend, and although it appears to work pretty smooth, I can't figure out one thing: How do I combine PHP and Javascript while using RequireJS? See, RequireJS can only work with .js files, meaning that it cannot "require" .php files. In many files, …

Member Avatar for minitauros
0
727
Member Avatar for bro_1
Member Avatar for Isaac_4
0
224
Member Avatar for rjusman90

Why don't you just select the product merely by the product code? Or isn't that unique? E.g. foreach($_SESSION['products'] as $key => $cart_item) { if($product_code == $_GET['product_code']) { //* This is the product of which we're reducing the quantity. // Substract one (or whatever you want) from the quantity. $cart_item['quantity'] -= …

Member Avatar for minitauros
0
176
Member Avatar for minitauros

I'll be visiting my girlfriend who's staying in Helsinki, Finland until the end of december, and I'd like to surprise her by taking her on some kind of trip or event or something. However, last time I was there we have already seen the most popular places in Helsinki. So …

Member Avatar for mike_2000_17
0
148
Member Avatar for minitauros

For some reason my triggers are recursing, while I think they shouldn't. I'll simplify the examples for the sake of you not having to read through all the code. Trigger 1: CREATE TRIGGER table_1_after_delete AFTER DELETE ON table_1 FOR EACH ROW BEGIN DELETE FROM table2 WHERE table2.table_1_key = OLD.table_1_key; END …

Member Avatar for minitauros
0
1K
Member Avatar for amith_ami

Just for your information: you can also use PHP to read your URL. Say your .htaccess is like this: RewriteEngine on Options -Indexes RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php [L] **Everything** is redirected to index.php. In index.php, you can use $_SERVER['REQUEST_URI'], for example, to parse the URL …

Member Avatar for amith_ami
0
217
Member Avatar for SimonIoa

What is the query that you are using to delete the record? Are you not in a transaction that is cancelled and rolled back? Some background info (queries) would not be misplaced here :).

Member Avatar for diafol
0
172
Member Avatar for Violet_82

Well I guess that would be possible :). Maybe something like: $(window).resize(function() { // Do your width checks etc. here, check out the jQuery website for more info. if(page_width < 700) { // Create <meta> tag. $('head').append('<meta name="bla" content="test">'); } else { // Remove the <meta> tag. $('meta[name="bla"]').remove(); } });

Member Avatar for Ajith_1
0
5K
Member Avatar for bLuEmEzzy

I'm sorry but I find it kind of hard to understand your question :p. Is what you're asking: 'How do I pass the value of a textarea to a checkbox WHILE staying on the same page?' If yes, I'd say you'd have to use Javascript for that. If not, could …

Member Avatar for minitauros
0
296
Member Avatar for Indians

Why are you uploading images to your database? Wouldn't it be much easier to just upload the images to a specific destination on your server, and then insert the location of that image into your database? E.g. you save your images in /uploads/images and you then save the location of …

Member Avatar for mattster
0
3K
Member Avatar for stokie-rich

Have you given these pages/articles a read? http://stackoverflow.com/questions/4329396/mysql-select-10-random-rows-from-600k-rows-fast http://stackoverflow.com/questions/12087519/how-to-query-10-random-unique-records-in-mysql-database http://stackoverflow.com/questions/4966154/how-to-select-random-unique-records-on-each-execution-of-the-sql-query

Member Avatar for stokie-rich
0
339
Member Avatar for infoitmanoj

You could add a counter that counts how many times the function has been executed. If it reaches 10, you could prevent the timeout from being set again. I hope that's clear enough :).

Member Avatar for infoitmanoj
0
158
Member Avatar for roxanne.martos
Member Avatar for silverice282
0
229
Member Avatar for everton.retweets

I'm not sure, but most posts I've read about this notice that using the [format()](http://www.php.net/manual/en/datetime.format.php) function might work. So you would return a value that is returned by Datetime::format() instead of just Datetime.

Member Avatar for pritaeas
0
213
Member Avatar for Szabi Zsoldos

Does either of those statements return `true` or `1` or anything that is not `null` or `false`? If yes, then your `||` operator is working for sure :).

Member Avatar for minitauros
0
207
Member Avatar for bops

Might be that your webhost has [register_globals](http://php.net/manual/en/security.globals.php) enabled. Register_globals is deprecated since PHP 5.3, so if this is the case, your webhost is running an older PHP version. I guess you can see if register_globals is turned on or off by using [phpinfo()](https://php.net/phpinfo), but I'm not sure.

Member Avatar for bops
0
149
Member Avatar for roxanne.martos

From which point up is it going wrong? Is the user with the given username even being retrieved? Or does shit hit the fan when you compare the given password with the password in the database?

Member Avatar for minitauros
0
274
Member Avatar for nadiam

Why don't you just clone the table's <body> element's content and insert it into the other table's body? Why are you cloning the **whole** table and to which exact element are you cloning it? A <td> element in the other table, or another element?

Member Avatar for minitauros
0
3K
Member Avatar for nadiam

The inputs will indeed need new names. Maybe you could add square brackets to the names, to make them an array? PHP will be able to work with that. Example: $(document).ready(function() { $('select[name=options]').change(function() { var number_of_forms_to_create = $(this).val(); var form = $('form#form1').clone(); var target = $('div#test'); for(var i = 0; …

Member Avatar for nadiam
0
368
Member Avatar for Priti_P

If you tell jQuery to `element.after('<tr>');`, the <tr> part is interpreted as "<tr></tr>" (as a whole tag). Therefore you should use another way to create the table you want. For example (with example data): var table = $('table#table_id'); var tr = $('<tr>'); var td; // Create a <td> tag, fill …

Member Avatar for Priti_P
0
221
Member Avatar for Priti_P
Member Avatar for Priti_P
0
442
Member Avatar for riahc3

Well, can't you loop through your queries and validate that the correct data is being inserted? You could break the loop when the error occurs, showing you which data is generating the error.

Member Avatar for Kyle Wiering
0
305
Member Avatar for nadiam

This is not an error, not a warning, but merely a notice. It seems to be caused by `$_POST['check']` not being defined, while your script is trying to access it. You can modify which errors are being reported by using the [error_reporting()](http://www.php.net/manual/en/function.error-reporting.php) function, if you wish to not display notices, …

Member Avatar for nadiam
0
464
Member Avatar for Webville312

What abouuuut you select the logins only for the user that is logged in? :) For example `SELECT * FROM logins WHERE user = "julius"`. You will then only fetch the login records for that user, which you can display one by one. Alternatively, you can use an ORDER BY …

Member Avatar for Webville312
0
5K
Member Avatar for goutham.tandra

What is it that you want to do, exactly? If you need to "refresh" the content of a div, doesn't that mean you need to check if new data is available? Or do you just want to load new, already known data into a div after a specific amount of …

Member Avatar for designershiv
0
765
Member Avatar for minitauros

So I'm planning to make a trip through the US. More specifically: through the west of the US (San Fransisco, Las Vegas, that area). I was wondering if you had any tips for me. It would be a 2-person trip of 20 days. Our plan was to rent a car …

Member Avatar for Stuugie
0
652
Member Avatar for vanitha.A

You could do that, but why don't you just save the image on the server, and save a link to it in the database, which you can use to display the image? :) Oh, and what is it that you are asking, exactly?

Member Avatar for urtrivedi
0
151
Member Avatar for Szabi Zsoldos

Tip: If you use time() or microtime() in your random number somehow, you will generate a number that is much more likely to be unique, which means you may have to execute less database operations (less queries are needed to find out if a number already exists, for the number …

Member Avatar for diafol
0
902
Member Avatar for Viped

What about displaying, for example, no more than 50 records per page, so that a maximum of 50 rows will be updated at a time? And then about updating a large amount of rows: each row contains data that is unique to that row, so you will probably have to …

Member Avatar for diafol
0
325
Member Avatar for sk8ergirl

(However, note that the mysql_* functions will be deprecated in the future, so it is recommended you use another extension for making a MySQL connection, for example PDO or MySQLi.)

Member Avatar for minitauros
0
155
Member Avatar for M.Waqas Aslam

I guess that the problem is that you are trying to display XML as XML in an HTML document. It works like this: Your HTML document has already told your browser it's an HTML document. Therefore your browser will treat your document as an HTML document. If you want the …

Member Avatar for minitauros
0
592
Member Avatar for johndohmen1963

I'm not sure, but I don't think that that function is returning an integer, which **is** what you are comparing it against. I suggest you check out what exactly is being returned by the format() function, e.g.: var_dump($verscil_huwelijksdat_tot_zestien_jaar->format('%R%a'));

Member Avatar for johndohmen1963
0
163
Member Avatar for Bchandaria

If your purpose is to hide your PHP code, don't worry, because as diafol says: that isn't visible to the client.

Member Avatar for minitauros
0
98
Member Avatar for ysfzby
Member Avatar for dinhunzvi

Have you tried opening a new window with Javascript? You can use the window.open() function for that, if I'm not mistaken.

Member Avatar for diafol
0
699
Member Avatar for Mike_danvers

So.. do you have a start on this project? What have you created so far? :)

Member Avatar for Mike_danvers
0
173
Member Avatar for chaitu11

You could try using [HTML2PDF](http://html2pdf.fr/en/example). It's a (for as far as I know) free PHP class to convert.. HTML to PDF, yea! (guess you didn't see that coming). Create a PHP file, generate a PDF in it and set the headers so that the file will be seen/handled as a …

Member Avatar for minitauros
0
60
Member Avatar for sultankhan

I think this post might help you: http://stackoverflow.com/questions/4110907/how-to-decode-a-base64-string-gif-into-image-in-php-html According to that post and a bit of experience in such matters, you either have a PHP page that outputs ONLY the image, and then put that page inside an <img> element's "src" attribute (e.g. `<img src="image.php?id=1">`), or you use something like …

Member Avatar for sultankhan
0
2K
Member Avatar for Shahbaz_2

You start a session with session_start(). That should probably be one of the first lines, if not the first line, of any of your files in which you want to use the session. Then, after starting the session, you can save values to it or retrieve values from it, using …

Member Avatar for Shahbaz_2
0
238
Member Avatar for M.Waqas Aslam

Maybe you can use curl for that? :) Example: http://davidwalsh.name/curl-post

Member Avatar for minitauros
0
123
Member Avatar for rhodoscoder

The imagejpeg() function tries to create a JPEG file in the given directory. If the permissions for that directory are set so that an image cannot be created in it, you will get an error such as the one you are currently getting. Permission denied simply means that the server …

Member Avatar for minitauros
0
239
Member Avatar for shalu2012

I'm not sure but maybe the RAND() should be something your select returns. Just a piece of thought, though. Something like SELECT RAND() AS rand_nr ORDER BY rand_nr DESC Just a question though: what use does it have to create a random order, after you've already ordered by relevance?

Member Avatar for minitauros
0
169
Member Avatar for tayyongjie.gin

Of course you are encouraged to create such a slideshow yourself, because it's a nice opportunity and a very good way to practice your programming. However, there are thousands of slideshow plugins out there, and if there is no real need or desire to create one yourself, why don't you …

Member Avatar for minitauros
0
178
Member Avatar for newbie_to_cpp

Well it seems like this should be working. Only thing that I see is wrong (in case you haven't found it yet yourself) is the misplacement of your semicolon on line 23. It shouldn't be `include ("inc/OutletsIn" . $country_selected .".php";)` but `include ("inc/OutletsIn" . $country_selected .".php");`.

Member Avatar for Bachu
0
301
Member Avatar for newbie26

Well, if you need only one record from the *tblStudents* table, and multiple records from the *tblGrades* table, I suggest you just perform two queries. The first query will retreive the student info from the *tblStudents* table. Then, with the studentId that was retrieved, the second query retrieves the student's …

Member Avatar for newbie26
0
156
Member Avatar for safeer008

Yes you can :). Do you have any experience in using AJAX? If not, this might be a nice tutorial to start: http://www.w3schools.com/jquery/jquery_ajax_intro.asp

Member Avatar for M.Waqas Aslam
0
110
Member Avatar for thilipdilip

PS: A link table is an extra table that stores which products are connected to which categories. E.g.: Table categories_products category_id | product_id 1 | 5 1 | 6 1 | 9 2 | 5 2 | 7 2 | 10 3 | 6 3 | 9 Select all products …

Member Avatar for thilipdilip
0
2K
Member Avatar for terryds

Not sure but I think it's not recommended you place HTML elements outside your <body> tags (which is what your CSS is doing with the black bar).

Member Avatar for terryds
0
141

The End.