39,402 Topics

Member Avatar for
Member Avatar for Angeline5

Is there a foreach code in JQuery as in PHP? I have a code in php,like [code] <?php foreach ($viewfields as $viewfield): ?> if("<?php echo $viewfield['Attribute']['required'];?>"=='true'){ $("<span class='req'><em> * </em></span>").appendTo("#fb_contentarea_col1down21 #label<?php echo $viewfield['Attribute']['sequence_no']?>"); } if(<?=$viewfield['Attribute']['type'];?>=='text'||<?=$viewfield['Attribute']['type'];?>=='date'||<?=$viewfield['Attribute']['type'];?>=='number'){ $("<input id=input<?=$viewfield['Attribute']['sequence_no'];?> type= 'text' style= 'width:<?=$viewfield['Attribute']['size'];?>px' data-attr=<?=$viewfield['Attribute']['type'];?> ></input><br>").appendTo("#fb_contentarea_col1down21 #<?=$viewfield['Attribute']['sequence_no'];?>"); } else if(<?=$viewfield['Attribute']['type'];?>=='textarea'){ $("<textarea style= 'width:<?=$viewfield['Attribute']['size'];?>px' …

0
42
Member Avatar for tones1986

Hey all i have the following code: [code=php] <?php include 'config.php'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link href="design.css" rel="stylesheet" type="text/css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Search for <?php echo "$_POST[boat]" ?></title> </head> <body> <?php $port1 = $_POST[port]; if (isset($port1)) { echo "This …

Member Avatar for tones1986
0
91
Member Avatar for toXXXic

Hi Guys, I am trying to create an RSS in PHP. I have the following code which should work but I get an error saying FEED ERROR when I run the code. The code does run and display an XML file if I remove <rss version="2.0"> , I really don't …

Member Avatar for pritaeas
0
100
Member Avatar for Shuel

Hi All, I have successfully intalled apache and php and they are both working fine. Does anyone know what I need to do to be able to connect to sybase database. All the online litterature tell me that I need to add sybase to the configure parameter list when installing …

Member Avatar for pritaeas
0
72
Member Avatar for tanha

Hi, I have a Book Registration Form, in which one book may have more than one authors and can belong to more than one category, therefore on the registration form, I have a textbox for the category, in order the category is not in the dropdown, I want to add …

Member Avatar for tanha
0
117
Member Avatar for gnarly

Hi, I'm Wyatt, and this is my first post! So I have an idea for a website. I'm decent at C++ and I only know some basic html. Now I want to pick up a new language to code my site. As I googled the functions I needed, PHP came …

Member Avatar for SamSam2020
1
178
Member Avatar for veledrom

Hi, I use a submit button to go to next page with posting a value. When i click on back (button in the browser) to go back to previous page, it says "Page is expired. Information must be send to display this page erc etc". I don't want to face …

Member Avatar for Airshow
0
114
Member Avatar for 68thorby68

After many frustrating hours and web searching I cannot figure out why the move_uploaded_file is appending the names of already already created files to the name of new files. As you will be able to tell from my code I an pretty new to PHP. However, I have a pretty …

Member Avatar for 68thorby68
0
236
Member Avatar for jbd4d

So this question may be a little hard to follow, but here i go anyway. I am trying to create a table in mysql that is comprised of only the email addresses that show up multiple times in my origianl table. More specifically, the original table has a record for …

Member Avatar for xpartmgr
0
87
Member Avatar for Vortex05

Hello, I'm new on daniweb, and it's my first post (to start sorry for any language mistake, my language is french). Well, I'm developping a website for a client in php, the theme of the website is that registred users can make online consultations with a doctor, in the registration …

Member Avatar for noelthefish
0
146
Member Avatar for InsaneVr6

I have been working with PHP for a few months now and I wanted to make a simple mailing list script to add to a website I am helping redesign. I think that a mailing list will be a welcome upgrade. Anyway the error I am getting is[CODE]PHP Parse error: …

Member Avatar for InsaneVr6
0
190
Member Avatar for flashyflashy

I'm in a situation where I have to pass javascript variable to php without redirect (no $_get[]). The code I'm working around is like [ICODE] <script> var screen_width=screen.width </script> <?php $screen_width=[B]javascript_variable[/B] ?> [/ICODE] I want to pass value of this variable to a new php variable.Please suggest me a way …

Member Avatar for demodav
0
8K
Member Avatar for sleign

hey I'm having a problem trying to get some variables passed on a form to another page where the processing is handled. basically what I'm trying to do is display the titles of pages from a website that are stored on a mysql database. those titles are passed thru a …

Member Avatar for sajif
0
171
Member Avatar for dwdata

Hi all, I have a query to return only 10 records: [CODE]$result = mysql_query ("SELECT * FROM sm_Solves ORDER BY solved_stamp DESC LIMIT 10;") or die ("error in query. ".mysql_error());[/CODE] In this table, the "solved_stamp" is a timestamp result and there is a field called "username". I want to take …

Member Avatar for Manuz
0
114
Member Avatar for sarithak

Hi frnds... here i am uploading images....i am getting error when i use songle quotes in title(otherwise correct)......plz check this one..[CODE] $gcategory=$_POST['gcategory']; [B]$gname=mysql_real_escape_string($_POST['gname']);[/B] [B]$tmp_name = mysql_real_escape_string($_FILES["gphoto"]["tmp_name"]);[/B] $name = mysql_real_escape_string($_FILES["gphoto"]["name"]); $tname = mysql_real_escape_string($_FILES["tphoto"]["name"]); $ttmp_name = $_FILES["tphoto"]["tmp_name"]; $date=date('y-m-d'); $dir="../../gallery/allgallerys/$gcategory/$gname"; $tdir="../../gallery/allgallerys/$gcategory/$gname/thumb"; if(!file_exists($dir)) mkdir($dir)or die("Filename all ready exits"); if(!file_exists($tdir)) mkdir($tdir)or die("Filename all ready exits"); …

Member Avatar for joe1987
0
144
Member Avatar for sureronald

How do I run the gabbage cleaner function in a session class from within the PHP framework. I use GNU/Linux and I have done it through CRON. Any scheduling library available in PHP? Any help will be highly appreciated.

0
61
Member Avatar for sfrider0

I have created a database. It just contains information about websites. One column has the path to an image, like a rating system(1-5 stars). I just need to display this information on a web page. Everything shows up fine, but I just need it to display the image instead of …

Member Avatar for sfrider0
0
168
Member Avatar for sanjaypandit

i want to make a form which is shows in following image.(screenshot) in which first field comes from database.echo values. in second fields same value come from database. now in third text field i want to show these values example e.g value of first fields>>>> jaisingh value of second field>>>jairam …

Member Avatar for sanjaypandit
0
112
Member Avatar for sharal

[TEX]HI FORUM I WAS TRYING TO FILL THE COMBOBOX WITH THE VALUES IN DATABASE, AND MY CODE IS ALSO DISPLAYING THOSE VALUES BUT THE PROBLEM WHAT I FEEL IS THAT <OPTION VALUE > IS NT WORKING WELL BECAUSE WHEN I TRY TO DISPLAY THE VALUE OF SELECT IT DOES NOT …

Member Avatar for djjjozsi
0
79
Member Avatar for mvt6204

Hi everyone, I've been a programmer for about 3 years and not so long ago, I decided to switch my interest to web development. For that reason, I've been learning PHP & MySQL for some times. However, I feel a need of direction about what is relevant to the current …

Member Avatar for itisnot_me
0
182
Member Avatar for keeper82

Hi everyone! I'm trying to manage images uploads using my own class which renames the uploaded file prepending a random string: [CODE=php]define('UPLOAD_PATH', realpath(APPLICATION_PATH . '/../public/uploads')); class Lib_Form_Element_File extends Zend_Form_Element_File { public function init() { if($this->isUploaded()) { $this->setDestination(UPLOAD_PATH); $realname = $this->getFileName(null, false); do { $filename = UPLOAD_PATH . '/' . md5(time()) …

0
43
Member Avatar for praveen_dusari

hi, in my shopping cart we have a phone orders and when user tells products we will click on that product and calculate the total and insert in to database my code is like [code=php]<table width="100%" border="0" align="left" cellpadding="3" cellspacing="1" class="borent"> <? $s=-1; while ($prow = mysql_fetch_assoc($pres)) { $s++; $item[$s]=$prow['p_id']; …

Member Avatar for noelthefish
0
100
Member Avatar for wwwmadeasy

hello every one just i need favor.. i am having this idea in my head ..is it possbile ? when the user submit the data it stored in PDF file and that file gose in to my email..??? thanks in advance...

Member Avatar for noelthefish
0
113
Member Avatar for toXXXic

Hi, I am trying to load an Rss link and add the data into an array. Here is what I am trying: [ICODE]<?php $doc = new DOMDocument(); $doc2 = new DOMDocument(); $bbcLink='http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml'; $cnnLink='http://rss.cnn.com/rss/edition.rss'; $reutersLink='http://feeds.reuters.com/reuters/scienceNews'; $doc->load($bbcLink); $arrFeeds = array(); foreach ($doc2->getElementsByTagName('item') as $node) { $itemRSS = array ( '<p class="style1">' => …

Member Avatar for ShawnCplus
0
233
Member Avatar for ramsri05

Dear Friends. :) I am new to this forum and php coding as well. 1. I would like to know whether we can able to [B]import .xls excel[/B] file contents into the [B]mysql database[/B] table using [COLOR="Red"]php[/COLOR].? Objective: User has to browse the excel file from their system and import …

Member Avatar for chrishea
0
566
Member Avatar for cbmjarvis

Hi, I have an html form which, when submitted, e-mails the data via php to me. It all works fine, but I wondered if there was a way to get the output to be displayed in html rather than by e-mail. Any help would be much appreciated. Thanks, Chris.

Member Avatar for cbmjarvis
0
113
Member Avatar for kako13

Hi, I'm was asked to create a search engine. The same search on data in a MySQL service. Right now it work, but the search query is not powerful. How I can improve it and make it a good search engine? [CODE=php] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> …

Member Avatar for kako13
0
162
Member Avatar for keanoppy

[code]echo "<td> <input type=\"text\" name=\"name$i\" size=\"10\" readonly=\"readonly\" value="; echo $row['name']; echo " /> </td>";[/code] currently,if there is a value in column name,i.e mr john, only mr will be shown in the value.i've check with my mysql_fetch_array and all others,seems like when i echo $row['name'] outside the <td>,mr john will appear,only …

Member Avatar for almostbob
0
115
Member Avatar for khr2003

Hi I have a table which I am trying to pull some data out of. I am trying to select all the data where one field matches two numbers. [CODE]mysql_query ("SELECT articles.*,articles_comments.* FROM articles LEFT JOIN articles_comments ON articles.id= articles_comments.articleid WHERE articles.cat_id='$cat_id' AND articles.status='1');[/CODE] what I want to do is …

Member Avatar for khr2003
0
68
Member Avatar for gruebz

Hi, I don't know anything about PHP but my site has a ready made template with the following block of code which produces an image stored on my server and links to page on my site: [code] <block type="core/template" after="-" name="left.permanent.callout-2" template="callouts/left_col.phtml"> <action method="setImgSrc"><src>images/media/col_left_callout-2.jpg</src></action> <action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service …

Member Avatar for gruebz
0
141
Member Avatar for Indiainternet

Hi I have a website [url]http://www.bizmartindia.com/[/url] has pr 3 [url]http://www.bizmartindia.com/index.php[/url] has pr 2 1 Will it make a difference to google ranking 2 Hoew to merge [url]http://www.bizmartindia.com/index.php[/url] in to [url]http://www.bizmartindia.com/[/url] Is any change in .htaccess file is required. How to do it. Pls help

Member Avatar for Indiainternet
0
148
Member Avatar for BigDan531

hi guys i need some help with my code im new to php and im trying to create a login page. i have created MYSQL database to go along but whenever i try to login - it brings me to myaccount.php and just displays Access Denied no matter what input, …

Member Avatar for pritaeas
0
98
Member Avatar for Studio

Hi there I have been searching round the internet for the last few days trying to find a tutorial that would help me make a contact form that then uses server side and client side code (PHP/Ajax) to validate the fields so that it is degradable if the user has …

Member Avatar for vinothkumar023
0
148
Member Avatar for kennycason

Hi, I am currently having a multilingual website developed and the following problems emerged: Japanese text displays perfectly on all pages of the website, on both the user and admin end. However, whenever a mail containing Japanese is sent it turns into gibberish. (I do have Japanese fonts on my …

Member Avatar for kennycason
0
60
Member Avatar for keanoppy

i wanted to make the input type=text name="" to be incremental i.e. a1,a2,a3 according to the loops generated by sql query the question is,how to specify which name to be read to the next page.code fragments might help better yeah? in one of my .php script,i have this fragment of …

Member Avatar for keanoppy
0
93
Member Avatar for Freedom2

This old fart is attempting to get his aged brain wrapped around this mysql/php stuff. Getting my data from Excel into a Mysql db took some doing, but I got it done. Hooray for me! Now I've been trying to get that data into a page using php. I've managed …

0
50
Member Avatar for chand.

Anyone knows the best book of php5, in which author teaches to create an object oriented shopping cart, step by step. Or if anyone knows about some great series of tutorial in which we can have the same stuff.

Member Avatar for InsaneVr6
0
95
Member Avatar for kbjustin

I just installed php 5.3 and apache 2.2 on my computer. While Apache seems to know I have php(it shows php 5.3 on the bottom of the apache monitor) when i tried to load a page with phpinfo() nothing shows up. I know i have the right syntax(i have used …

Member Avatar for kbjustin
0
747
Member Avatar for HughLa

Ok I have been trying for hours and hours to stop my image upload script from uploading the same image whenever a user refreshes the page. I have tried unlink, unset and redirecting the user and back. It still won't quit. I have literally unset every single input element in …

Member Avatar for djjjozsi
0
74
Member Avatar for CFROG

I've been working on trying to solve the problem of calculating the average of a row of numbers in which some of the cells have a null value. I'm convinced there's no easy way to do this. I found an example on the net that I have been working from …

Member Avatar for CFROG
0
119
Member Avatar for shella

Hi all, i'm blocked on a script php/ajax that manage dynamic select. To let me understand better here the link tutorial: [url]http://phpgon.com/ajax-php-dynamic-select-lists.html[/url] I take this little code part aboutthe file dynamic-lists.js where i'd like to pass another variable to the get-subcategories.php page and not only the variable idcategory. [code] function …

Member Avatar for noelthefish
0
126
Member Avatar for satrio27

I had a problem that I can't seem to find an answer everywhere. I want to make an autoresponder based on web with php, but I don;t know how. Could please someone give a tutorial about this? Thanx

Member Avatar for chrishea
0
45
Member Avatar for jbennet

[B][U]How to install a Debian LAMP Server[/U][/B] [B][U][/U][/B] [I]The combination of Linux + Apache + MySQL + PHP setup is known as LAMP[/I] We will be using: [B]Debian Linux - Operating System[/B] Debian is an opensource operating system, which uses the popular Linux kernel. It is a good choice for …

Member Avatar for inckie
1
758
Member Avatar for itisnot_me

ok what i am trying to do is have the user insert cretin things like %address%, and what will happen is i would have data be recalled from the DB and replaced with what it needs to be ex: %address% = 1234 main st this is what i have idk …

Member Avatar for cwarn23
0
63
Member Avatar for tsr.linkan

i want to execute the mail function but it does not work...... The below error has occured......what can i do/i don't know how to get the php.ini file.............................. [B]Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use …

Member Avatar for cwarn23
0
88
Member Avatar for ROTC89

ok so i am trying to make a program that is able to viewed on the web using mysql and php together. i have to show a little icon or something saying would you like to view the listing you submitted. this is my program but i keep getting a …

Member Avatar for ROTC89
0
113
Member Avatar for SEO-FREE

or paid even? Community websites like facebook, soulmates and etc..? Please recommend any if you know.! thanks!

Member Avatar for twohawks
0
143
Member Avatar for bethennyengland

Are there any benefits of offering php software developers free php open source software? how can a business profit from this?

Member Avatar for Ancient Dragon
0
74
Member Avatar for k2k

hi, i selected everything from the table and the direct variable $cResult[3] would give me something like "street address with space as delimiter" ... however, when i tried to use it, it will give me only "street" instead of "street address with space as delimiter". does anyone know how i …

Member Avatar for k2k
0
111
Member Avatar for zenix

Hi, I am trying to learn php and when I feel i understand a concept I like to try it out by writing a script or 2. I am currently attempting to create an image on the fly, like a button. I keep receiving the message: Warning: imagecreatefrompng(red-button.png) [function.imagecreatefrompng]: failed …

Member Avatar for zenix
0
847

The End.