39,326 Topics

Member Avatar for
Member Avatar for malatamil

after login if i click logout (logout.php) its nor redirecting to login page. its stuck in logout.php page. logout.php <?php session_start(); session_destroy(); if(!$_SESSION['username']){ header("Location: login.php"); } ?> index.php <?php include("config.php"); session_start(); $usern = $_SESSION['username']; //if(!isset($_SESSION['sess_user_id']) || (trim($_SESSION['sess_user_id']) == '')) { if(!$_SESSION['username']){ header("location:login.php"); } ?> <div class="cssmenu"> <ul> <?php if($usern){ ?> …

Member Avatar for malatamil
0
229
Member Avatar for Web_2

I have two radio button that are value 0 and 1 stored in mysql database after that i want to enable(when value is =1) or disable(when value is =0) button. i new to php please give me code for that some thing like that... <input type="submit" ... <?php&nbs p;if (/* …

Member Avatar for Web_2
0
6K
Member Avatar for safi.najjar1

Hello guys I'm wondering how to update rows dynamically for instance: if cart contains one product then update its quantity and if cart contains more than one product update their quantities

Member Avatar for happygeek
-2
147
Member Avatar for berserk

I need help adding new users to a table i have made for an admin that can add or delete users from said table freely. What i have so far is an entry that can add date and time but for some reason it doesnt add the username and password. …

Member Avatar for berserk
0
651
Member Avatar for Priti_P

hello, i have array Array ( [certificate] => Array ( ['name'] => Array ( [1] => 11 [2] => 22 [3] => 33 [5] => 55 [6] => 66 ) ['date'] => Array ( [1] => 1111 [2] => 2222 [3] => 3333 [5] => 5555 [6] => 6666 ) …

Member Avatar for niranga
0
131
Member Avatar for gaurav12
Member Avatar for cereal
0
92
Member Avatar for safi.najjar1

Hello guys I've coded cart class with cart items and showed cart items in a table but I had a problem when I try to update the cart.. It updates all the cart items when I'm changing quantity in one of the items **HTML** <div class="cartContainer"> <h1 class="shoppingBag">your shopping bag</h1> …

Member Avatar for safi.najjar1
0
417
Member Avatar for ilovephp798

is it possible to make INSERT all checkbox values into database when there is **not even one** checkbox being checked since im using **array_diff** as shown below? my problem currently facing is, when there is a checkbox being checked, it will insert into checked_table and the remainder options which did …

Member Avatar for ilovephp798
0
1K
Member Avatar for RonKevinT.Manuela

SO i WAS TESTING my code..and it doesnt seem to work...here it is <?php require_once('../includes/config.php'); if ($_Session['roleID']=1) { echo "admin"; } elseif ($_Session['roleID']=2) { echo "faculty"; } ?>

Member Avatar for RonKevinT.Manuela
0
809
Member Avatar for RonKevinT.Manuela

hello masters, I have a problem regarding limiting the pages a certain user can access..in my case, i have added a roleID to my members table... here is the original code first <h1>Welcome SICS Admin!</h1> <ul id='adminmenu'> <li><a href='index.php'>Modify News Archive</a></li> <li><a href='categories.php'>Categories</a></li> <li><a href='users.php'>Faculty</a></li> <li><a href="../" target="_blank">Department Website</a></li> <li><a …

Member Avatar for ehpratah
0
226
Member Avatar for mwnt2014

Want to count ads clicks and Impressions using wordpress plugin. how to do this .. send me the links regarding this.. Clicks and impressions have to store in other domain database.

0
115
Member Avatar for James singizi

**i have some code to redirect a user to a page if their login details are correct. part of the code is as below but it never redirects to the specified page. help me sort this out** if($pass==$dbpass){ //safely redirect user to the home page and start a new session …

Member Avatar for jresponse
0
226
Member Avatar for showman13

Here is the scenario... I have a website that orignated as an MLM / retail combination site... It was determined that we needed some seperation between the Rep portion and the Retail portion, so I spent weeks modifying the code in over 40 scripts to separate a visitors path basedn …

Member Avatar for diafol
0
1K
Member Avatar for bLuEmEzzy

Guys, I know its easy to do it, but I'm having a hard time doing it. Please help me, I want to get the checked items in checkbox. The problem is that it gets the last value of it. I just used echo to get all the values, but how …

Member Avatar for bLuEmEzzy
0
175
Member Avatar for jovstudios

Hello Guys, I have a Question, it possible storing image to dabase using blob in the Framework of CI? This is my Code in Controler. function get_data_from_post(){ $data['page_headline'] = $this->input->post('page_headline',TRUE); $data['page_title'] = $this->input->post('page_title',TRUE); $data['keywords'] = $this->input->post('keywords',TRUE); $data['description'] = $this->input->post('description',TRUE); $data['page_content'] = $this->input->post('page_content',TRUE); $imageName = $_FILES['featured_img']['name']; $data['featured_img'] = $this->input->post(file_get_contents($_FILES['featured_img']['name']),TRUE); return $data; …

Member Avatar for jovstudios
0
8K
Member Avatar for toxicandy

Eariler I wrote this topic: http://www.daniweb.com/web-development/php/threads/482142/searching-using-optional-parameters and I got ideas and got to this point with help of another guy: <?php $whereClause = "WHERE "; foreach($_POST as $k => $v ){ if( $v != "" ){ $whereClause = $whereClause . $k . "='" . $v . "' AND "; } …

Member Avatar for cereal
0
140
Member Avatar for berserk

I have this code which ironically WORKS on another page i have but for some reason will not work with my new page even though LITERALLY its the exact same function and should work regardless but with my luck it wont so i need help, maybe i have a small …

Member Avatar for berserk
0
302
Member Avatar for RikTelner

So. I've been trying to use switches from PHP. I've done this many many times. I end up cursing up entire world and threatening everybody in the world, I was sitting here for about an hour screaming the worst curses there possibly exist. I don't know what happened. I don't …

Member Avatar for RikTelner
0
109
Member Avatar for sanjay@srvmedia
Member Avatar for Ketul_1
Member Avatar for davy_yg

Hello, I wonder why this condition does not work: registration3.php <?php include('includes/koneksi.php'); $email = isset($_POST['email']) ? $_POST['email'] : ''; $confirmation = isset($_POST['confirmation']) ? $_POST['confirmation'] : ''; $password = isset($_POST['password']) ? $_POST['password'] : ''; $fname = isset($_POST['fname']) ? $_POST['fname'] : ''; $lname = isset($_POST['lname']) ? $_POST['lname'] : ''; $gender = isset($_POST['gender']) …

Member Avatar for Webville312
0
144
Member Avatar for ilovephp798

Hi all, i would like to ask about, i have (date_from) and (date_to), and i want the range of the date show in the checkbox. Example: date from: 6/8/2014 and date to: 8/8/2014. it will show 6/8/2014, 7/8/2014 and 8/8/2014 along with check box. so, i have success make the …

Member Avatar for ilovephp798
0
213
Member Avatar for UK-1991

Hello guys I really need your help. I Had created attendance system but I stucked up with time in button. I have created a time out and time in button and both are working fine and great but the main problem is that I am unsuccessful for making the time …

Member Avatar for UK-1991
0
917
Member Avatar for gogs85

How to share sigle post when click on button ex. fbshare, twitshare and show them in facebook. Do you know some examples or tutorial?

Member Avatar for mexabet
0
85
Member Avatar for hanspeare_1

Good Day, There's a sticky that TUT about uploading image but i want the restrictions to be in this manner. But my problem here is no notice, no errors but the image file won't upload eventhough the other data has been updated, Here, check my codes. this quite long to …

0
158
Member Avatar for DJBirdi

Well, it has recently been bugging me that I have 8 years of working with PHP under my belt and not once have I tried to implement a custom solution to integrate PayPal into any of my ecommerce projects. I've worked with a lot of PCI API's from different providers …

Member Avatar for DJBirdi
0
277
Member Avatar for mwnt2014

Want to show div on front end wordpress website with wordpress plugin.. If User activate the plugin then div should show on the front side of the wordpress .how to add ? Used add_filter('thecontent') and some more. nothing is working .

Member Avatar for mwnt2014
0
255
Member Avatar for davy_yg

Hello, I am creating an elearning that tries to record date and time and I am looking for an automated system to do that so that the user won't enter any other information: As far as now, I only uses Date Time [ input textbox ] Is there other way …

Member Avatar for Ketul_1
0
264
Member Avatar for rjusman90

<?php session_start(); ?> error_reporting(E_PARSE); include "connection.php"; $User_ID=$_SESSION['UserId']; $query = mysql_query("SELECT * FROM Users WHERE UserID='$User_ID'"); $row = mysql_fetch_array($query); $filename=$row['PicUrl']; $username=$row['UserName']; $fName=$row['FirstName']; if(isset($_SESSION["UserName"])){ if(!empty($filename)){echo '<img src="'.$filename.'" align="left"width="150px" height="100px"/>';} echo $fName; echo"<li><a href='logout.php'>Click here to Logout.</a></li>"; echo"<li><a href='user_update.php'>edit your account detail</li>"; } if(empty($_SESSION['UserName'])){ echo"<li><a href='login.php'>login</a></li>"; echo"<li><a href='register.php'>Sign Up</li>"; } ?> </li> </ul> …

Member Avatar for Ketul_1
0
156
Member Avatar for marifard

Hi, I make a delete page with php to delete clients from clients table. With this page I try to delete images from gallery table. for example I wish to delete client ABC from clients table and it have three images in gallery table. here under I paste the code …

Member Avatar for Ketul_1
0
158

The End.