39,388 Topics
![]() | |
It is supposed to list out all records of roomID 57, but the record is duplicate. <?php require '../../source/authentication.inc'; session_start(); sessionAuthenticate(); require_once('../../config/conn.php'); ?> <?php require_once('../../config/conn.php'); $roomID=$_GET['roomID']; $sql="SELECT * FROM roomBooking where roomID = '$roomID'"; $rs=mysql_query($sql,$conn); $row_rs = mysql_fetch_assoc($rs); $count=mysql_num_rows($rs); $roomID=$row_rs['roomID']; $bookingDate=$row_rs['bookingDate']; $startTime=$row_rs['startTime']; $endTime=$row_rs['endTime']; $numberOfPeople=$row_rs['numberOfPeople']; ?> <!DOCTYPE HTML> <html> <head> <meta … | |
Hi, I'm having some problem with this code: [CODE]<?PHP include 'topo.php'; include 'db_connect.php'; ?> <table> <tr> <td id="navigation-block"> <img src="background.jpg" id="hide" /> <ul id="sliding-navigation"> <?PHP $sql = "SELECT * FROM cursos"; $query = mysql_query($sql,$connect); while ($row = mysql_fetch_array($query)) { ?> <li class="sliding-element"><a href="prog_curso.php?cod= <?PHP echo $row['cod_curso']; ?> "> <?PHP echo … | |
[CODE] <?php // if there are any errors, display them $error=''; if ($error != '') { echo '<div style="padding:4px; border:1px solid red; color:red;">'.$error.'</div>'; } ?> [/CODE] [CODE]<?php $host="localhost"; // Host name $username="root"; // Mysql username $password=""; // Mysql password $db_name="dbriomra"; // Database name $tbl_name="login"; // Table name $error=''; // Connect … | |
Hello, I need to submit a form as soon as selection has been changed and call PHP function. I know I can do this with onchange="this.form.submit(); but this will generate an url similar to this: [CODE=PHP]?submit_position=change[/CODE] while I need to generate something like this: [CODE=PHP]?p=edit-product.php&action=change_pos&id=$id[/CODE] This is what my form … | |
Good afternoon, I don't know if I just can't do this, or if I can, and I have it structured incorrectly. What I'm trying to to is to generate a member table from a couple of imported excel spreadsheets. To create the member records, I must assign a 'Username' for … | |
Hi, I'm doing a page with the info of the user. For exemple i log in if i want to change my information i click on this page. But something is wrong: [CODE]<?PHP include 'topo.php'; include ('db_connect.php'); $sql="SELECT username, password, nome_aluno, data_nascimento, morada_aluno, cp_aluno, telemovel_aluno,email_aluno,nome_ee,morada_ee,cp_ee,telemovel_ee,email_ee FROM alunos WHERE username='". $_SESSION['username'] … | |
Hi, i get an Error, but cant understand why i get this :S The error is like this: Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/techozin/public_html/multiligase/core/user.inc.php on line 31 The page codes: user.inc.php [CODE]<?php function fetch_users() { $result = mysql_query('SELECT `user_id` AS `id`, `user_name` AS `username` … | |
I have a php form which contains an attribute: [B]action="results.php"[/B] I want to hide the php extension from [B]results.php[/B] to [B]results?showresults[/B] or [B]/?results[/B] and the result page contains the link to go back to [B]index.php [/B] and I want to change hide the index.php to just main folder Now my … ![]() | |
Hi, I'm trying to do a table that shows all the news: [CODE]<?PHP include "db_connect.php"; $sql_destaque = "SELECT data_destaque, imagem_destaque, descricao_destaque FROM destaques ORDER BY cod_destaque ASC"; $executa=mysql_query($sql_destaque,$connect); $dados = array(); while ($linha = mysql_fetch_array($executa)) $dados[] = $linha; mysql_free_result($executa); function add_imglink($linha) { echo '<td align="center">'; echo $linha['data_destaque']."<br/>".$linha['descricao_destaque']; echo '<img src="', … ![]() | |
how can i rearrange the name by the miles sorting smallest to biggest [CODE] $result = mysql_query("SELECT * FROM directory WHERE category = '$category'"); while($row = mysql_fetch_array($result)) { $latd = $row['latitude']; $lond = $row['longitude']; $name = $row['name']; $theta = $lon - $lond; $dist = sin(deg2rad($lat)) * sin(deg2rad($latd)) + cos(deg2rad($lat)) * … | |
hi guys. i hav this drop down menu, which i need to populate with data from one column of a particular table of MySQL dbase. i hav read a lot on this, but have not been able to come up wid any code. any and all help in this regard … | |
Hi, I was writing the code for the class to test passing of values. Here's my code. [CODE] <?php class demo{ public function setMynum($a,$b){ $varA=$a; $varB=$b; return $varA; return $varB; } } $obj=new demo; echo $obj->setMynum(12,13); ?>[/CODE] Output is 12. What is wrong with the code? I guess i have … | |
I need to set up a databse in phpmyadmin for a drupal website. Does anyone know of good tutorials.? | |
Hello, I want to create a favorites option for something I am working on. I have two tables. The main table where the posts are kept called "place". [CODE]+---------+--------------+------+-----+-------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------+--------------+------+-----+-------------------+----------------+ | id | int(11) | NO | … | |
Hey guys i have yet another problem. i would like to know how i can display my mySQL database results on a webpage in a certain layout. i want it like .. lemme just upload a picture.. it is attached. i want to display that layout for every row there … | |
how to write php script on window xp i mean require software and their configuration. ![]() | |
Hi Im new to php programming as part of my academics, Im building an e-commerce website can you give me some tips on how to build robust site? ![]() | |
Hey guys, I am creatiing a website where I need a sidebar with different links, each link will open a different version of the product page, only the content part will be different. I want to know how I can change the content part of the product part depending on … ![]() | |
[CODE]<?php // if there are any errors, display them if ($error != '') { echo '<div style="padding:4px; border:1px solid red; color:red;">'.$error.'</div>'; } ?> <form action="" method="post"> <input type="hidden" name="id" value="<?php echo $employee no; ?>"/> <div> <p><strong>ID:</strong> <?php echo $employee no; ?></p> <strong>Month: *</strong> <input type="text" name="firstname" value="<?php echo $month; ?>"/><br/> … | |
i actually trying to run 2 select queries and get user id from members3 table and productid, title,price, categoryname and img from product4 tables. i quite noob in php so not too sure whats went wrong. there is no error msg show just that my database data only have userid … | |
I have following code which check does targeted word exits in sentence and it's working. [CODE] $text = "blablavalueblabla"; $word = "value"; $pos = strpos($text, $word); if ($pos === false) { echo "You word is found in this sentence"; } else { echo "Your word it's not found in this … ![]() | |
i cannot send data in box to index.php. why ? outout is just [CODE]button: Submit[/CODE] link is [url]http://kottawadumi.blogspot.com/2011/07/add-or-remove-list-box-items.html[/url] [CODE] <script type="text/javascript"> function removeMultipleOptions(){ var listBox=document.getElementById("selectMultipleCountries"); if(listBox.options.length==0){ alert('You have already removed all list box items'); return false; } var removedOptionCount=0; var valuesToBeRemoved=Array(); for(var x=0;x<listBox.options.length;x++){ if(listBox.options[x].selected==true){ valuesToBeRemoved.push(listBox.options[x].value); } } for(var j=0;j<valuesToBeRemoved.length;j++){ removedOptionCount+=removeListItemOneByOne(listBox,valuesToBeRemoved[j]); … | |
Hello, I need to get two get functions from url, but I cant get the second one, how can I do it ? Something like this: [CODE=PHP] <h4><a href='?p=edit-page.php?page=$id'>$title</a></h4> [/CODE] The p will include the edit-page.php in my container which is just list of page titles and when I click … | |
hello I have a form which have 5 drop down boxes which contains the initial values now this is my database I want to make a search result page in php which displays a single record with have following validations: [LIST=1] [*]if all options (college, class, rollnumber, student_name, section) vaules … | |
Hi Frendz, I need a solution to stop an embed youtube video at a particular timestamp. Any possible way to do this? | |
[B]i dont know why i am having an error in [B]header[/B] Warning: Cannot modify header information - headers already sent by (output started at delete.php on line 13[/B] [B]delete.php [/B] [CODE]<?php include("db.php"); $id =$_REQUEST['BookID']; // sending query mysql_query("DELETE FROM books WHERE BookID = '$id'") or die(mysql_error()); header("Location: index.php"); ?> [/CODE] … | |
Hi, This is my version of a user script. panel.php (Logged in Page) [CODE=PHP]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <? session_start(); if(!session_is_registered(myusername)){ header("location:index.php"); } ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>C&C-Relived Control Panel</title> </head> <body> <span style="color: #FFF">Login Successful</span> <form name="form1" method="post" action="logout.php"> <input type="submit" … ![]() | |
Hi I want to detect a language and display it which language it belongs to , Is there any way. ![]() | |
Hi,guys,morning to all :) I have face 1 situation, i already built an api using the rest method, and all my response data will be return in html data when i call the api, i testing on the same server using the jquery working fine, when i use on another … | |
I have been working on a project for about a week now and today i seem to of hit a massive brick wall. whilst working on writing some data to a database, something which is usually second nature, i keep getting syntax errors. Now i have gone over the code … ![]() |
The End.