39,323 Topics

Member Avatar for
Member Avatar for johndohmen1963

hi hope someone can help me i have //get the current date $dateend = date("Y-m-d");// current date //datebegin is current date -99 years $datepast = strtotime(date("Y-m-d", strtotime($dateend)) . " -99 year"); $datebegin = date('Y-m-d', $datepast); // Connect to server and select databse mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select …

Member Avatar for johndohmen1963
0
98
Member Avatar for newprimitive

Hello, my problem is related to uploading images (i keep info data in database and images in filesystem). I plan to generate image path from image ID, that's why i need to get the ID of the last inserted image. For example: image with ID 123456789 has this path /images/123/456/789 …

Member Avatar for diafol
0
75
Member Avatar for lwaterfo

I have a code where I am inserting a new record into a database. I need a way of redirecting the user if they have already entered their information into the database. Here is my php code...how would I modify this to check for an existing record based on their …

Member Avatar for diafol
0
67
Member Avatar for CarterLangley

Hi all, I have a table with quite a bit of columns in it. Nothing stored there yet, but will be soon. What I need to do is populate a drop down list with the first name and last name of the people in the table and also the unique …

Member Avatar for diafol
0
141
Member Avatar for hankmeyer

Hello, I currently have a script that Uploads an image, resizes and saves successfully. I am having trubble understanding how I would rename the uploaded image according to the other image names in the directory. For example there are 3 images in the directory (Image1.png, Image2.gif and Image3.jpg) How would …

Member Avatar for cereal
1
4K
Member Avatar for stangn99

Hi All....this looks like a nice place to ask questions :) I'll start off by saying that I'm a total noob. I have a DIV with a static height set. Some dynamic content is being loaded into the DIV via PHP. My problem is, when I click on a link …

Member Avatar for aditya19897
0
2K
Member Avatar for Mko_

So, I have this following snippet of code: if (isset($_POST['type1'])) { mysql_query("UPDATE table SET status = 1 WHERE id = '". $_GET['repid']."'", $c2) or die(mysql_error()); } if (isset($_POST['type2'])) { mysql_query("UPDATE table SET status = 1 WHERE id = '". $_GET['repid']."'", $c2) or die(mysql_error()); } if (isset($_POST['type3'])) { mysql_query("UPDATE table SET …

Member Avatar for fobos
0
129
Member Avatar for rotten69

Hey Daniweb lovers, I am using a cake php framework to develop my application. The problem I am facing at the moment is that I am trying to use two different tables (let's call them users and products.) I can select users from the users table. But, I have got …

Member Avatar for rotten69
0
123
Member Avatar for vijaysoft1

i want the best secured php class to provide [B]log in[/B] feature in my web with access protection and session timeout , plz help me

Member Avatar for jonhy22
0
124
Member Avatar for gogs85

How to some div value export to xml with tag in php code. I search my site and from div value export to external xml file. ?php $some_link = 'http://www.popusti.rs/'; $tagName = 'div'; $attrName = 'class'; $attrValue = 'offer-list-item'; $dom = new DOMDocument; $dom->preserveWhiteSpace = false; @$dom->loadHTMLFile($some_link); $html = getTags( …

Member Avatar for diafol
0
363
Member Avatar for realworldmedia

Ok so i have been searching but this specific part i cant get, how do i echoinformation from my sql database with php into my div so i keep the same formating <div class="wrapper pad_bot3"> <figure class="left marg_right1"><img src="images/page1_img4.jpg" alt=""></figure> <p class="pad_bot1"><strong class="color2">Chateau Lingfield</strong></p> <p class="pad_bot1"><strong class="color2">3 baths, 6 beds, …

Member Avatar for realworldmedia
0
177
Member Avatar for t_thakar

Hi Im trying to create a web based quotation system with php and mysql. I wanted to create something like shopping basket where people store the items and when they click generate quote the system will display the quote of the items and qty selected. Only when the person has …

Member Avatar for cereal
0
489
Member Avatar for veledrom

Hi, I wonder what is the best way to prevent injection against user input. There are a lot of examples but one say "magic_quotes_gpc" is good but removed from PHP soon. Therefore, no point of using it. Another says "mysql_real_escape_string and addslashes" just used to clean iptuts. Etc etc. I …

Member Avatar for phplover
0
163
Member Avatar for rotten69

Hey people, I am wondering what a good editor is that supports HTML5, CSS3, cakephp and a few other plugins ? I'm using Eclipse for php which supports HTML5... At the same time, I trying Aptana Studio3 which supports CSS3 ... I need one that supports all.. Or even Plugins …

Member Avatar for rotten69
0
173
Member Avatar for aecha

Hi.. I need some help from all of you. My link cannot go to the next page when i include index.php?page= in my line.Like the example below.. <td><div align="center"><a href="index.php?page=view_user.php?ref1=<?php echo $row['user_id'];?>">View</a></div></td> If I remove the index.php?page= , the page can link to the page that i want to go. …

Member Avatar for aecha
0
130
Member Avatar for geneh23

Hey everyone I'm trying to create a blog using php and for a certain page, I am "including" an "init.php" file that doesn't seem to recognize...I have three folders within another folder called "test5" and within that folder I have the folders called: "func" "resources" and "simple". Now in the …

Member Avatar for Shark8000
0
299
Member Avatar for dany12

Hello How can you store a theme(css jquery html) in a database and retrieve it using php and jquery ajax Can this be done in json and what advantages are with this tehnology,I am new to json and don't know that is why I am asking any ideas will be …

Member Avatar for diafol
0
114
Member Avatar for Venom Rush

Hi there I'm new to soap and I'm using the NuSOAP library. I'm trying to send xml to a soap server and then receive a response. I'm getting nowhere with this and it's beginning to frustrate me. Here is what I was provided with: First Snippet POST /Submit.asmx HTTP/1.1 Host: …

Member Avatar for diafol
0
5K
Member Avatar for don't give up

hello please help me first question : how can send email for users if him register in my website"i saved email in database" ,, send one Time a day Automatic .. second question : how can search in database then display for user thanks alot

Member Avatar for diafol
0
172
Member Avatar for latortuga42

Hi, I have a JavaScript validation function that worked before I changed the sendmail file to a php version (had to becfause of host's linux server). The sendmail code in the php file has some validation checking, but I would prefer to use the validation.js file with the form's onSubmit …

Member Avatar for ddymacek
0
697
Member Avatar for nexocentric

I'm having a small problem with a variable in one of my PHP scripts. The variable is `$isSubMenu`. It gets set using a function that runs recursively called createNavigationMenu. However, even though I have set it, the interpreter keeps telling me that the variable is undefined. I really don't know …

Member Avatar for nexocentric
0
570
Member Avatar for heshanm

I want to retrieve records in my database in order to manage details. The below error message displayed when i trying to do that. Can anyone help me out? ( ! ) Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\Student registration\manage student details\manageStudentDetailsForm.php on line 250 …

Member Avatar for Venom Rush
0
119
Member Avatar for nchy13

we can use $_GET method to pass info via url but it shows the info in url like <a href =profile.php?id=$user>click here</a> and in profile.php?id=$user , we can access username via $username=$_GET['id']; is there any safer method to achieve because i don;t want to show the info passed in url. …

Member Avatar for urtrivedi
0
342
Member Avatar for hptchen

hi guys... i really need reference ASAP what i'm trying to do now is: -creating API from my website so that -other website can read certain content for my website database and put it in their website. i don't know if i explain it correctly, i tried to googling for …

Member Avatar for pritaeas
0
65
Member Avatar for dschuett

This works: while($row = mysql_fetch_array($results)){ if($isfirst){ $last_id = $row['id']; } $isfirst = 0; $msg_id = $row['id']; $message = nl2br($row['post']); $time = $row['post_time']; $name = $row['firstname']." ".$row['lastname']; if($row['updated']=='1'){ $updated = "- <font style='color:#DB4937;'>CORRECTED</font>"; } else{ $updated=''; } $newPosts .= "<li id='msgblk_$msg_id'><span id='message_$msg_id'>$message</span><p class='time' id='time_$msg_id'>$name - $time $updated</p></li>"; } $newID = $last_id; …

Member Avatar for dschuett
0
284
Member Avatar for Wolxhound90

Hey guys, I have this code which gets some reults from a table and displays them: echo "<table><tr>"; while($col = mysql_fetch_array($columns)){ echo "<th>".$col['COLUMN_NAME']."</th>"; } echo "</tr>"; $i=0; while($row = mysql_fetch_array($data)){ echo "<tr>"; foreach($row as $r){ echo "<td>".$r."</td>"; } echo "</tr>"; } echo "</table>"; Getting the column names is fine, but …

Member Avatar for Wolxhound90
0
111
Member Avatar for dany12

Hello I need to setup a virtual host for my zend aplication I managed to link all my zend framework with php and windows I am using wamp 2.2d and I am having a problem with the virtual host NameVirtualHost 127.0.0.1:80 <VirtualHost 127.0.0.1:80> ServerAdmin webmaster@localhost DocumentRoot "c:/wamp/www" ServerName localhost ServerAlias …

Member Avatar for dany12
0
115
Member Avatar for apanimesh061

What should be the regular expression for thid code ??? `<span style="text-align:justify;">Stepping out of the Shadows:M6 Once touched... Marisa Somerville has changed. Now a confi dent, groomed, successful businesswoman, in some ways she's nothing like the scared wife of an abusive husband that Rafe Peveril survived a plane crash with …

Member Avatar for apanimesh061
0
294
Member Avatar for gilgil2

Hi, I am trying to query a MySql database based on which search fields are filled in and ignoring those that aren't. I have only got as far as the first part and it isn't working, could anyone tell me why? It doesn't seem to be finding anything in the …

Member Avatar for diafol
0
142
Member Avatar for meko22

Hi there, I would like to make an email form that would select all the emails from a MySQL db and then send that message to all addresses. I got this script but was unable to get it working. Any help would be great. [code] <?php //Connect to database mysql_connect("localhost","user","password") …

Member Avatar for shahidsidd
0
8K

The End.