22
votes
10answers
9k views

What are good PHP and MySQL type Blogs to read? [closed]

I searched and found many topics similar to this on Stackoverflow, but they were all for languages that I do not use. I am interested in reading good blogs with an RSS feed in topics related to PHP, ...
13
votes
6answers
26k views

How to access PHP variables in JavaScript or jQuery rather than <?php echo $variable ?>

How do I access PHP variables in JavaScript or jQuery? Do I have to write <?php echo $variable1 ?> <?php echo $variable2 ?> <?php echo $variable3 ?> ... <?php echo $variablen ...
8
votes
8answers
3k views

Whats the easiest way to determine is a user in online? (PHP/MYSQL)

Is there a way I can piggy back sessions to know is the user is online? I.e: use logs on, I set a $_SESSION variable, user times out- cookie Garbage collector updates the database to update their ...
7
votes
2answers
8k views

CORS with php headers

I have a simple php script that I am attempting a cross domain CORS request: <?php header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Headers: *"); ... Yet I still get the ...
7
votes
5answers
8k views

How to remove carriage returns from output of string?

I am using wordpress as a CMS and trying to allow user fields to be input to populate the info windows in a Google Map script. I am using this to select the id and pull in the content from a custom ...
7
votes
4answers
1k views

Does https secure cookies prevent XSS attacks?

Does https connection secure cookies and prevents XSS attacks. I have a simple blog that allows users to enter JavaScript code as an input. I want to allow Javascript input by the user while still ...
6
votes
5answers
4k views

How to add anchor tag to a URL from text input

I want to be able to take user inputted text in a comment field and check for URL type expression, and if it exists, add an anchor tag (to url) when the comment is displayed. I am using PHP on the ...
6
votes
5answers
117 views

Move JS code from HTML to source in HEAD section

I have a problem, and I would like you to guide me to solve it if you do not mind ... In my HTML source code had several pieces of css codes here and there. So I decided to put together into a file ...
6
votes
2answers
1k views

Encryption in nodejs

I'm trying to port the following php code to javascript on node.js: $mac = hash_hmac('SHA256', 'string', 'secret', true); $coded = base64_encode($mac); I've tried the following: var Crypto = ...
3
votes
1answer
35 views

How do you make a text field automaticly add - after certain numbers

How do you make a text field automatically add - after certain numbers. So if I was typing a date, 20120212, it would automaticly add a - after the first 4 digits, the second two so it outputs like ...
3
votes
4answers
83 views

jQuery scrollbar plugin not working on Ajax loaded content

The problem is this: I have a simple, two fields form which I submit with Ajax. Upon completion I reload two div's to reflect the changes. Everything is working perfect except a jQuery plugin. It's ...
2
votes
7answers
685 views

if(value == null) vs if(null == value) [duplicate]

Possible Duplicate: Why does one often see “null != variable” instead of “variable != null” in C#? This is more a curiosity question, is there any performance ...
2
votes
3answers
10k views

Problem with jQuery AJAX requests: relative vs. absolute urls

I'm having a hard time getting my AJAX requests to work on a staging server. It all worked fine on my development machine, but as soon as I uploaded it, all my AJAX requests stopped working. I found ...
2
votes
3answers
984 views

Is it possible to query a MySQL database using the results from map.getBounds() with Google Maps API v3?

I have a MySQL database that contains a large number of polygons, one for each district on a map. They are all quite complicated and it's unrealistic to simply load them all at once. I've looked into ...
2
votes
4answers
1k views

Is it possible to block cookies from being set using Javascript or PHP?

A lot of you are probably aware of the new EU privacy law, but for those who are not, it basically means no site operated by a company resident in the EU can set cookies classed as 'non-essential to ...

1 2 3 4 5 1988
15 30 50 per page