198 Posted Topics

Member Avatar for DaveyMoyes

I think he meant to ask you to print_R $_SESSION to see what's in your session, the post data has nothing to do with your session data. `die(print_r($_SESSION, 1));` That will print out the structure of your session array so we can see how it's formed

Member Avatar for DaveyMoyes
0
178
Member Avatar for nstrazimiri

If you wanted to load the txt file after the page has already been generated without refreshing you'll have to send an AJAX request to another PHP script which reads the text in the file and sends it back. The script that reads the file can be PHP but the …

Member Avatar for GliderPilot
0
319
Member Avatar for Violet_82

It is running every 2 seconds, but after the first time it runs the first time you're setting the background position to -600, not subtracting -600 so the animation does nothing after the first go around. Try this instead which substracts 600 px each time: `$("#carousel").animate({backgroundPosition:'-=600px'}, 500);`

Member Avatar for GliderPilot
0
335
Member Avatar for Kratoswoo

Create a LastOnline timestamp row in the DB. When someone is logged in, everytime they load a page, update the timestamp When you want to know who is logged in do a DB query and get everyone who's timestamp is within the previous x amount of time. For example on …

Member Avatar for GliderPilot
0
190
Member Avatar for jon92

Two issues. Your IF statement is failing because you missed the = between name and "submit" online 23 so the name of your submit button isn't being passed: `<input type="submit" name"submit" value="Log In"/>` Change To `<input type="submit" name="submit" value="Log In"/>` This looks like a tpyo, $_PASS should be $_POST on …

Member Avatar for jon92
0
220
Member Avatar for pritaeas

From here: `extract($row);` That's taking the DB Row and turning the assoiative array and turning it into variables named by their array key. in this case the only thing we get is product from the DB so rather than having to type $row['product'] every time the above line lets you …

Member Avatar for LastMitch
3
532
Member Avatar for jspence29

you want to get the offsetTop preoprty of the main menu than get the scrollbar position. If the scrollbar is down more pixels than the main menu, add your top menu. Here is a small example in jQuery (untested): var main_menu_top = $('#main_menu').offset().top; //Change the number to the height of …

Member Avatar for JorgeM
0
221
Member Avatar for bangla
Member Avatar for Bachu
0
118
Member Avatar for jeepdude

PHP is run by the server prior to passing everything to the browser which processes JavaScript. Once this code gets to your browser it will look like this: <HTML> <HEAD> <script Type="Text/javascript"> function add() { document.getElementById("test").innerHTML = "3"; } </script> </HEAD> <BODY> <Table><TR><TD><button onclick="add();">CLICK</button><P id="test">One</P></TD></TR></Table> </BODY> </HTML> So it doesn't …

Member Avatar for jeepdude
0
137
Member Avatar for KyleMorgan49

Relevance isn't a command, you have to declare it: SELECT * FROM listings WHERE MATCH(title) AGAINST('ipod' IN BOOLEAN MODE) AS relevance ORDER BY relevance DESC

Member Avatar for KyleMorgan49
0
164
Member Avatar for b.shafabakhsh

My guess is you need to set another property in the items something like itemUrl, but we would need to see the rest of the JS code (the part that actually ouputs the HTML) to know exactly what it needs

Member Avatar for radhakrishna.p
0
94
Member Avatar for Kullercode

var means variable, it just tells JS that you want x to be a variable holder. So this takes the value of the demo element and stores it in x. It than checks to see if x is blank (x=="") or (||) if x is Not a Number (NaN).

Member Avatar for GliderPilot
0
139
Member Avatar for cssweb
Member Avatar for BigPaw

The low % of people who use tablet/mobile on Dani could also be partly as a result of the poor user experience on those devices. I know when we made changes to one of our sites to make it more mobile/tablet friendly we had nearly a 10% increase in use …

Member Avatar for deceptikon
1
122
Member Avatar for PriteshP23
Member Avatar for PriteshP23
0
281
Member Avatar for honhito.troy

Missing quotes: `$query = "SELECT * FROM monsters WHERE id='$id'"` If that doesn't work, var_dump your $id and make sure it's being set properly

Member Avatar for pritaeas
0
123
Member Avatar for joseavelar91

All your DIV's have absolute positioning so that overrides the margin: o auto; you can use the Jorge's example but you'll need to change a few things. First you'll need to add relative positioning to your wrapper: `#wrapper {width:##px;margin:0 auto;position:relative;}` Than you're going to have to play with the left …

Member Avatar for joseavelar91
0
176
Member Avatar for LONGWAY

The fopen failed, which when that happens it returns false which is causing the other two errors. As for the first one we would need to see some code to see what's going wrong, the error alone doesn't tell us much.

Member Avatar for LONGWAY
0
95
Member Avatar for daniel36

Add an or die(mysql_error()) to your query to see if it's failing. It's a very bad idea to add un-verified data to your DB. At the absolute very least you should make sure your POST data is set. Without any form of error handling it's difficult to say where exactly …

Member Avatar for GliderPilot
0
232
Member Avatar for randomkid73

Add a stopPropagation() call to the live functions on your action images, ie: $("delete_img").live('click',function(e) { e.stopPropagation(); //other actions here });

Member Avatar for randomkid73
0
137
Member Avatar for PaliGap

More than likely the script in the body of your page is trying to run prior to the jQuery being loaded. Try putting it in an onload function and adding a type: script.type = 'text/javascript'; script.onload=scriptLoaded; script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js'; document.getElementsByTagName('head')[0].appendChild(script); function scriptLoaded { $('#main').click(function(){ alert('hi'); }); } That being said …

Member Avatar for PaliGap
0
280
Member Avatar for OsaMasw
Member Avatar for OsaMasw
0
3K
Member Avatar for Borzoi

This should work for re-routing the domain, just change domain to your wanted domain: RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.domain\.com$ RewriteRule (.*) http://www.domain.com/$1 [R=301,L]

Member Avatar for Borzoi
0
310
Member Avatar for hwoarang69

> But this one I can't believe you asking this question. You can't write a query for this plus creating a table? I don't think they want the code to do queries, they are just asking on an opinion if the table structure they came up with was a good …

Member Avatar for pritaeas
-1
176
Member Avatar for kassadb

Basically what it is saying is if you take the visitor's IP and encode it, hide it in your HTML code along with the timestamp that you visited should you ever come across a page which has copied your code you can look at their code and asusming the didn't …

Member Avatar for <M/>
0
171
Member Avatar for edyy

Best way to do this would be to use AJAX. Have an empty DIV for your results on index.php and send the POST data via AJAX to search.php. Than take the results from search.php and add them to the empty results DIV. You would also need to change your pagination …

Member Avatar for GliderPilot
0
377
Member Avatar for chira9na9pal

Not in PHP but in your .htaccess file you can put this: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php That will remove the .php from the end of the URL

Member Avatar for diafol
0
160
Member Avatar for eoop.org

> If following an existing tutorial was as easy as setting up an existing CMS system such as WordPress, then WordPress wouldn't be that popular!! Unless you're doing it just as a learning project, don't just reinvent the wheel for the sake of reinventing the wheel. +1 A fully functioning …

Member Avatar for eoop.org
0
191
Member Avatar for Clanstrom

Maybe it's just me but this question doesn't make much sense... Syntax is the format in which code is written (i.e. PHP always starts with <?php and ends with ?>, $ implies a variable name, you end lines with ;, etc) Contructs are creating objects / calling language functions (echo, …

Member Avatar for veedeoo
0
142
Member Avatar for Octet

all mysqli_real_escape_string does is add a \ in front of the characters to neutralize them, it doesn't remove them. When you echo out the value PHP also uses the \ to output the literal character rather than interpurate it so you won't see the \ in your echo'd text

Member Avatar for GliderPilot
0
732
Member Avatar for timwhelan

You missed the substr function in your elseif: if(substr($_SERVER["REQUEST_URI"], 0, 13) == '/our-people') { return TRUE; } elseif (substr($_SERVER["REQUEST_URI"], 0, 21) == '/information-sessions') { return FALSE; } else { return in_array($type,array('3_column_interior_page', '3_column_faculty_bio_page')); }

Member Avatar for timwhelan
0
201
Member Avatar for nunuaziz_

If you're talking about dynamically acquiring the information without submitting the form you'd need to do an AJAX Call to another PHP Script which queries the DB and returns your Data.

Member Avatar for GliderPilot
0
101
Member Avatar for cheelo007

The mysql_num_rows if failing because your query is failing not because it returned 0 results. Add a die statement to your query to output the error to see what's happening: `$tinysql = mysql_query("SELECT * FROM products WHERE subcategory ='". $subcategory ."' LIMIT 4") or die (mysql_error());` On a side note …

Member Avatar for cheelo007
0
130
Member Avatar for 4Dante

Try this: var re = form.firstName.value; if(re.indexOf(value) !== -1) {alert(alerttxt);return false} else {return true}

Member Avatar for 4Dante
0
207
Member Avatar for NardCake

Nothing is standing out, the only thing I can think of is mix-matching a field. Make sure your DB cols are of the correct type for the data your supplying... i.e. the to col isn't of type CHAR or something to the effect

Member Avatar for NardCake
0
148
Member Avatar for andyhunter

You can load the recaptcha with JS and than handle the answer with the PHP plugin. Just upload the php library to your site and add the following code to line 31 above: require_once('recaptchalib.php'); $privatekey = "your_private_key"; //Chnage this to your private key $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); …

Member Avatar for GliderPilot
0
104
Member Avatar for azgold472

Nothing wrong with your PHP. Would need to see the JavaScript to know for sure what's going on however I did notice you're missing a comma. After you echo your image link and close the " you'll need another comma to identify the next item you're adding to your jQuery …

Member Avatar for azgold472
0
178
Member Avatar for xbat

I was counter voting xbat's down votes in the first thread when the whole thing happened, but that was before he went off the deep end and down voted 300 times. I just went through and up voted a few pages of his posts, I don't have much rep power …

Member Avatar for happygeek
0
238
Member Avatar for DaveyMoyes

You should just be able to do this: $number = '+' . $Code."".substr( $mobnum, 0 );

Member Avatar for LastMitch
0
330
Member Avatar for GliderPilot

Is there any chance of getting an option to disabled the post preview the automatically shows up below the textarea as you type? Even just a simple check box or something on the page to disable for that post would be great. I spend a lot of time trolling the …

Member Avatar for JorgeM
4
577
Member Avatar for eyeda

He has three different DB queries, one is getting admins ($row1) one is geting staff with a banned account ($row) and the other gets Staff withour a banned account (no variable set for this one). While this method works it would be just as easy to make this all one …

Member Avatar for eyeda
0
119
Member Avatar for suavedesign

Wrap your nav div in a wrapper div. Set the wrapper div width:100% set the nav div to the width of the page content than margin:0 auto; : .nav_wrapper{ width:100%; background-color: #FFF; //Change this to the background color of your nav bar } .nav_bar{ width: 800px; //Change this to the …

Member Avatar for suavedesign
0
5K
Member Avatar for sheshagirig

Your inputs all have the same ID / Name so when JS does the getElementById it just gets the first element it finds on the DOM. You could convert everything into an array and turn it into JSON, you'd have to look up how to do this with standard JavaScript …

Member Avatar for sheshagirig
0
175
Member Avatar for default_098

I don't know what you want to dictate what element gets what color. But if you create three different CSS styles you can change the class of a td element: document.getElementById("234").className = "green_box";

Member Avatar for GliderPilot
0
207
Member Avatar for bangla

Once you submit that form to PHP all your radio box values will be available in the $_POST array by their name (i.e. $_POST['Answer1'] would have a value of LID1_1 or LID1_2 depending on which answer was selected. From there you just need to do a conditional if statement if($user_answer …

Member Avatar for GliderPilot
0
103
Member Avatar for MrXortex

Its diffacult to help when we don't have any code, how can we suggest "another" solution when we don't know what you're doing now? On a side note, this is an HTML CSS issue not a PHP issue so it's posted in the wrong place as well. Generally, if you …

Member Avatar for jspence29
0
370
Member Avatar for shahai.ali

A lot of the big social media websites have what's called an API (i.e. https://dev.twitter.com/ and http://developers.facebook.com/) which will allow you to have a user login to their account from your website at which point you can interact with their friends.

Member Avatar for AndreRet
0
291
Member Avatar for DarkMonarch

I agree with pritaeas, when it comes to security the more "layers" you can have the more secure you will be. While PDO helps to mitigate risk, there will always be unexpected input or ways discovered to circumvent that particular security check. For proper risk management I would alwyas verify …

Member Avatar for diafol
0
123
Member Avatar for kiLLer.zoh

The printf function expects a string passed to it as a parameter to output. i.e. printf('Hello Word') you don't need it, you can just run the query. $qry="Insert into `postjob` (jobtitle,positions,category) VALUES('".$_POST['title']."','".$_POST['position']."','".$_POST['cate']."')"; `mysql_query($qry) or die (mysql_error());`

Member Avatar for GliderPilot
0
112
Member Avatar for cheelo007

Just thinking outside the box here, could always be a misconfigured session setting in php.ini or cookies disabled.

Member Avatar for cheelo007
0
383

The End.