39,326 Topics
| |
hi:) I want the script to check the db table to see if there is the same username as what the user has submit with the register form, then stop the script from registering, but if the user has submited a new username, then registering. I think the script should … | |
Hello! I have a little problem with a For Loop, this is a For Loop in my script: $last_id = $conn->lastInsertId(); for($a = $last_id ; $a > 0 ; $a--){ code.... } But it doesn't work because of `($a = $last_id ;`, the variable $a can't be set to the … | |
I'm trying to do something like this $level=0; if($a=="x"){ $level=1; } Else{ $level=2;} How I can use the new value of $level outside the scope of IF Statement | |
Any body help me to get image name in save page I have <img> tag for image. i want this <img> name is transfer to save.php using <input type "file"> any body help me I want to get image name In <img> tag image name. my code is index.php <img … | |
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 |
The End.