39,323 Topics
| |
Hey all, I'm having a horrible time with a multidimensional array that I'm trying to create. I understand why it's creating it the way that it is, but don't know how I can fix it. If someone can assist, that would be amazing. Here's the current output: [code] Array ( … | |
Hello, I'm trying to make a facebook wall-alike php script. It loads the posts stuff, photo url and user stuff like username and user id from my MySQL database. It also checks if the post is just a comment to another post (parentof). I can present all the original posts … | |
Hi all, I want to replace these charachters: Æ,Ø,Å,æ,ø,å, with, AE,OE,AA,ae,oe,aa I thoght I could use preg_replae this way to accomplish that, but if i write this word in the form: "Bælter" - All that is left to be inserted into the DB is "B" - So I am removing … | |
[CODE]$result = mysql_query("SELECT * FROM products WHERE product_code='$id'");[/CODE] i dont know whats the error here. please help me | |
hello, i would like to know the code to redirect my site to another page once i have submitted information to a registration page, the code i have is this: require_once('extensions/register.php'); ?> <link rel="stylesheet" href="stylee.css" type="text/css" /> <form name="register" id="register" method="post" action="<?php echo $_SERVER['PHP_SELF'];?>" style="display:inline;"> <table width="100%" border="1" cellspacing="0" cellpadding="5"> … | |
I have a webpage in which the records of student are being displayed which are stored in database there are many modules.I have to fetch the data from the database and display the graph according to their numbers that are stored in the database ... the graph is of any … | |
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 … |
The End.