52,566 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for reco21

HEllo. If I do this.. <div>value | number</div> <?php $arr = array(10, 7, 2, 4); $i = 0; foreach ($arr as $value) { $i++; echo "<p>" . $value . " | " . $i; } ?> ill get something like number | value 1 | 10 2 | 7 3 …

Web Development php
Member Avatar for reco21
0
153
Member Avatar for afroo.gfx

**i have this connection** <?php $db_host = 'localhost'; $db_user = 'root'; $db_pass = ''; $db_name = 'databasename'; $conn = mysql_connect($db_host,$db_user,$db_pass) or die(mysql_error()); mysql_select_db($db_name,$conn); mysql_query("SET NAMES 'utf8'"); mysql_query('SET CHARACTER SET utf8'); ?> **but my old connection dosen't work with this code** //connect to database $link = mysqli_connect('localhost','root',''); mysqli_select_db($link,'databasename'); //get all rows …

Web Development mysql php
Member Avatar for DarkMonarch
0
614
Member Avatar for scholarwithfire

Hello, i'm having some problem when comparing date (from user input) with the date inside database. The format of both dates are the same (YYYY-MM-DD). This is the error it shows > You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version …

Web Development php
Member Avatar for diafol
0
111
Member Avatar for AlTaylorParker

I'm trying to create a function that builds the content of a page and add database info at a specific point in the process. I get this error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\EasyPHP-5.3.8.0\www\test\dukejets\view\pagecreator82812.php on line 20 This is line 20: "\t\t\t …

Web Development php
Member Avatar for diafol
0
193
Member Avatar for cip6791

Hello, I am trying to add a few custom modifications to a classifieds theme for Wordpress. It uses custom fields to get all the information in a post. Phone number, location, price, etc. It was designed to send an email to the user, the user clicks a confirmation link which …

Web Development php wordpress
Member Avatar for Bluestacks
0
262
Member Avatar for bvk008

<textarea name="primary_goals[]" rows="5" cols="23" style="height:145px; width:325px;"><?php echo $primary_goals; ?></textarea> textarea value is stored in database primary_goals[] array stores the values enterd in textarea.. how can i display this value again in this text area

Web Development display php
Member Avatar for diafol
0
1K
Member Avatar for joshl_1995

Hello Community, I was wondering if it is possible to run a php file every week that checks if a user has activated there account after 7 days they will be deleted. Please help. Thanks in advance.

Web Development
Member Avatar for joshl_1995
0
167
Member Avatar for abhi10kumar

I have a website plus database with details like username, password and database name. Now I want to connect and use this database into another website. I tried to include, for example include('http://domainname.com/connect/db.php'); but unable to run query. How I can do this ?

Web Development php
Member Avatar for urtrivedi
0
283
Member Avatar for davy_yg

Hello, I am receiving this error while trying to save information in admin page: http://localhost/RustoleumCustomCMS/administrator/%3Cbr%20/%3E%3Cb%3ENotice%3C/Masterlink/cgoods/PHP_SELF%20in%20%3Cb%3EC:%5Cxampp%5Chtdocs%5CRustoleumCustomCMS%5Cadministrator%5Cinput_berita_static.php%3C/b%3E%20on%20line%20%3Cb%3E174%3C/b%3E%3Cbr%20/%3E Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error. If …

Web Development apache perl php
Member Avatar for davy_yg
0
245
Member Avatar for asif49

On the jsp page; I have a logic:iterate tag which loops through data from an xml file and displays it within a drop down. How do i take and store the selected option from the drop down into the form-bean for processing.

Web Development java-jsp
Member Avatar for rrpandiarajan
0
1K
Member Avatar for cguan_77

hi guys, I had installed WAMP on my win 7 workstation, the PHP file is not executed or run in IE and firefox but works fine in Google Chrome. any ideas is greatly appreciated. Thanks.

Web Development php
Member Avatar for cguan_77
0
195
Member Avatar for Lucrezia

Hello, and congratulations for this beautiful and meticulous forum. I have a javascript/html/css issue that I'm trying to solve for about 3 days now, with no luck. I'm using javascript to toggle the visibility of a certain table. I set the table's display property to none (via js) in order …

Web Development display html-css javascript
Member Avatar for EricGeerts
0
2K
Member Avatar for Khav

Hi Guys I have a script on my linux server.However i am having an issue with php-fpm ...whatever configuration i put , the php pages take time to load.For some configuration , the php files load fast at start and over time they become slow ...after 5-9 hours its 404 …

Web Development open-source php
Member Avatar for Khav
0
328
Member Avatar for monsterpot

Apologies first if this is covered elsewhere - I searched but could not find. I am looking for a way to search the web for the presence of a JavaScript code snippet within the HTML <body> of a web page. I would specify the code snippet and send the bot …

Web Development javascript php seo
Member Avatar for aqeel.mmd
0
940
Member Avatar for HanneMercouffer

Now, i know designing field HTML and Photoshop. But i want to go for further studies about AS3 because once i need to design a project as well as coding, it will surely necessary. So give me some suggestion.

Web Development
Member Avatar for sarahaisling
0
52
Member Avatar for PHPuss

I have code , and I need to change color row when in last column 'status' appears value = 'error' <?php //first, get the file... $file = file('log.txt'); //now count the lines .. $lines = count($file); //start the table here.. echo '</br>'; echo'<table border="1" width="600">'; echo ' <td width="400">Date</td>'; echo …

Web Development php
Member Avatar for simplypixie
0
170
Member Avatar for garyjohnson

I have a hosting account through godaddy and im trying to make a php upload file so users can upload files to my site, but the php file upload I have found on the internet wont work, here is the html code <html> <body> <form action="upload_file.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> …

Web Development file-system php
Member Avatar for urtrivedi
0
698
Member Avatar for PhilEaton

I am wondering how I can hide all divs on the page only using Javascript, I cannot use Jquery. Is there a way to do this without using the arrays that comes with document.getElementByTag? Or if there is not, could you show me how to hide all? Thanks!

Member Avatar for iamthwee
0
281
Member Avatar for rotten69

Hi everyone, I want to get started on learning jQuery Framework.I got the basics of the JavaScript at this stage. But now, I don't know where to start with jQuery. Other than the jQuery.com website. Would you suggest easy-to-follow introductions to jQuery? Is there a big difference between jQuery and …

Web Development javascript javascript-jquery
Member Avatar for iamthwee
0
306
Member Avatar for AMADH

Hello, I was wondering if somone might be able to help me. I have a txt file, it looks like this ID1|NAME1|URL1|EMAIL1|LOGO1|ADTEXT1|ADTEXT1|CATEGORY1|PUBDATE1 ID2|NAME2|URL2|EMAIL2|LOGO2|ADTEXT2|ADTEXT2|CATEGORY2|PUBDATE2 ID3|NAME3|URL3|EMAIL3|LOGO3|ADTEXT3|ADTEXT3|CATEGORY3|PUBDATE3 This is my php code // initial database stuff $host = "localhost"; $user = "root"; $pass = "root"; $db = "database"; $connection = mysql_connect($host, $user, $pass) …

Web Development file-system mysql php
Member Avatar for cereal
0
6K
Member Avatar for ckchaudhary

sorry couldn't frame a better title. So here's the problem i have a function inside functions.php function show_news(){ $id_counter = 1; $json_news = array( "id" => 0, "title" => "" ); $json_o = json_decode(file_get_contents(JSON_DATA_FOLDER.'news.json')); foreach ($json_o as $id => $news_category) { echo '<h2>'.$id.'<h2>'; foreach ($news_category as $news) { if(IsNullOrEmptyString($news->id)){$json_news['id'] = …

Web Development json php
Member Avatar for diafol
0
218
Member Avatar for maxpaine69

Hi all, What is the best to autenticate with out using the standar roles from VStudio.

Web Development asp asp.net
Member Avatar for maxpaine69
0
159
Member Avatar for debal

<?php $con = mysql_connect("localhost","root","12345"); if (!$con) { die('Could not connect: ' . mysql_error()); } echo "connection made"; if(isset($_POST['nw_update'])){ echo("You clicked nw_update!"); } else { echo" dhur"; } ?> <html> <body> <form action="<?php echo $_SERVER(PHP_SELF); ?>" method="POST" > <input type="button" id="nw_update" value="NW_Update"/> </form> </body> </html> In the above code when the …

Web Development gui php sql
Member Avatar for simplypixie
0
10K
Member Avatar for ayat abukhadra

Hello, I've created an asp.net website with english interface, now I'm trying to provide another language interface to my website, can anyone directs me how to flip a webpage left to right and vise versa ?

Web Development asp.net
Member Avatar for ayat abukhadra
0
172
Member Avatar for samsam9988

Hi, <script language="JavaScript"> function Validate() { var image =document.getElementById("image").value; if(image!=''){ var checkimg = image.toLowerCase(); if (!checkimg.match(/(\.jpg|\.png|\.JPG|\.PNG|\.jpeg|\.JPEG)$/)){ alert("Please enter Image File Extensions .jpg,.png,.jpeg"); document.getElementById("image").focus(); return false; } } return true; } function refreshParent() { var URL = unescape(window.opener.location.pathname); var PARMS = unescape(window.opener.location.search); // window.opener.location.href=window.opener.location.href; var ms = new Date().getTime(); window.opener.location.href="/HousewareAdmin-web/categories_create/"+ms+PARMS; } …

Web Development javascript
Member Avatar for lps
0
133
Member Avatar for rajeesh_rsn

Hi friends, I m a PHP programmer and I likes to learn Ruby . But I had stucked ( Really Became Mad ) with installing ruby on Rails in my System .. Googled a lot ... but it is installing Ruby 1.8 & Rails 2.3 ... Please Help me .... …

Member Avatar for noel.gallagher.jr
0
134
Member Avatar for garyjohnson

I have gotten a php file where users can create their own user ids and login and out with them and it saves their name in mysql, now i want these users to be able to upload small videos, can someone please tell me a php code for how a …

Web Development mysql php
Member Avatar for diafol
0
386
Member Avatar for GTTravis

hi guys, i want to create a database driven panel, that is whenever the page loads how much ever entries in the database thats the amount of panels which must be created. any suggestions....tutorials would be welcomed i also would like to have each panel have the ajax collapsible extender …

Web Development asp.net
Member Avatar for GTTravis
0
96
Member Avatar for vishalonne

Hello All I want the same feature as **DaniWeb** have. If I Go on PHP forum and try to start new discussion without doing login process, it takes me to the login page and if enter my valid login id and password it directly takes me to page where I …

Web Development php
Member Avatar for cereal
0
145
Member Avatar for monica.slocum

Basically I am looking for a very simple popup box to come up after a user hits the submit button. I don't want it to say "Are you sure you want to submit this" or anything like that just simply "Thank you for your submission". Ideally the page would be …

Web Development php
Member Avatar for almostbob
0
11K
Member Avatar for sabarinadh.ch

I have to retrevie data from the database using "SELECT * FROM $tbl_name WHERE cat1 = technicalfest ORDER BY id DESC"; can any one tell me how to use multiple

Web Development mysql php
Member Avatar for diafol
0
319
Member Avatar for Salman.developer

I'm a new programmer with C# can I ask afew Questions Because I need for your help

Web Development asp.net c c# c++
Member Avatar for JorgeM
0
83
Member Avatar for McLaren

Hello, I have experience in codeigniter, and in it just set the settings in database.php and you connect to the database. In zend, I have no idea. Bootstrap.php <?php class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function _initDB() { $dbConfig = new Zend_Config_Ini(APPLICATION_PATH . '/configs/db.ini'); $dbAdapter = Zend_Db::factory($dbConfig->adapter, array( 'host' => …

Web Development php php-codeigniter
Member Avatar for McLaren
0
481
Member Avatar for dyingatmidnight

I realize this probably isn't something that can be done, or probably something that shouldn't be done. But here's my situation. Perhaps someone knows of a better way to go about it than I do. I have two sections that both have logins. Admin and Members. Some Admins can access …

Web Development php session
Member Avatar for diafol
0
264
Member Avatar for mohithamgaonkar

i am creating an ecommerce site and i want to add and retrieve image from database within image tag please someone help me with it... i do not want to save the image path but whole image..... i want to use attribute width and height with the image....

Web Development ecommerce image php
Member Avatar for diafol
0
475
Member Avatar for GTTravis

hi guys, i am looking for a control which has several headings from a database, regardless of the heading when clicked it should it expands to reveal a list view which can be edited.

Web Development asp.net
Member Avatar for GTTravis
0
111
Member Avatar for daniel36

<?php SESSION_START(); require 'config.php'; $query="SELECT * FROM topics WHERE student_id='".$_SESSION['id']."' AND id='".$_GET['id']."';"; $result=mysql_query($query) or die(mysql_error()); $rows=mysql_fetch_assoc($result); ?> <table> <tr> <td colspan="2"><?php echo $_SESSION['user_name']; ?></td> <td colspan="8"><b><?php echo $rows['title']; ?></b></td> </tr> <tr> <td colspan="2"></td> <td colspan="8"><?php echo $rows['description']; ?></td> </tr> <?php $sql="SELECT * FROM comments WHERE topic_id='".$_GET['id']."';"; $comment_result=mysql_query($query) or die(mysql_error()); While($row=mysql_fetch_assoc($comment_result)) …

Web Development php
Member Avatar for broj1
0
150
Member Avatar for penet.biz

I have this error :Parse error: syntax error, unexpected '$db_field' (T_VARIABLE) in C:\Program Files (x86)\EasyPHP-12.1\www\penet.hi2.ro\cheats.php on line 110 And the code is : <?PHP require ("connect.php"); //$db_handle = mysql_connect($server, $user_name, $password); =>$connect $db_found = mysql_select_db($_mysql_db, $connect); if ($db_found) { $SQL = "SELECT * FROM cheats"; $result = mysql_query($SQL); while ($db_field …

Web Development php
Member Avatar for broj1
0
314
Member Avatar for dante123

hi i have two menus that i use as include in index.php file: topmenu and leftmenu I'm using the same code in oder to show the active header switch (THIS_PAGE): Code for the "Top menu include": <?php define('THIS_PAGE', 'pagename'); $menuitem1 = '<a href="index.php">Home</a>'; $menuitem2 = '<a href="about.php">About</a>'; $menuitem3 = '<a …

Web Development php
Member Avatar for diafol
0
183
Member Avatar for Riu 2009

i've displayed a table from database using php.and now what i want is to edit records seperately as i've placed an edit and a delete link in front of each record which edits the record from sql.and it is now giving this warning.Please help me to find the error correctly.as …

Web Development html-css mysql php
Member Avatar for diafol
0
333
Member Avatar for Riu 2009

Hi everyone i dont know how to get the already filled value of radio buttons from sql using html/php here is my code but its giving error <?php include("../includes/config.php"); ?> <?php if ($_SESSION["isadmin"]) { $con=mysql_connect($dbserver,$dbusername,$dbpassword); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname, $con); $accountid=$_GET["id"]; $result = …

Web Development html-css mysql php
Member Avatar for Riu 2009
0
8K
Member Avatar for Goldfinch

The following script is supposed to take in a date formated YYYY-MM-DD and output an image. It is also designed to display an error image if the date inputed is before the start date defined in the script or after the current date. The problem is that it doesn't seem …

Web Development image php
Member Avatar for broj1
0
124
Member Avatar for andy106

Hi I have a simple code below that fetches, make, model and year from the database, but for some weird reason I get: Fatal error: Cannot access protected property error, any ideas as to why this might be happening? (i btw have this code on a different server running with …

Web Development php
Member Avatar for johrocks124
0
3K
Member Avatar for cguan_77

hi guys, please help me out on this issue. i had this code to connect to mysql using php but there is no any message displayed. nothing is displayed on the screen, whether the connection is successful or there is an error. any ideas? i can connect to mysql using …

Web Development mysql php
Member Avatar for cguan_77
0
180
Member Avatar for PhilEaton

I just thought of this and was wondering if it is possible. So similar to how you can relatively reference a parent folder using ../. Is there a way to access a parent directory if a domain name is associated with a sub-folder. For instance, on my server, I have …

Web Development file-system
Member Avatar for JorgeM
0
491
Member Avatar for PhilEaton

Hi! I recently created a website that has a contact form that sends an email with the PHP Mailer class. I had to use my gmail account because I cannot get my LAMP server's SMTP protocol working... In my mail.php file, I display the password and account quite openly as …

Web Development email encryption php
Member Avatar for PhilEaton
0
3K
Member Avatar for wheels031799

What I am trying to do is a prize page that comes up every XX pages surfed. The new page would consist of three muscle cars that the user would click on their choice (hood is down). Choice would appear with hood up, showing engine which would have a changeable …

Web Development javascript
Member Avatar for wheels031799
0
148
Member Avatar for persianprez

I have the following code: $filename = "raw_data.txt"; $fp = @fopen("$filename", 'r'); if ($fp){ $array = explode("(.)", fread($fp, filesize($filename))); } for ($i=0; $i<sizeof($array); $i++){ //name1 name2 name3 name4 } So what I want to do is initialize variables with $name and the current $i value Thanks in advance

Web Development php
Member Avatar for Atli
0
1K
Member Avatar for PhilEaton

I am trying to check for the background of an element, here is my code. But it doesn't work: I tried two ways, here is the first: function changeColor(field) { if(field.css('background-color','#ffb100')) { field.css('background-color','white'); } else { field.css('background-color','ffb100'); } } here is the second: function changeColor(field) { if(field.css('background-color') === '#ffb100') { …

Member Avatar for Taywin
0
277
Member Avatar for katties

Hi I have a function that reads a numeric value from a dropdown menu 'onchange'; the thing is, I have a couple of menus like that, and I would love to make my function more generic, so it would not need to be repeated every time for every dropdown menu... …

Web Development javascript
Member Avatar for Taywin
0
112

The End.