39,320 Topics

Member Avatar for
Member Avatar for FakeTales

i have this xml file <CATALOG> <CD> <TITLE>Empire Burlesque</TITLE> <ARTIST>Bob Dylan</ARTIST> <COUNTRY>USA</COUNTRY> <COMPANY>Columbia</COMPANY> <PRICE>10.90</PRICE> <YEAR>1985</YEAR> </CD> </CATALOG> with my php code i am able to get the parent node <CATALOG> then all the other data such as <TITLE> etc etc , how would i go about getting the <CD> tag?? …

Member Avatar for FakeTales
0
222
Member Avatar for hwoarang69

i am not sure what i did but i messed up my page. take a look at page and you will see the problem. it puting php code in a echo"";. i cant seem to find where the problem. <!-- Connect --> <?php session_start(); //for errors include("../../INCLUDE/header.php"); ?> <!-- top …

Member Avatar for hwoarang69
0
188
Member Avatar for eoop.org

Hi, I want to develop a CMS that I can use when I make websites. Want to simultaneously post it online so that people can download it and develop plugins and themes for this. Would like to have it as user friendly as other CMS such as Wordpress, Joomla, Dupal …

Member Avatar for eoop.org
0
189
Member Avatar for DanErik

Hello! Im looking for a new source code editor. Have come to the point where I need something more powerful and professional. The big issue is this: We develop software in PHP. In our code we have language specific strings like: ------------------------------- echo "Enter your name:"; ------------------------------- We would like …

Member Avatar for diafol
0
225
Member Avatar for Clanstrom
Member Avatar for OsaMasw

Hi there fellow daniweb programmers I have problem in running function in javascript <script type="text/JavaScript"> function toggle() { var e = document.getElementById('target_<? echo $id; ?>'); e.style.display = 'none'; } </script> I have button that generated in php code so its repeating itself <li><a id="target_<? echo $id; ?>" href="like.php" onclick="toggle()"><img src …

Member Avatar for OsaMasw
0
3K
Member Avatar for Octet

I am trying to help prevent SQL injection using mysqli_real_escape_string, I have the following: <?php $Connect = mysqli_connect ('', '', '', ''); if (mysqli_connect_errno()) { die ("Couldn't Connect to the Database"); } $String = "Hello, my name is (*$<>)*$)!*)_£)(!*£$&"; echo $String."<br><br>"; $Escaped = mysqli_real_escape_string($Connect, $String); echo $Escaped; ?> The problem …

Member Avatar for GliderPilot
0
716
Member Avatar for Resentful

Hello, everyone. I've recently switched hosts and the same script I was running in the past is now causing the rest of my MySQL queries to be locked, and it seems the query never completes. The code is: <? $con = mysqli_connect('localhost','user','password', 'database'); $Q = "DELETE FROM `Table1` WHERE `Field1` …

Member Avatar for Larry_Singleton
0
146
Member Avatar for cussel

> hi guys, i've two array 3d $data and $array_bold, then i want to bold value $data be based value $array_bold, how i can do this??? <?php $data = array( array( '0'=>array( '0'=>'chelsea everton villa liverpool', ), array( '0'=>'milan inter juventus napoli', ), ), '1'=>array( array( '1'=>'madrid barcelona altetico getafe', …

Member Avatar for diafol
0
183
Member Avatar for scaiferw

I'm dipping my toe in the water of salted passwords by upgrading an older webapp, and would like to present the rough outline of how my system would work in the hope that those with more experience than I might tell me if I'm going in the right direction; In …

Member Avatar for diafol
0
194
Member Avatar for timwhelan

I am trying to turn off a block in drupal using existing code. <?php $node = node_load(arg(1)); $type = $node->type; if(substr($_SERVER["REQUEST_URI"], 0, 13) == '/our-people') { return TRUE; } else { return in_array($type,array('3_column_interior_page', '3_column_faculty_bio_page')); } ?> I wanted to add a page that will not show the block... <?php $node …

Member Avatar for timwhelan
0
199
Member Avatar for nunuaziz_

Drop Down List codes: <form class="selectfb" name="getFb" method="post"> <select action="getFb.php" name="natureOffb" class="selection" > <option disabled value="--Select Nature ofFeedback">--Select Nature Of Feedback--</option> <option value="Feedback" >Feedback</option> <option value="Enquiry">Enquiry</option> <option value="Compliment">Compliment</option> </select> </form> How to retrieve the data from database after I select a nature of feedback? The value that has been retrieve …

Member Avatar for GliderPilot
0
98
Member Avatar for daniel36

can anybody tell me event name for check box for using in jquery.such as for drodown it is 'onchange' .thank you.

Member Avatar for daniel36
0
64
Member Avatar for daniel36

is it possible to convert 09 to 9 by any function?if yes,please tell me.It is required to me.Thank you.

Member Avatar for daniel36
0
107
Member Avatar for Venter

public function display( ) { $query="SELECT * FROM test ORDER BY RAND() limit 5 "; $result=mysql_query($query)or die("cannot select DB"); $num=mysql_numrows($result); echo "<table>"; echo "<tr>"."<td style='overfolw-hidden;width:400px;'> Question: </td>"; echo "<td style='overfolw-hidden;width:40px;'> OPTION A </td>"; echo "<td style='overfolw-hidden;width:40px;'> OPTION B </td>"; echo "<td style='overfolw-hidden;width:40px;'> OPTION C </td>"; echo "<td style='overfolw-hidden;width:40px;'> OPTION D …

Member Avatar for pritaeas
0
131
Member Avatar for daniel36

Is there any function for changing a numeric value to string?suppose i passes '5' then it should return 'five'.

Member Avatar for daniel36
0
83
Member Avatar for cheelo007

I've been trying to make dynamic queries, where the user determines what will be queried. The reason is because I'd like the images being displayed in my gallery reflect the category selected by the user. mysql_query("SELECT(whatever category they chose) FROM products") below is the generation of categories as links. (not …

Member Avatar for gon1387
0
164
Member Avatar for mehnihma

I am bulding a code for my site and have few problems 1. When I run this few times, it updates table ps_stock_available but with wrong values and after some time is stops to update that table? The problem is in the last query, two queries above are working ` …

Member Avatar for gon1387
0
313
Member Avatar for MMadhavi

I want to show google map of selected theatre. first user have to select city then they have to choose theatre as per selected city. i have used drop down box for both. then, after selecting theatre, when he clicks on show button i want to show google map of …

Member Avatar for MMadhavi
0
1K
Member Avatar for cheelo007

Hello, I'm sure I'm missing something small. If a category doesn't exist in the database yet, how can I have the query accept a value of 0 without reporting an error? The $subcategory is what the user selected. The result should either be 4 images or a blank place holder …

Member Avatar for cheelo007
0
127
Member Avatar for dancks

addproduct.php snippet (there are lots of other inputs, not sure if that matters): <form method="POST" action="add.php" enctype="multipart/form-data"> <p>Picture:<input type="file" id="pic_upload" name="pic" /> <input type="submit" /> </form> add.php: if(isset($_FILES["pic"])) { if($_FILES["pic"]["error"]==0) { $name = explode(".",basename($_FILES["pic"]["name"])); $target = realpath(dirname($_SERVER['PHP_SELF']))."/images/".$name[0].session_id().".".$name[1]; $temp = $name[0].session_id().".".$name[1]; if(!move_uploaded_file($_FILES["pic"]["tmp_name"],$target)) { add_error("Picture specified did not upload"); } $_POST['pic']=$temp; } …

Member Avatar for dancks
0
105
Member Avatar for jonathan.flesher

I'm new to MySQL and following a tutorial in a book to design a PHP MySQL website. Following this tutorial, I created a PHP page from which I can update entries in the MySQL database. What's strange is that only specific entries in the database will not update, while others …

Member Avatar for b.wickham
0
978
Member Avatar for NardCake

Hello! I'm working on a simple messaging system for a project and I have this query and it isn't working for some odd reason, here it is: mysql_query("INSERT INTO messages SET user='$user', message='$msg', date='$date', to='$id', private='$checked' ") Here is my error: You have an error in your SQL syntax; check …

Member Avatar for NardCake
0
145
Member Avatar for azgold472

I have the following code... <?php $con = mysql_connect("localhost:3306","name","pass"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("barndata", $con); $today = date("Y-m-d"); $result = mysql_query("SELECT * FROM event where Date >= '$today' ORDER BY Date ASC LIMIT 0, 7") ; while ($row = mysql_fetch_array($result)) { echo 'banner1.add("IMAGE","'; echo …

Member Avatar for azgold472
0
175
Member Avatar for matt_higgins

<div style="font-family:tahoma; color:#F00; "> <?php session_start(); if (isset($_SESSION['user'])) echo "You are logged in as ".$_SESSION['user'], " to log out click <a href =logout.php>here</a>"; else die ("Please Register <a href =register.php>here</a>");?> </div> <?php $username = $_SESSION['user']; if(!isset($_SESSION['user'])) { header("location: login.php"); } else { $query=" SELECT * FROM users WHERE user='$username'"; $result=mysql_query($query); …

Member Avatar for EvolutionFallen
0
267
Member Avatar for nizam27391

Hi everyone. I'm currently developing a website for my university project. I want to ask about .htaccess for url manipulation. I already search through the web but couldn't figure out what i intend to do. I have this structure public_html - css - img - js _private - data ( …

Member Avatar for matthewl6970
0
98
Member Avatar for davy_yg

I get this error: Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 23: parser error : Premature end of data in tag catalog line 2 in C:\xampp\htdocs\php_exercise\exercise3_1.php on line 7 Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: in C:\xampp\htdocs\php_exercise\exercise3_1.php on line 7 Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in C:\xampp\htdocs\php_exercise\exercise3_1.php on line 7 Fatal error: Uncaught exception 'Exception' with …

Member Avatar for Atli
0
1K
Member Avatar for cdoggg94

Basically I just dont know where to start.. I want to make a table that displayed as many images as there are in the DB. I want the table to only go 4 <td> wide, then move to the next line...etc.. I tried googling a few things, but I couldnt …

Member Avatar for pritaeas
0
94
Member Avatar for hwoarang69

error: Mail error SMTP Error: Could not connect to SMTP host. i think its bc of mail->port=465. but iam not sure. $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = "ssl"; // sets the prefix to the servier $mail->Host = "smtp.gmail.com"; // sets GMAIL as …

Member Avatar for jstfsklh211
0
497
Member Avatar for ronaldneck

i'm going to develop a new website using php programming.Let me know what are the basic needs to upgrade my website development.please help me any one.. Thanks for your response

Member Avatar for javedsai
0
710

The End.