Quantcast
Channel: PHP Freaks: PHP Help
Browsing all 13200 articles
Browse latest View live

Running code when Session ends

How can you run a query or a piece of code when a session ends or the user exits the browser with out logging out?    Thanks.        <?php   session_start();...

View Article


Form Submits but Doesn't Save Into Database

Hi.  I need some help please.  I'm still new to all this coding and have been at a road block for the past few days trying to figure this out.  Here's my problem:   I have created a form for my...

View Article


Displaying a success message dilemma.

Good evening,   I have a contact form which when submitted, gets processed inside my main index.php file and inserts into the database via a separate file for my query, 2 directories above this file....

View Article

Form submission prompts encryption message on select browsers

I'm not sure if this is the best place to post this issue, but any help is much appreciated.   We have a form on our Magento site, that when submitted on Firefox, prompts the following security...

View Article

Call to undefined method PDOStatement::exec()

LAMP environment, PHP 5.4.13, MySQL 5.5.30.   Code snippet: $db = new PDO('mysql:host=localhost;dbname=test',$username,$password); $sql="INSERT INTO `atable`( `user`,   `expires`,  `approved_by`,... )...

View Article


if else on row-based calculation

Hi,   I'm trying to develop an online merit award system for our school at the moment.   I've got a table that notes the different types of awards that students can get, in various columns, with the...

View Article

Only allowin images to be uploaded

I'm a little stuck on how to make it to where only images can be uploaded and not all files. Thanks in advance! <?php // Your file name you are uploading $file_name =...

View Article

why my code print out the last line only ?

This is my coding. It can run, but the only thing is, it will print out the last line of the data in the table. Why is that happening ? Because I have more than 100 data.     <?php // set database...

View Article


Custom CMS Help for a noobie!

Hey guys! I'm new to the forum, but I'm making this post because of my sincere frustration with PHP right now. I love web development and I do have a passion for it. Right now I'm working on a personal...

View Article


TCPDF table

I want to print the values from the database dynamically.How can i?   Here in TCPDF example_011   http://www.tcpdf.org...example_011.pdf   they used static table.How can i output the data...

View Article

Loading image from php include

My first post, here. I'm a newbie in PHP. I'm stuck in a simple problem I have my index.php in the base folder which includes right.php. This right.php has to load an image (base folder/img) but it's...

View Article

Class not returning variable values

I have converted an old pagination function I've had for years to a class as I've recently started to learn OOP   The problem is that it doesn't display any anything except the <ul></ul>...

View Article

Making query-result a link to new query

Hello!   I have made a query and displaying this - it's working. But I want this query-result to be a link (href) to another query that I want to display.   My query right now is:  <ul> <?php...

View Article


Add, edit, delete script problems

I edited a add, edit, delete script from database and I am running into 2 problems I cannot fix. Can anyone tell me what I am doing wrong?   First the index.php works fine. <!DOCTYPE html PUBLIC...

View Article

echo a message on reaching 0 on jquery countdown timer?

I am at my wits end with this as i really need to move on and I'm stuck with such a simple task! any help would be greatly appreciated. what I am trying to do is to echo a Times Up message once the...

View Article


Permalinks with PHP/MySQL

I have a created a quite simple script that builds permalinks, using PHP/MySQL. Yes, I know that it is normally done by altering the htaccess-file, but my host does not provide it.   This works for me,...

View Article

Property Panic (2) - Whats wrong ? / Help

Can somebody could help me please , I am php beginner student. Property Panic (2) Good job, now we have some properties. But right now $teacher and $student are the same, which should be changed...

View Article


Method will not run.

I have the following code: $new_model = new Model; $check_valid = $new_model->check_invalid_lineup($team_selection); echo $check_valid fails to work.   I have checked, it is a valid function, with...

View Article

Question about using mysqlli

Hey guys. I have been reading a tutorial on how mysqlli works... and I am little confused on how the following works.   Below is the database class... <?php Class Database { private $_connection;...

View Article

Session to Database

I have a hard question that hopefully somebody could help me with.   I'm trying to make a website that teaches tutorials on certain subjects and lets just say your on page 5 in the subject "Math" and...

View Article
Browsing all 13200 articles
Browse latest View live