39,323 Topics
| |
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 = … | |
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. … | |
<?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--> | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
| 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 … |
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 | |
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 … | |
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 … | |
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 = … | |
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. | |
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:*/ … | |
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"> </td> <td valign="top"> … | |
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 … | |
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 … | |
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= … | |
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 … | |
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" … | |
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 … | |
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 … | |
Is it possible to implement Google maps like website in PHP using Google maps Api v3?? Please help me | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.