452 Posted Topics

Member Avatar for melhanz

Are you asking how you can use the item that the user selects in your <select> to fill another <select> element?

Member Avatar for minitauros
0
318
Member Avatar for WebWebbington

In line 2, you are comparing `session` to `null`. However, firstly, there is an error in your code here, as "session" is no PHP language. It should either be $session or $_SESSION. If you want to check if a session has been started, I recommend you use session_id() to check …

Member Avatar for Mohamed_26
0
213
Member Avatar for Linddha

Maybe the varchar (225) kicks in here. Does the article that you are submitting not exceed the field's maximum storage size (225)?

Member Avatar for diafol
0
209
Member Avatar for cmps

If you are still looking for a regex, something like this might work: `/\[url\](?!\[url\])(.*?)\[\/url\]/is` It returns only [url] tags that are not followed by another [url] tag.

Member Avatar for cmps
0
266
Member Avatar for Linddha

Have you checked your developer console for possible errors? Usually it shows information about what's going wrong - if something is going wrong.

Member Avatar for Linddha
0
152
Member Avatar for kgizo

What pritaeas says is (well, what else would you expect) right. To track progress, you'd have to separately select and insert those rows, which would - in this case - probably create an unnecessary delay in your operation.

Member Avatar for diafol
0
397
Member Avatar for hriti

Index page: <?php session_start(); echo '<p>Your session id is: ' . session_id() . '</p>'; Other page: <?php session_start(); echo '<p>Your session id is: ' . session_id() . '</p>'; See if they match if you will ;).

Member Avatar for minitauros
0
136
Member Avatar for Burhan_1

You could do it in the loop that fetches your DB records. E.g. <?php while(...) { $website = $record['website']; $website = str_replace('$site', $site, $website); }

Member Avatar for minitauros
0
84
Member Avatar for nadiam

I think you should maybe use `<?= $_POST['name']; ?>` instead of just `<?= $name; ?>`, as the `$name` variable hasn't been set yet when PHP arrives at the <form> part.

Member Avatar for minitauros
0
304
Member Avatar for suavedesign

Have you tried what has been posted [here](http://stackoverflow.com/questions/376253/stretch-and-scale-css-background) (StackOverflow)?

Member Avatar for suavedesign
0
340
Member Avatar for mcoliver88

Move the `name` parameter to the input with `type="text"`, then it should probably work! <input type="text" name="q"id="searchtxt" /> <input type="submit" id="searchbtn"/>

Member Avatar for mikerock
0
268
Member Avatar for Violet_82

For as far as I know, the css() function only accepts two parameters, being index and value. E.g. you would execute `css('width', 420)`. I'm not completely sure though, but I can provide you with an example of which I'm sure it works: var new_width = $('#div').width() + 120; $('#div').css('width', new_width); …

Member Avatar for Violet_82
0
456
Member Avatar for Jemuel
Member Avatar for jacob21
Member Avatar for lewashby
Re: this

An example, with you class A (just try to execute it, might clear things up a bit more for you): <?php class A { private $private_attribute = 'this is a class attribute, that you can use in any of this class's functions'; public $public_attribute = 'this is a class attribute, …

Member Avatar for minitauros
0
193
Member Avatar for Cristianh21

Your query seems to be incorrect. You should probably not use `WHERE $add_city` but `WHERE add_city` (without the $). Besides that, a COUNT() query might be more efficient here. E.g.: <?php $q = 'SELECT COUNT(add_city) AS c FROM dbAdd WHERE add_city = "' . mysql_real_escape_string($wil) . '"'; $rq = mysql_query($q); …

Member Avatar for Cristianh21
0
297
Member Avatar for jacob21

First of all I think the use of the <marquee> element is waaaay overaged. Second, I think you could solve this problem by adding a CSS style to your <ul>'s <li> elements. Example: li { float: left; margin-right: 6px; }

Member Avatar for minitauros
0
229
Member Avatar for minitauros

Just curious about your thoughts on this subject. **Example:** www.site.com/?id=1 or www.site.com/?id=8adyfa8df614812yasdf (which is also "1", but encrypted) What would you recommend? What do you use? Anyone with pros and/or cons on if you should encrypt your URL data? **My thoughts:** Pros (to encrypting URL data): - Makes it harder …

Member Avatar for pritaeas
1
218
Member Avatar for bradly.spicer

I'm not sure but the first thing that comes to my mind is that IE8 is not ready to interpret HTML5 tags like <nav>. Maybe you could find out more about that?

Member Avatar for JorgeM
0
185
Member Avatar for vipula

I would like to suggest a (in my opinion) cleaner solution :). This solution is as follows: 1. Create a database file, in which you create your database connection, etc. You can include that file in every file that you need a database connection in. This way, you don't need …

Member Avatar for minitauros
0
272
Member Avatar for Raadha

I guess you should check out the [fputcsv()](http://www.php.net/fputcsv) function :).

Member Avatar for minitauros
1
160
Member Avatar for tqmd1

You must select a database using the [mysql_select_db()](http://www.php.net/mysql_select_db) function. So, replace this line `$con = mysql_connect($host, $username, $password, $db_name);` by the following $con = mysql_connect($host, $username, $password); mysql_select_db($db_name, $con); Note, however, that PHP's mysql_* functions will be deprecated in the future, and that any further use of it is disencouraged.

Member Avatar for TheBludger
0
242
Member Avatar for damle1

What do you have so far? :) Usually it goes something like: SELECT * FROM table_name WHERE created = "2013-12-11"

Member Avatar for minitauros
0
85
Member Avatar for saranya@123

First thing that comes to mind: Make the PHP script that does the pinging (ping.php) write its results to, for example, ping_results.txt. Then, make an AJAX call to ping.php and immediatelty after execute a Javascript timeout that executes an AJAX function every 0.5 or 1 seconds, which opens ping_results.txt and …

Member Avatar for saranya@123
0
1K
Member Avatar for vbdotnetlover

Maybe your PHP installation does not support shortcodes. You could try using ` Second<input type="text" name="text2" value="<?php echo $var2; ?>" disabled><br>` instead of ` Second<input type="text" name="text2" value="<? echo $var2; ?>" disabled><br>`

Member Avatar for rpv_sen
0
97
Member Avatar for Eagle.Avik

I suppose something like this should work: $_SESSON['username'] = $result[0]['username']; $_SESSON['fullname'] = $result[0]['fullname'];

Member Avatar for Eagle.Avik
0
272
Member Avatar for Eagle.Avik

Are you getting any errors or is the data not being inserted without giving you a notice/warning/error?

Member Avatar for brandon66
0
354
Member Avatar for strongard63

It is called Javascript ;). It would work something like: <script> function activateLinkOne() { displayMessage('Link 2 is disabled.'); link1.activate(); return false; } </script> <a href="link.com" onclick="return false;">Link 1</a> <a href="link2.com" onclick="activateLinkOne()">Link 2</a> (Note that this code will not work; it is merely an example).

Member Avatar for Nutan_1
0
100
Member Avatar for mbarandao

Well it seems like you already have some code. Is that not working correctly or? Checking if a checkbox is checked, by the way, can be done properly and easily by using `.is(':checked')` (jQuery, returns true or false).

Member Avatar for mbarandao
0
753
Member Avatar for joshl_1995

I think you could add `RewriteRule ^product.php/([a-zA-Z0-9]+)$ product.php?id=$1` to get that working. Or you could use this: RewriteEngine on Options -Indexes RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php [L] to redirect **everything** to your index page, and then use $_SERVER['REQUEST_URI'] to parse the URI and load the appropriate …

Member Avatar for joshl_1995
0
480
Member Avatar for Indians

I haven't done this with editable <div>s before, but usually you get a div's content by using div.innerHTML, not div.value. So changing your code to function maths() { var qt = document.getElementById("quantity1").innerHTML; var up = document.getElementById("unitprice1").innerHTML; qtup = parseFloat((qt * up)) || 0; document.getElementById("total1").innerHTML = qtup; } might work. Why …

Member Avatar for minitauros
0
1K
Member Avatar for HunainHafeez

I guess that by "certifications" they mean something like "which languages have you proven yourself certified to program in?". So I guess you could fill in the languages you have a lot of experience with?

Member Avatar for HunainHafeez
0
234
Member Avatar for GeekPlease

You could use jQuery's `$(window).scroll()` function, which can execute a function on scroll. That function could then check what the screen's height is (`$(window).height()`), how far the user has scrolled from the top (`$(window).scrollTop()`) and then use those values in a calculation to see what part of the screen is …

Member Avatar for minitauros
0
216
Member Avatar for kavitha N

Do you want an AJAX request to be executed when that happens? And do you maybe have some more information about the case? Like what does the <select> element look like, and how does the percentage get calculated?

Member Avatar for JorgeM
0
412
Member Avatar for Indians

The problem with your code is that you are assuming that every field always has a value. However, `undefined * something` will always return NaN. It works the same as `0 * anything`: 0 times anything is always 0. Example: var a = undefined; var b = 15; var c …

Member Avatar for Indians
0
200
Member Avatar for karan_5

Pfew this maybe is a pretty vague description of your problem ^^. Could you be a bit more specific please? You have two database columns which both have an INT field set as primary key, of which the one references to the other? And you want to store which value …

Member Avatar for karan_5
0
280
Member Avatar for Amaina

So the user has to check some checkboxes, of which the values will then be converted to .csv and offered as a download? Or are there multiple .csv's available for download, and does the user have to select which of those he wants to download?

Member Avatar for Amaina
0
909
Member Avatar for MattD00

Well, your checkboxes will not be in the `$_POST['hidden']` array if they have not been checked. Therefore you cannot set them to 0 using a foreach() loop the way you are using it. You will somehow need to compare the checked checkboxes against the present checkboxes, and work with the …

Member Avatar for MattD00
0
2K
Member Avatar for chrisschristou

For as far as I know, when you do something like this: <?php echo $shipping1+number_format ($row_panier['subtotal'], 2, '.', ''); ?> it is not just an echo that is taking place; rather the script is parsed one by one and `$row_panier['subtotal']` is added to `$shipping1`. I think this can easily be …

Member Avatar for chrisschristou
0
253
Member Avatar for phaneendrahari

Well if you have stored information about where these files are saved with your link, I guess you could retrieve this information when you delete the link, and delete the related files with it? You can use the [unlink()](http://php.net/manual/en/function.unlink.php) function for deleting files :).

Member Avatar for phaneendrahari
0
190
Member Avatar for lillorme

if (mysql_num_rows($userquery) != 1) /* I think this line is the problem but how to i fix this */ { die ("that member could not be found!"); These lines are saying: If not exactly one record is found, stop the script. Why don't you use this instead?: if (mysql_num_rows($userquery) < …

Member Avatar for phaneendrahari
0
280
Member Avatar for MasterHacker110
Member Avatar for JorgeM
0
253
Member Avatar for jelly46
Member Avatar for Burhan_1

I've never used this API before and this might sound really really dumb, but have you tried using the keyword "flying" instead of "fly"? (Since you're also talking about driv*ing*, walk*ing*)

Member Avatar for Burhan_1
0
952
Member Avatar for lillorme
Member Avatar for lillorme
0
452
Member Avatar for Michal_2

Try replacing `<link rel="style" href="main.css" >` with `<link type="text/css" rel="stylesheet" href="main.css">`, and check if main.css is in the same folder as your main.html =).

Member Avatar for minitauros
0
232
Member Avatar for profmuluka

I disagree on that you NEED a color picker, and there are a lot more resources that can help you to learn how to code. Maybe you could expatiate on all these subjects a bit more? Because I don't think this short post gives someone who wants to start coding …

Member Avatar for minitauros
0
196
Member Avatar for garyjuano

Well, reading your post I'm assuming this is your problem: In Javascript you have an array with values (var chart in your example), which you want to be converted to a string and then to be set as the value of a specific input checkbox. This can be achieved as …

Member Avatar for minitauros
0
146
Member Avatar for NextCom

A working solution, although maybe not the fastest, could be: $(this).find('td:nth-child(2)').each(function() { // Create a clone of the <td>, so that we can modify its contents. var clone = $(this).clone(); // Remove the <select> from the cloned <td>, so that we can properly use // the :contains selector. clone.find('select').remove(); // …

Member Avatar for paulkd
0
460
Member Avatar for trishfernan

That sounds like some basic Javascript (I would suggest jQuery) tutorials. I would say: check out these pages: http://www.w3schools.com/jquery/ (If you have never worked with jQuery before) http://www.w3schools.com/jquery/jquery_ajax_intro.asp (Introduction to jQuery's AJAX functions) http://api.jquery.com/jQuery.ajax/ (The jQuery ajax() function)

Member Avatar for minitauros
0
138

The End.