Question: How can I get the user information when the user successfully login?
Here is my login.php code
<?php
if($_SERVER['REQUEST_METHOD'] == 'POST') {
$username = $_POST['username'];
$password = $_POST['password'];
// mysql connect function here....
// mysql query here....
$sql = "SELECT * FROM user_accounts WHERE usernam...
Hey all,
I've got an about page, and two HTML columns and I want to while loop the contents of my mysql query into BOTH columns, even though they are defined as two different divs. What I was thinking of doing is somehow dividing the amount of rows in the mysql database by 2, and then showing half and half, but I'm not sure how to do thi...
Today only I have noticed and found out the importance of using === operator. You can see it in the following example:
$var=0;
if ($var==false) echo "true"; else echo "false"; //prints true
$var=false;
if ($var==false) echo "true"; else echo "false"; //prints true
$var=0;
if ($var===false) echo "true"; else echo "false"; //prints fal...
There is a function similar_text() in the PHP library. The documentation (http://php.net/manual/en/function.similar-text.php) tells me that "This calculates the similarity between two strings as described in Oliver [1993]."
Despite extensive searching, I can't find the paper that "Oliver [1993]" is referring to; nor any candidate for w...
Session is not maintained when page gets redirected to another in my localhost,
I have a admin login page of my osCommerce v2.0 site, whenever i login its the session registered in login page is not found in index page hence redirected back to login page...
Please guide me why this happening in my localhost and not in my server?
...
I have a number of exported text fields from an old access database that are being ported over into a new mysql structure. There are various field inputs in the format:
10/06/2010 09:10:40 Work not yet started
I would like to take that string and use some sort of regular expression to extract the date/time information and then the com...
Can any one please let me know Why the Sagepay SSL connection timeout error is occur? What the mistake i may did? any ideas would be appreciable.
...
I need to render a view from inside a view.
For the sake of question, i'll call them blocks.
I have 5 controllers, each of them has an action that is called BlockAction(), and it displays some of the information from that controller.
In the Index page for the whole website I need to call all 5 of those BlockAction views. What could be...
Hi,
I'm quite new to the whole jQuery/JSON thing but thought I would give it a go. The idea is that I am posting data to a PHP script and then returning a JSON object. This works fine on my localhost but on the web server, Firebug shows that the JSON object is being returned but I also get a 404 error.
Any ideas where I could be going ...
curl -F 'access_token=...' \
-F 'message=Hello, Arjun. I like this new API.' \
https://graph.facebook.com/arjun/feed
The documentation says I need to issue one to publish to the wall.
...
i have an array that looks like this, I want to search for a saleref and get it to give me the key in PHP, i've tried using array_search but i get nothing back. Alternatively i just want to display the other values in the same array as the salesref searched if there's a better way.
Array
(
[xml] => Array
(
...
how to replace slashes from beginning and end?
So for example, all of these:
/this/that/
/this/that
this/that/
////////this/that////////////
... become:
this/that
...
Using Gallery2 a standard gallery system I use I just installed on one of my websites. I then used a pretty simple Clean theme for including a header.php and footer.php files to match the same layout as the main website.
However, when I installed the theme/plugin I was prompted with this:
Clean theme based on Siriux.net Gallery...
I have two arrays in php
$arrNum = array(1.7, 1.52, 0.01, 0.11);
$arrStr = array('1.7', '1.52', '0.01', '0.11');
Note that the second array is the same as the first one, except it has the values as strings.
Is it possible for a sorting or max/min operation to return a different result for the second array just because they are strin...
Hello guys,
i have a basic two column webpage i did with css. it includes a header,footer,sidebar and bodycontent.
i'd like to generate css attached to the document dynamically so it will change the arrangement and color.
if i open the page with urlencoded values like page color, body color, sidebar position(left or right).
i can do ...
All,
I don't really understand the usage case for named placeholders bindParam(':blabla', $blabla) versus numbered placeholders bindParam(1, $blabla). Is it mostly a question of readability?
Thanks,
JDelage
...
In my system we do action, and for reporting sake we log that action on another server (star schema if it interests).
Obviously I need the action updates/inserts be in the same transaction as the logging.
So, is there a way to include two different sqls to two different servers in the same transaction?
Right now I manage that in the code...
Hi,
Bit of an odd question but I'm hoping someone can point me in the right direction. Basically I have two scenarios and I'd like to know which one is the best for my situation (a user checking a scoreboard on a high traffic site).
Top 10 is regenerated every time a user hits the page - increase in load on the server, especially in h...
In most of the tutorials for PHP MVC design structures, a router class is used to take user input and look up the right controller in order to process that input accurately. The input normally takes the form of a url. For example http://example.com/foo/bar/ would ask the router to find the controller named foo and fire the method bar.
P...
Hi all,
why isn't my while loop getting the mysql database entries and presenting them like demonstrated? Thanks :).
<?php $djs_all_db = mysql_query("SELECT * FROM djs")
or die(mysql_error());
$djs_all_num = mysql_num_rows($djs_all_db);
while($djs_all = mysql_fetch_array( $djs_all_db )) {
if ($djs_a...