39,323 Topics

Member Avatar for
Member Avatar for toxicandy

I have a form which pushes data to this page: <?php session_start(); if(!isset($_SESSION['sess_user_id']) || (trim($_SESSION['sess_user_id']) == '')) { header("location: login.php"); exit(); } if($_SESSION['sess_status'] < 0){ header("location: sorry.php"); exit(); } $tz = new DateTimeZone('America/Chicago'); $age = new DateTime(filter_input(INPUT_POST, 'dob', FILTER_SANITIZE_STRING)); $checked = filter_input(INPUT_POST, 'minor', FILTER_SANITIZE_STRING); $now = new DateTime('NOW'); $y = …

0
87
Member Avatar for JasonWung

I have page where I display thumbnails of different image albums/categories and I try to make it when user click on the thumb to open modal with all images loaded from this category. The problem is that is seems I can't understand it very well how exactly will happen this. …

Member Avatar for diafol
0
4K
Member Avatar for Vivek_13

<?php $query = mysql_query("select * from `tbl_student`"); while($data = mysql_fetch_array($query)) { $output[] = array ($data[0],$data[1],$data[2],$data[3], '<select class="form-control select1" id="'.$data[0].'"> <option 'if(----){'selected'}'>asd</option> <option >dasd</option> <option>asd</option> </select>'); } echo json_encode($output); ?> <!--here code of if() throw error-->

Member Avatar for Vivek_13
0
403
Member Avatar for satheeshakira

I am used codegniter 1.7.1 older version for my real estate stie and it is working fine in local host xamp server. But when i uploaded in to server, the site not working , showing error as "Fatal error: Cannot redeclare class Locale in /application/libraries/Locale.php on line 12" pls help …

Member Avatar for Walid_1
0
1K
Member Avatar for bolfescu

Hy i'm having a problem with my php excell, i'm having two rows in mydb, but he export only one row from db, if i will insert the thrd row in db it will show me always two.... this is the code require_once 'Classes/PHPExcel.php'; $objPHPExcel = new PHPExcel(); // Set …

Member Avatar for bolfescu
0
160
Member Avatar for ramsiva

In my project i have a problem is: Without clicking browse button we have to get name using <input type="file"> any body help me to clear this one <img src="<?php echo $image; ?>" style="width:190px; height:150px;" /> <input type="file" name="userfile" id="userfile" value="<?php echo "Penguins.jpg"; ?>"> i am not getting the userfile

Member Avatar for cereal
0
195
Member Avatar for fireburner29

Hi, How to make visible directory using htaccess? am using this in my htaccess. am getting below error. Server error! The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. If you think …

Member Avatar for diafol
0
351
Member Avatar for d_randhawa

case "remove": if(!empty($_SESSION["cart_item"])) { foreach($_SESSION["cart_item"] as $k => $v) { if($_GET["id"] == $k) { unset($_SESSION["cart_item"][$k]); } if(empty($_SESSION["cart_item"])) { unset($_SESSION["cart_item"]); } } header("location:cart.php"); } break; i m tring to delet item from session array for a shoping cart my function work ehrn i add singel value in cart but when i …

Member Avatar for d_randhawa
0
2K
Member Avatar for riwakawd

On my controller I have a variable called 'name' => $child['name'], for my drop down menu. The problem I am having is that in the child dropdown menu it still shows parent name. I am trying to make it so if parent_id name is equal 0 then will not show …

Member Avatar for riwakawd
0
179
Member Avatar for OldDeveloper01

This is the scenario. I have a defaultimage in an 'images' folder. When someone registers it creates a directory like so: mkdir("../users/$new_userid/images",0755); Each time someone registers i want also the defualtimage to be copied to the new users directory, so they then have an image to start off with. Thanks …

Member Avatar for ramsiva
0
3K
Member Avatar for AntonyRayan

Hi, I need a code for downloading a file in doc, docx and image in pdf format in php My code is working in downloading but while opening the I can`t

Member Avatar for jj.dcruz
0
146
Member Avatar for Israel_2

So I have this simple query that if I run it on sql server management studio it gives me results. Select name, count(*) As thecount from Restaurants group by name I am using codeigniter and a wrapper library for datatables called [ignited datatable](https://github.com/IgnitedDatatables/Ignited-Datatables/wiki/Function-Reference) . I am using it because its …

0
263
Member Avatar for yaginuk

Hi, i have had made in the past a php file to download a supplier list in xml format, import it to a temp database with a datestamp then the file will check to see if product exists or not, has been removed from the file since last time or …

Member Avatar for diafol
0
243
Member Avatar for ikel

The following code produces the XML file that I am after. $dom = new DOMDocument('1.0', 'UTF-8'); // pretty formatting $dom->formatOutput = true; // create root element $root = $dom->createElement('Poem'); $root->setAttribute('object_id', '542'); $dom->appendChild($root); // create title element $title = $dom->createElement('title'); $root->appendChild($title); // create a node for the title element $text = …

Member Avatar for diafol
0
2K
Member Avatar for Prince_9

Please how can I turn curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "http://search.yumpu.com/2.0/search.json?q=s.moser&in=author" to php. Thanks.

Member Avatar for Prince_9
0
962
Member Avatar for kelleyz

This script worked last year. Not worked on a site for a while. Not sure why its not working. Cans someone help please. <?php mysql_connect ("localhost", "user","pw") or die (mysql_error()); mysql_select_db ("db"); if(isset($_POST['submit']) && !empty($_POST['submit'])){ $result = ""; //USED LATER /*$term = $_POST['term']; THIS WORKS BUT FOR SECURITY ISSUES USE:*/ …

Member Avatar for kelleyz
0
424
Member Avatar for ramsiva

Any body help me to get file name, i am using webcam my code is <div class="row"><label class="col-xs-2">Take Image<span style='color:red;'>*</span></label><div class="col-xs-4"> <table class="main"> <tr> <td valign="top"> <div class="border"> Live Webcam<br> <script> document.write( webcam.get_html(304, 214) ); </script> </div> <br/><input id="snap" name="snap" type="button" class="snap" value="SNAP IT" onClick="take_snapshot()"> </td> <td width="50">&nbsp;</td> <td valign="top"> …

0
73
Member Avatar for vivosmith

While it is not showing any errors that I can see, my input from an HTML form is not working. I copied part of the script from Visual QuickPro Guide book on PHP 6 and MYSQL 5. I only had one input , so I modified the script for my …

Member Avatar for vivosmith
0
348
Member Avatar for UK-1991

Hello, I was wondering if anyone can gude e about a puzzle i am trying to create and think let me know if this is possible or not. Well there are many users stored i.e admins what if by mistake there is only 1 admin left in the database and …

Member Avatar for lps
0
104
Member Avatar for SoMa_2

I have images generated by while loop php based on how many course user have when user press on one of those images it will send him to that course page but all images send to one course page this my php code in** home page ** <?php $con=mysqli_connect("localhost","FYP","123","FYP"); $sql= …

Member Avatar for diafol
0
2K
Member Avatar for kamibwp786

Salam i want to write a binary tree code with left and right child my question is that when one left side and one right side child complete then system credit 700 to parent id plz any body from this forum can help me? i am thankfull to you its …

Member Avatar for kamibwp786
0
728
Member Avatar for Niloofar24

Hello. There is an html table in admin page, with head columns (POST ID | POST TITLE | POST AUTHOR | ACTION). And in each row, will contain a post id, a post title, a post author that gets from database. And in the Action column, there is a "delete" …

Member Avatar for lps
0
977
Member Avatar for Ritumoni

Working on a Project which have several admins and one super admin.. I have created a common table for admin's. Tables have fields username,password,location and status. I have created a single login page. For admin I need username and location in session.But for super admin I need only username in …

Member Avatar for prasaddlv
0
412
Member Avatar for Niloofar24

Hi. In my CMS, when i type a content for a new post in the textarea, like this: one two three four five six and then click the submit button, it will save in the db table like the way i have typed, every word in a separate line. But …

Member Avatar for Niloofar24
1
1K
Member Avatar for uettttt

Is it possible to implement Google maps like website in PHP using Google maps Api v3?? Please help me

Member Avatar for cereal
0
29
Member Avatar for phoenix254

Hi, i want to change format of date . This code i add in my register page.... if(!empty($_POST['dob'])&& !empty($_POST['mob'])&& !empty($_POST['yob'])) { $yob = mysqli_real_escape_string($con,$_POST['yob']); $mob = mysqli_real_escape_string($con,$_POST['mob']); $dob= mysqli_real_escape_string($con,$_POST['dob']); $date = mysqli_real_escape_string($con,"$yob-$mob-$mob"); $addtothedb="INSERT INTO login (Dateofbirth) VALUES ('". $date . "')"; $result=mysqli_query($con,$addtothedb); and when i get back data from db …

Member Avatar for cereal
0
416
Member Avatar for UK-1991

Hello, I created a user login form with a crietaria fixed that if the user type is admin then it should be redirected to admin page and if it is an agent it should be redirected to home.php The admin type is working properly but when i enter agent id …

Member Avatar for UK-1991
0
259
Member Avatar for charliehustle88

I'm currently having an issue with the pagination script that I have in place. When a search is made for a particular item containing an "apostrophe", the results are rendered correctly. However, the pagination is not corresponding correctly. An error is produced when attempting to move on to pages extending …

Member Avatar for charliehustle88
0
386
Member Avatar for lloyd.farrell.7

Hi, Morning everyone. I am looking for some help from more experienced php coders. I am trying to create a Stamp Duty Land Taxes script that will automatically calculate stamp duty on the sale of a house or flat. The amount of stamp duty is worked out as follows Nothing …

Member Avatar for diafol
0
114
Member Avatar for Makara

someone help to change this code to php please` USE [FastJet] GO /****** Object: Table [dbo].[service] Script Date: 04/14/2015 11:37:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[service]( [ser_id] [int] IDENTITY(1,1) NOT NULL, [ser_name] [varchar](100) NULL, [ser_status] [varchar](1) NULL, CONSTRAINT [PK_ison_service] PRIMARY …

Member Avatar for cereal
0
249

The End.