39,316 Topics

Member Avatar for
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
267
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
233
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
265
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
Member Avatar for karthik_ppts

Hi Frendz, I need a solution to stop an embed youtube video at a particular timestamp. Any possible way to do this?

Member Avatar for karthik_ppts
0
402
Member Avatar for ceteris

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

Member Avatar for anthonyjpv
0
203
Member Avatar for Commando112

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&amp;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" …

Member Avatar for Zagga
0
90
Member Avatar for rahulroshan

Hi I want to detect a language and display it which language it belongs to , Is there any way.

Member Avatar for diafol
0
72
Member Avatar for stanley87

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 …

Member Avatar for stanley87
0
337
Member Avatar for natchattack

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 …

Member Avatar for diafol
0
91
Member Avatar for abhishek2301

Hi, This is a very known problem with lot of solutions in many forums but none of them works for me. A simple code to load a jpeg image as follows: [code=php] <html> <?php $im = @imagecreatefromjpeg("/home/public_html/MyPic.jpg"); header ("Content-Type: image/jpeg"); imagejpeg($im, NULL, 75); imagedestroy($im); ?> <head> <title> My First PHP …

Member Avatar for diafol
0
397

The End.