39,316 Topics

Member Avatar for
Member Avatar for nadiam

Hi guys, so i have a table populated by event details from database and i use a checkbox to select which event to be deleted: echo "<tr> <td><input type='checkbox' name='check[]' class='check' value='$id'>$name</a></td><td>$formatDate</td> </tr>"; my delete function: <?php if(isset($_SESSION['sess_user_id'])) { if(isset($_POST['del_event']) && isset($_POST['check'])) { require "connection.php"; $userid = $_SESSION['sess_user_id']; foreach($_POST['check'] as …

Member Avatar for diafol
0
460
Member Avatar for Pravesh_1

I want to count records using datediff() and where condition; I am getting the result with no. of days; but cant count records with condition; below is the my query SELECT DATEDIFF(CURDATE(), jobs.jobs_listed_date) FROM tbl_first_category AS FIRST , tbl_second_category AS SECOND , tbl_jobs AS jobs WHERE first.fc_id = second.sc_fc_id AND …

Member Avatar for Pravesh_1
0
148
Member Avatar for mexabet

I'm trying to code a registration form. But I'm stuck at adding a borrowed code of image upload, resize, save and store its path in MySQL database. The error message is "Undefined index: fileimage" on the line where I have this code: if($_FILES['fileimage']['name']). Here is the register.php: <?php // include …

Member Avatar for mexabet
0
668
Member Avatar for diafol

Hello All. Been playing around with some linked dropdowns. It seems to be a recurring theme here on DW, so I thought I'd offer this up as a possible solution or for discussion, to see how it could be improved. The premise for this set of linked dropdowns is that …

Member Avatar for diafol
5
963
Member Avatar for Priti_P

I have array of keys. $all_skills2= CHtml::listData(Skill::model()->findAll(array('order' => 'skill')),'skill_id','skill'); $database = array_fill_keys($all_skills2,''); this array looks like: Array ( [Android] => [ax] => [bbb] => [Big Data] => ); now i want to fill values to this array. where values are in another array **$skill_type_count** which i got from below code: …

Member Avatar for Priti_P
0
254
Member Avatar for Ryan_12

Hey everyone! I've created my db.php and all my other scripts are fine.. just when I created a new page and included db.php I created a function. In the function I used my $dbh variable and it is throwing an error... > Notice: Undefined variable: dbh in C:\xampp\htdocs\Crafting Bench Server …

Member Avatar for Ryan_12
0
2K
Member Avatar for iamthwee

Bit of an open question I must admit but I began working on my own CMS in codeigniter. Trouble is - it is getting massive and taking very long. Now I like that wordpress has most of the things already integrated so I was just wondering who here has integrated …

Member Avatar for iamthwee
0
2K
Member Avatar for davy_yg

Hello, I am creating an upload material program for elearning. Now, I have an exe file, if I run it from my computer it's directly open a new browser and run it's content. Now, if I click the material list in my web browser, it's asking me to save the …

Member Avatar for veedeoo
0
149
Member Avatar for mohamed_36

How do I upload photos to a mysql database using php and I again reproduce an image from the database and displayed in the browser

Member Avatar for Ryan_12
0
171
Member Avatar for asheesh.mehta.54

hpw to store a permanent value in php variable? for eg input.php <form action = "output.php" method = "post"> <input type = "text" name = "q"> <input = "submit"> </form> ============================================ now output.php <?php $a = $_POST['q']; echo $a;?> now when we upload output.php in new tab it has no …

Member Avatar for Ryan_12
-1
231
Member Avatar for Hegneous

Why is this code note updating the database???? <?php include '../connection.php'; $today = new DateTime('2014-7-14 20:10:10'); $appt = new DateTime('2014-8-15 20:10:10'); $days_until_appt = $appt->diff($today)->days; if ($days_until_appt>=30) { $sql = "SELECT username FROM users WHERE position = 'Tenant'"; $result = mysql_query($sql) or die(mysql_error()); echo '<table align="center" border="1" cellpadding="0">'; echo '<tr align="center"><th> …

Member Avatar for DJBirdi
0
179
Member Avatar for freddyparc

Pease I need your help! I am very new in Php programming,I just downloaded wampserver on my system and also komodo for text editor.I launched komodo to place my text and saved the file with the file extension .php then try to run the script for web browser to display …

Member Avatar for pzuurveen
0
196
Member Avatar for Hegneous

I need help to be able to credit tenants that are in my system after every 30 days of stay. Code in either PHP, AJAX, jQuery

Member Avatar for Hegneous
0
221
Member Avatar for lyrico

Hi to All, Can anyone show me a sample alarm script using php or javascript? The alarm was base on the record at the database. I mean, for example I have records that have overdue, the user is the one who state the overdue. For example, the user input his …

Member Avatar for diafol
0
738
Member Avatar for Owere

Please can some one help me descrypt the below php code i using it for my project, i encrpyt it through a code given to me by friend.

Member Avatar for pritaeas
0
53
Member Avatar for wikit

Hi there me again, sry for the many questions but only way to learn for me is to try (even if I cant succeed) Please feel free to ask any questions of me if I'm not being clear :) What i'm trying to do is basically a auto-select or I …

Member Avatar for urtrivedi
0
138
Member Avatar for sehrish naimat

i have a dopdown menu which shows the list of tables in the database..now i want to dispaly the result of the selected table from the database in the dropdown menu on submit but i am unable to get how to do it,kindly help.. <? $link= mysql_connect("localhost","root","") or die ("could …

Member Avatar for sehrish naimat
0
188
Member Avatar for 9tontruck

I am setting up a wordpress page on an ubuntu server with Apache/2.4.6 (Ubuntu). Here is what I did: 1. I enabled rewrite mod with : a2enmod rewrite 2. Changed "AllowOverride None" to "AllowOverride All" in apache2.conf :vi /etc/apache2/apache2.conf <Directory /> Options FollowSymLinks AllowOverride **All** Require all denied </Directory> <Directory …

Member Avatar for gabrielcastillo
0
127
Member Avatar for Mohamed_26

Hello Everyone I am using this service 000webhosting.com to host my website. When I tried to connect to the database. I got this error Could not connect to the database a7848759_lumos :SQLSTATE[28000] [1045] Access denied for user 'a7848759_fareedh'@'10.1.1.13' (using password: NO) This is my code below `<?php ` $host = …

Member Avatar for Mohamed_26
0
631
Member Avatar for Inspiron

our problem is " Cannot modify header information - headers already sent "? Is anyone know about this problem that why this happen?

Member Avatar for almostbob
0
121
Member Avatar for jeet88

in my SE site when i use <h2> it becomes <h1> autometically and <h3> tag becomes <h2> can any one tell me what is the reason?

Member Avatar for diafol
0
53
Member Avatar for davy_yg

Hallo, I download opensource file uploader from the internet and there is one problem with it. I cannot exceed the limit of php.ini maximum file size: file-upload.php // we should not exceed php.ini max file size $ini_maxsize = ini_get('upload_max_filesize'); if (!is_numeric($ini_maxsize)) { if (strpos($ini_maxsize, 'M') !== false) $ini_maxsize = intval($ini_maxsize)*1024*1024; …

Member Avatar for cereal
0
244
Member Avatar for rjusman90

<html> <body> <div id="content"> <style> .current { padding: 2px 5px 2px 5px; margin: 2px; border: 1px solid #000099; font-weight: bold; background-color: #000099; color: #FFF; } li { display:inline-block } </style> <?php include"connection.php"; $start=0; $limit=5; $page=''; if(isset($_POST['fullname'])){ $term=$_POST['fullname'];} if(isset($_GET['page'])){ $page=$_GET['page']; $start=($page-1)*$limit; } { if(isset($_POST['Submit'])){ $query=mysql_query ("select * from users where FirstName …

Member Avatar for rjusman90
-1
180
Member Avatar for nadiam

Hi, so im trying to insert data but i get: > Notice: Undefined index: events html part: <form method="post" action="seating.php> <div class="drop"> <label>Event : <label/> <select name="events" id="dd-events" onchange="getguests(this.value)"> <option value="" disabled selected >Event</option> <?php foreach($retrieve as $r): ?> <option value="<?=$r['event_id']?>"><?=$r['event_name']?></option> <?php endforeach ?> </select> </div> <input type="hidden" name="table_name[]" value='+tablename+'><span …

Member Avatar for nadiam
0
3K
Member Avatar for ishlux

Hi all, i am storing the value in session but while retrieving its showing the some other value.....totally i want this stored value in the next page .........can u help me........... This is the code i am storing the value in session [code=php] <? session_start(); include('database.php'); $mailid1 = $_GET['mail_id']; session_register('mailid1'); …

Member Avatar for Hegneous
0
920
Member Avatar for wikit

So I know I can restrict the viewing of a page by session/access using this <?PHP require_once('../../lib/connections/db.php'); include('../../lib/functions/functions.php'); checkLogin('2'); $getuser = getUserRecords($_SESSION['user_id']); ?> is there a way to add to that if the id of the page doesnt match the username in the same database it wont allow you to …

Member Avatar for wikit
0
346
Member Avatar for hriti

i have been trying to upload music file but the file will not upload but all the picture upload are successfully . i need some help . i want to upload music file to a directory in my server but i have been having problems with it. unable to upload …

Member Avatar for cereal
0
266
Member Avatar for nevil120

I have Android app and 1 php application. I want to invoke android function when the button is clicked on my php application (on latop-pc browser). So basically Php to android communication. How to achieve that?

Member Avatar for timetraveller1992
0
167
Member Avatar for sanjay@srvmedia
Member Avatar for aseel_1

s their an error in this code ?? !! it display Image uploded successfully but it isn't !!!!!!! if(isset($_POST['submit'])) { $query="insert into POST (Title,SubTitle,PostDetail,PDay,PMonth,PYear) values('$_POST[_title]','$_POST[_subtitle]','$_POST[_detail]',". date("d").",".date("m").",".date("y").")"; //echo $query; mysql_query($query); $msg="post added sucsessfully"; if($_FILES['_postimage']['tmp_name']!= "") { move_uploaded_file($_FILES['_postimage']['tmp_name'] ,$_SERVER['DOCUMENT_ROOT'].'/Aseelblog/POST_imgs/a.jpg'); $msg.="</br>Image uploded successfully"; //DOCUMENT_ROOT=/var/www/example ///// } else { $msg.="image File too large or …

Member Avatar for veedeoo
0
154

The End.