39,326 Topics

Member Avatar for
Member Avatar for Niloofar24

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 …

Member Avatar for Niloofar24
0
393
Member Avatar for Niloofar24

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 …

Member Avatar for Niloofar24
0
877
Member Avatar for phoenix254
Member Avatar for diafol
0
65
Member Avatar for SoMa_2

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

Member Avatar for cereal
0
151
Member Avatar for ramsiva

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 …

Member Avatar for jkon
0
218
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
352
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
180
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
265
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
248
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
963
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
425
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
350
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
105
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
414
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

The End.