39,323 Topics

Member Avatar for
Member Avatar for smohhh

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

Member Avatar for cereal
0
242
Member Avatar for lolimsoasd

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 …

Member Avatar for diafol
0
871
Member Avatar for klemme

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 …

Member Avatar for klemme
0
182
Member Avatar for ceteris

[CODE]$result = mysql_query("SELECT * FROM products WHERE product_code='$id'");[/CODE] i dont know whats the error here. please help me

Member Avatar for ceteris
0
96
Member Avatar for Ashstyx

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

Member Avatar for diafol
0
224
Member Avatar for Akshat Chawla

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 …

Member Avatar for diafol
0
155
Member Avatar for 21122012

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 …

Member Avatar for pritaeas
0
208
Member Avatar for PF2G

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 …

Member Avatar for broj1
0
123
Member Avatar for shielaolid

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

Member Avatar for broj1
0
68
Member Avatar for Martin C++

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 …

Member Avatar for broj1
0
476
Member Avatar for showman13

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 …

Member Avatar for showman13
0
63
Member Avatar for PF2G

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

Member Avatar for PF2G
0
295
Member Avatar for eoop.org

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

Member Avatar for pritaeas
0
120
Member Avatar for hallianonline

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 …

Member Avatar for diafol
-1
81
Member Avatar for PF2G

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="', …

Member Avatar for diafol
0
264
Member Avatar for narutojonin

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)) * …

Member Avatar for Graphix
0
73
Member Avatar for akshit

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 …

Member Avatar for jgilliam
0
2K
Member Avatar for arunpawar

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 …

Member Avatar for veedeoo
0
260
Member Avatar for jelly46

I need to set up a databse in phpmyadmin for a drupal website. Does anyone know of good tutorials.?

0
65
Member Avatar for cip6791

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

Member Avatar for cip6791
0
90
Member Avatar for evilguyme

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 …

Member Avatar for broj1
0
112
Member Avatar for rushikesh jadha

how to write php script on window xp i mean require software and their configuration.

Member Avatar for diafol
0
76
Member Avatar for anthonyjpv

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?

Member Avatar for diafol
0
293
Member Avatar for deucalion0

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 …

Member Avatar for diafol
0
127
Member Avatar for shielaolid

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

Member Avatar for shielaolid
0
1K
Member Avatar for issaru07

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 …

Member Avatar for issaru07
0
155
Member Avatar for JACOBKELL

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 …

Member Avatar for diafol
0
8K
Member Avatar for zodehala

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]); …

0
76
Member Avatar for Martin C++

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 …

Member Avatar for Martin C++
0
104
Member Avatar for hallianonline

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 …

Member Avatar for mohamedasif18
0
138

The End.