39,323 Topics
| |
I think my site has been hacked! I found these lines of code on all my php files and I didn't put them there. Problem is I don't know enough php to understand what this batch of code does. Could anyone please help? How bad is it? Here's the code: … | |
Hello, I am trying to understand the exact procedure of the IMG_FILTER_CONTRAST function available in the GD library. After delving through the source code, I found the following function which performs the computation: [code=c] int gdImageContrast(gdImagePtr src, double contrast) { int x, y; int r,g,b,a; double rf,gf,bf; int new_pxl, pxl; … | |
I'm posting 20 usernames and 20 passwords, they're named username1 ... username20 and then password1 ... password20. In the page that processes the posted values I have an array like this: [CODE] $postArray = array( *** * other values in array *** $userName1 = $_POST['userName1']; $password1 = $_POST['password1']; * * … | |
I have a project in which i have two roles : Student Teacher I have already created a login page but i cant figure out how to redirect them to different pages according to their Roles... | |
[CODE]<?php //update has an error! ?> <?php include("lock.php");// contains session details $connect=mysql_connect("localhost","root",""); mysql_select_db("login",$connect); if(isset($_POST[""])){ $dept_name=$_POST["dept_name"]; $year=$_POST["year"]; $current_sem=$_POST["current_sem"]; $total_students=$_POST["total_students"]; $regulation=$_POST["regulation"]; } //------------------------------------------------------------------------------------------------------------------ if(isset($_POST["insert"])){ if($_POST["insert"]=="yes"){ $dept_name=$_POST["dept_name"]; $year=$_POST["year"]; $current_sem=$_POST["current_sem"]; $total_students=$_POST["total_students"]; $regulation=$_POST["regulation"]; $query="insert into classprofile(dept_name,year,current_sem,total_students,regulation) values('$dept_name','$year','$current_sem','$total_students','$regulation')"; if(mysql_query($query)) echo "<center>Record Inserted!</center><br>"; } else{ echo"not inserted, try again"; } } //------------------------------------------------------------------------------------------------------------------- if(isset($_POST["update"])){ if($_POST["update"]=="yes"){ $dept_name=$_POST["dept_name"]; $year=$_POST["year"]; $current_sem=$_POST["current_sem"]; … | |
Hi, I am stuck with a problem.I have an array that contains dates and I want to get the date ranges from this array. For example array('01/01/2012','01/02/2012','01/03/2012','01/05/2012','01/10/2012') Now I want the date range from this array And the dates are not sorted in array. Can anyone help me its quiet … | |
Please tell me why it gives me always zero value? [CODE]<?php $total =0; $memid = $_POST['username']; $leg = $_POST['leg']; mysql_connect ("host", "usr", "paswd") or die ('Error: ' .mysql_error()); mysql_select_db ("dbname"); function getTotalLeg($memid,$leg){ $sql="select $leg from `users` where `username`='$memid' "; $res=mysql_query($sql); $row=mysql_fetch_array($res); global $total; $total = $total+mysql_num_rows($res); if($row['$leg']!=''){ getTotalLeg ($row['$leg'],'lname'); getTotalLeg … | |
Hello, I just made my web in localhost, everything was just fine until I updates my xampp to newer version. And my web now is on a mess. [CODE] <br/> <div class="headerStyle"> </div> <?php $result = mysql_query("SELECT * FROM kategori_berita") or die(mysql_error()); echo '<ul>'; while ($data=mysql_fetch_array($result)){ if ($_REQUEST['catid']==$data['id']) echo '<li … | |
Hi, I have a form with input type="file". On every browser it works fine, however on IE8 and older it just does not upload anything. If i leave the form empty, all other form data is being passed successfully, but if i select the file, there seems no data passed … | |
Hey got a big issue i need to resolve if i have a table that records two distinct values entered by user.. NC001 OR TE001 Equipment_id | Serial | location -------------------------------- NC001 | if i have a php based form how can i tell it that if a user select … | |
I am trying to generate a list of urls for the tags people who have submitted while posting their information. Data gets saved in mysql table as tags and the value comes with comma for multiple words, for example: tag1, tag2, tag3 abd saved as is in a single field. … | |
Hi there, i am trying to use the classes proplery and i have a basic question....The following is the class i am using in order to get information from the DB...It is workinkg and i dont have any problem. But the question is how do i show the information on … | |
Hi all I am working on a website and the requirement is to make it in two languages i.e. icelandic and english. just like facebook and other google, if a user selects a language, then the site is translated in that language. I am not allowed to use google translator. … | |
heyy guys....i manage to connect to diff database in a single form...but how do i compare the value... for eg. now i would to compare invoice_no for the both of them [CODE] $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name="test"; // Database name $tbl_name="test3"; // … | |
Hi All, I'm working on a database wherein I want to input the current date into existing table upon the user enter his pin. I'm having a hard time to make it work here is my code. [CODE] <?php $result="SELECT * FROM profiletable WHERE (firstName='$_POST[assetSearch]' || lastName='$_POST[assetSearch]' || IDNumber='$_POST[assetSearch]')"; $q … | |
Sorry I'm new to these stuff but I am having a hard time about this. So I'll trying to create a php and mysql program which can view records from database server. In my form I have 2 dropdown list and 2 submit button, the first one the the list … | |
hi all... i have a problem when my boss ask me to do something that i don't know how to do it.. i need the idea for increment ID that will count by date.. For example today is 7/3/2012,user send request then id become AB-070312-1, user send other request at … | |
Before I post my problem I would like you in advance for taking the time to read this. I've been using simpletest to help me develop and test my php scripts. I'm currently working on a session class and when I go to test it I get the following exception … | |
I spent almost whole evening to understand the following code: [CODE] <?php $link = mysql_connect('localhost', 'root', 'root'); if (!$link) { die('Could not connect: ' . mysql_error()); } $db_selected = mysql_select_db('database_1.1'); if (!$db_selected) { die('Could not select database: ' . mysql_error()); } $query = 'SELECT last_name, first_name FROM Employee'; $result = … | |
Hey, I'm building a website for this business, using HTML, CSS, PHP and AJAX for dynamic content. I'm trying to make a page which will display the thumbnail of each profile image, and have each thumbnail link to the corresponding profile. How exactly I can go about executing this, I'm … | |
I've created this function and I wonder if ever I COULD USE VARIABLES IN reading column values on database table. [CODE] function vote($column, $imgid)//the $column stands for a variable handling a string I've passed from my previous call. For now I am setting it as a string named "likes" which … | |
Hi I created some codes to upload my videos on the website, but for some reason it stopped working. Can Someone please help me debug the issues thanks! [CODE]<?php $username = "root"; $password = ""; $hostname = "localhost"; $database = "name_of_database"; $db = mysql_connect($hostname, $username, $password); mysql_select_db($database, $db); $path = … | |
hi guys, how are you? I hope someone can help me with this as its been bugging me all day, and I'm sure there is a very simple explanation. Basically, what I have at the moment is this:- [CODE] $ip = ($_SERVER["REMOTE_ADDR"]); $xml = file_get_contents("http://xxxxxxxxxxxxxx); [/CODE] This returns me the … | |
Im trying to compare an entered value in a drop down box to see if an asset is available for use. At the moment its is From - Duration - Could i be better with From - To- Which would be easier to implement. Ive attached what i have so … | |
how would i go about filling one multi-select box with the result of a previous one [CODE] <select value ="cars" name="cars[]" multiple="multiple"> <option value="">-- Select software type / Optional / --</option> <option value="suv" >web</option> <option value="sports" >design</option> <option value="utility" >misc</option> <select value ="cars" name="cars[]" multiple="multiple"> $option .= '<option value="">-- CARS--</option>'; … | |
I am using a page where rows get fetched from database... now what i want to do is open a new link for each row... you will understand it when you see the screenshot....i have attached it.... I want to somehow redirect the link to other page with the value … | |
[ICODE]Help me please. I want to display specific data from the database. i dont know what is the code. For example: in the database of reservation. I want to display only the name, address, contact number, company, and the details of his/her reservation. please help me guys. thanks a lot. … | |
Hi, I am designing a E-commerce site. I have designed a way for the customers to view their previous orders, but for some reason there is a problem. The codes that you see below work but the while loop keeps stopping at 2 items when there should be more. Can … | |
Hello, I have this multiple checklist and I cannot figure out how to enter the checked values into the database. The table is called "colors" and the column name is "color" and is of type "text". add_color.php [CODE] <?php // connect to database require "mysql_connect.php"; ?> <?php // get value … | |
Hai, I downloaded and install sugar crm in my localhost.Inside the folder there is soap.php. when i run the file, all functions and wsdl file there. I want to create on soap client and access the WSDL url using my localhost. this is WSDL file URL( http:/localhost/scrm/soap.php?wsdl ) I want … |
The End.