743 Posted Topics

Member Avatar for crazynp

[QUOTE=crazynp;]Thanks stymiee ! but do you think this is an efficient solution? The number of files will get increasing and that need to be deleted. Is it possible to disable the cahing? Regards![/QUOTE] [QUOTE=stymiee;338847]There's no reliable way to disable caching. You can send send out headers to prevent caching but …

Member Avatar for crazynp
0
157
Member Avatar for proctk

[QUOTE=proctk;337915]after some searching I come up with the below which give the error I posted. I'm surprised that I have not been able to find script that uses mysql to get birthdays within x days. error message, any ideas, thank you for the help SQL Error: SELECT DOB, STR_TO_DATE(CONCAT(EXTRACT(DAY FROM …

Member Avatar for UrbanSky
0
1K
Member Avatar for nzd

Heres some links that may help you: [url]http://www.opensourcecms.com/[/url] - demo of open source CMS's [url]http://www.cmsmatrix.org/[/url] - Open Source CMS feature comparison. I'd look at Joomla, Mambo, Wordpress, Drupal and Xoops.

Member Avatar for justinm
0
119
Member Avatar for Barefootsanders

[QUOTE=Barefootsanders;337403]Hey everyone. Ive been trying to set up a link that will allow people to see their profiles but I cant get the link to work. I have a center column that on each click gets the variable $page and loads the correct page using an include("profile.php"); Now I need …

Member Avatar for digital-ether
0
220
Member Avatar for Slavis81

[QUOTE=Slavis81;337120]Hello, I am a newbie coder and I am trying to create a [URL="http://www.daniweb.com/techtalkforums/thread73193.html#"]php[/URL] mailing list. I would like the users to enter their email address into the text box and click submit and have the email addresses seperated by ;'s and imported into my list.txt file. Here is the …

Member Avatar for digital-ether
0
168
Member Avatar for sultanwadood

I don't think its possible to revert to the old function unless you save it somewhere. eg: [code] String.prototype._substr = String.prototype.substr; String.prototype.substr= function() { return this._substr(0,5); } [/code]

Member Avatar for sultanwadood
0
69
Member Avatar for mohaydee

Hi mohaydee, Unlike CSS which which is interpreted by the browser as formatting and styles for the HTML, PHP is interpreted by the server into HTML that is sent to the browser. The "action" of your form: <form method="post" [B]action="sendeail.php"[/B]> defines the page that the form data will be sent …

Member Avatar for UrbanSky
0
101
Member Avatar for rpjanaka

[QUOTE=rpjanaka;329225][COLOR=Green]<img src="[href to image][/COLOR][COLOR=Green]" name="add" onclick="sendAdd();"> [COLOR=Black]this is the way i am useing the image as a button. is this possible to disable.....? [/COLOR][/COLOR][/QUOTE] I don't think disabled works on an <img> as you have it. Why not just use javascript to check if you've disabled an image? eg: [HTML]onclick="if(!this.disabled)sendAdd();"[/HTML]

Member Avatar for digital-ether
0
8K
Member Avatar for tomhughes

You could use the shorthand notation with isset, it keeps things on one line.. [php] $name = isset($_POST['txtName']) ? stripslashes($_POST['txtName']) : ''; [/php]

Member Avatar for digital-ether
0
152
Member Avatar for hunkychop

Parse errors usually do not show the correct line number in the error msg. Usually its the line just before the one given, like jgutierrez@mail pointed out...

Member Avatar for digital-ether
0
107
Member Avatar for sam1

Try some error checking on the mysql query: eg: [php] $result = mysql_query("INSERT INTO shoutbox (id,ip,name,url,message,date) VALUES('','$ip','$name','$url','$message','$date')") or die('Error inserting into DB.'); if ($result) { // ok echo "Mysql Insert ok"; } else { echo "DB Error, could not query the database\n"; echo 'MySQL Error: ' . mysql_error(); exit; } …

Member Avatar for niceboy
0
283
Member Avatar for desiguru

I use Joomla for CMS purposes. It supports manual creation of different language versions of content and many of the extensions via the Joom!Fish component. [url]http://extensions.joomla.org/component/option,com_mtree/task,listcats/cat_id,1838/Itemid,35/[/url]

Member Avatar for julian2003
0
91
Member Avatar for hbmarar

I think you'll have to cache the number of files in each folder. Otherwise you'll have to recurse through the folders each time counting the number of files each time you call the pagination script. How are you doing it at the moment?

Member Avatar for hbmarar
0
101
Member Avatar for petzoldt01

Hi, To get to know the PHP syntax and functions faster I'd recommend downloading the manual: [url]http://www.php.net/download-docs.php[/url] Some of the things you'll have to look at first in PHP manual is how it handles datatypes. PHP types are not explicitly defined. For example, you can have a condition that matches …

Member Avatar for digital-ether
0
119
Member Avatar for elderp

Try putting in some error checking when you have made an SQL query. eg: [php] $query = 'DELETE FROM info647_emp WHERE empno = $id ON DELETE CASCADE'; // i've changed from here on to check for errors $result = mysql_query($query); if ($result) { // ok echo "Row deleted!"; } else …

Member Avatar for digital-ether
0
97
Member Avatar for Turnkey_Websites

What are you using to generate the articles? A public PHP script? CMS? Your own PHP Code?

Member Avatar for digital-ether
0
61
Member Avatar for hbmarar

The exec() function may help you. [url]http://php.net/function.exec[/url] It allows you to execute shell commands from PHP. You could for example exec to execute "ls" or "dir" and then parse the return for the directories.

Member Avatar for digital-ether
0
91
Member Avatar for Inny

Hi,[HTML][/HTML] You should put some alerts in your code to see if it is actually being run or not, and to see if the variables are changing as expected... You could probably just check word for word also by creating an array of words out of the form field value. …

Member Avatar for Inny
0
340
Member Avatar for vssp

[QUOTE=vssp;304994]Hai friends I am using array "name " field for example <input name="prod_image[]" type="file" class="Textfield" id="prod_image[]"/> *</td> When I try to validate the text box NULL or not using Javascript ,I unable to validate Please any one advice me [/QUOTE] [HTML] var value = document.getElementById('prod_image[]').value; [/HTML] That should get you …

Member Avatar for digital-ether
0
90
Member Avatar for evank

A "better way" to write: [html] <a href="javascript:window.open('newpage.html',params)"> [/html] is: [html] <a href="newpage.html" onclick="window.open('newpage.html',params); return false;">[/html] That way it satisfies both users with and withought JavaScript support on their browser. (winout JS you wont be able to control the window anyway) Using href="javascript:(some code)" will also write the returned object …

Member Avatar for digital-ether
0
183
Member Avatar for assgar

Try using the is_array() function which returns true only if the argument is an array. That way you can make sure you're only passing arrays to array_filter(). eg: [php] if (is_array($array)) { $filtered_array = array_filter($array, 'filter_function_name'); } [/php] or maybe: [php] if (is_array($array)) { $filtered_array = array_filter($array, 'filter_function_name'); } else …

Member Avatar for assgar
0
84
Member Avatar for crazynp

[QUOTE=php_daemon;302217]The easiest way is using database to store the last form submit time by an IP. Here's the idea: [code] create table timer( ip varchar(255), timestamp int ) [/code] [php] $ip=mysql_real_escape_string($_SERVER['REMOTE_ADDR']); $time=time(); $timeout=time()-5*60; mysql_query("DELETE FROM timer WHERE timestamp<$time"); $r=mysql_query("SELECT * FROM timer WHERE ip='$ip'"); if(mysql_num_rows($r)>0) { die("You've already submitted this …

Member Avatar for digital-ether
0
112
Member Avatar for nathanpacker

You'll need to view the output of the php to the page. (view-source on the browser). You can then see what is causing the problem with IE. As it looks, there should not be a problem. What the code does is iterate through each image in the image directory of …

Member Avatar for nathanpacker
0
120
Member Avatar for cashblogs

Its easier to do if you have every variable in the config file saved in an array. Eg: [php] $myConfig = array(); $myConfig['db_user'] = 'username'; // etc... [/php] This allows you to iterate through each value in the $myConfig array and not through the values retrieved via HTTP... eg: [php] …

Member Avatar for digital-ether
0
108
Member Avatar for clutch

Please post the code in newtest.php. Thats the only way someone can help. :)

Member Avatar for Puckdropper
0
116
Member Avatar for Lothas

[QUOTE=php_daemon;300116]You have two choices: [list] [*]Set up a cron job for the routine script [*]Call the routine on a common page (like index.php), save a time when it's executed and check against that so you can limit the execution times [/list] The cron job option seems to make more sense.[/QUOTE] …

Member Avatar for paradox814
0
141
Member Avatar for nathanpacker

[QUOTE=MCP;300329]While a form using the post method is less obvious then the ?id=xyz in the url, they're both just as hackable. If you want to verify (assuming you're running windows), check out Microsoft Fiddler, and you'll see exactly what gets passed along to your server. What you'll find is that …

Member Avatar for nathanpacker
0
228
Member Avatar for spacebar

You could add another table that adds value to each type of total. So you can rate a user like: Like Average X 5. Reads X 2 Votes X 3 Comments X1 Page Slam Wins X2 # Poems X 4 etc... And you can also add value to a rating …

Member Avatar for digital-ether
0
89
Member Avatar for tmv105

getElementByName() is not supported on all browsers. The DOM functions getElementsByTagName and getAttribute are more supported. Try a function like which uses those two to get the same result: [code] /** * Retrive an HTML Element Collection By name * @return Array HTML Elements * @param Object Parent Element * …

Member Avatar for digital-ether
0
93
Member Avatar for cty

Hi, If you look at the code that authenticates the username and password against the users table in the database: [PHP]$query='select* from user ' ."where username='$username'" ."and password=sha1('$password')"; $result=$db->query($query); if($result->num_rows >0) { $_SESSION['valid_user']=$username; } $db->close(); }[/PHP] You'll notice that the username and sha1() value of the password are validated against …

Member Avatar for digital-ether
0
108
Member Avatar for sgriffiths

When you say automatically populate, do you mean on a new page load, or withought reloading the page? Either way, the PHP code would be pretty much the same. If you have the details for the user in a database, you have to retrive the users details: eg: [PHP] $query …

Member Avatar for Rhyan
0
368
Member Avatar for pzuurveen

What you can do is try and get the filesize header from your CURL request you're making. If thats not available, then you will have to download the image data and get a filesize. Once you have a filesize, you can compare it with the filesize of the image retrieved …

Member Avatar for pzuurveen
0
164
Member Avatar for phaiymty

You need to add a linebreak on the line 40 I believe: [PHP]// now we insert it into the database $insert = "INSERT INTO users (username, password)[/PHP] Change it to: [PHP]// now we insert it into the database $insert = "INSERT INTO users (username, password)[/PHP] You may need to append …

Member Avatar for omesa
0
83
Member Avatar for FSNHosting

Where exactly is $_SESSION['username'] being reset? Have you figured that out... Is is in the subsequent HTTP request made by IE7 or is it changed in the first HTTP response when the cookie was set?

Member Avatar for digital-ether
0
79
Member Avatar for Karpat

What browser are you using? Did you test another browser? Also are you clicking from a link on another URL? Yes, referer is in the HTTP Protocol Specs. lol. mispelled of course.. ;)

Member Avatar for UrbanSky
0
83
Member Avatar for Karpat

[QUOTE=stymiee;285947]Look for 'BCC' in the form submission data. If it's there, have the script die().[/QUOTE] You shouldn't just check for 'BCC' as many other email headers and the email body itself that can be "injected" into the email to be sent. Probably checking for newlines/linebreaks would be better.. ie: \r …

Member Avatar for stymiee
0
78
Member Avatar for boo_lolly

If you use regular form submit buttons for each of those "tasks", then you can branch your PHP code using the value of each button.. Eg: [PHP]<?php ?> <form action="handle.php" method="post"> <input type="submit" name="task" value="Cancel" /> <input type="submit" name="task" value="Save and Exit" /> <input type="submit" name="task" value="Save and Continue" /> …

Member Avatar for digital-ether
0
115
Member Avatar for mahe4us

Take a look at the GD image library functions. Its installed on most PHP servers... [url]http://www.php.net/gd[/url] It can do all that you mentioned. The alternative is PHP Imagemagick Lib, but not as supported. If you want to do that on the browser without making calls back to the PHP server …

Member Avatar for mahe4us
0
93
Member Avatar for rejoicegants
Member Avatar for iamthwee
0
104
Member Avatar for lawfour

You will have to retrieve the registration info for the doctor from the database, and populate the current for with this information. Are you familiar with SQL?

Member Avatar for digital-ether
0
101
Member Avatar for procyon

[QUOTE=procyon;279668]I am working on a website and I dont know much of Javascript,but I need to put to work different scripts on the page,and it wont work!:sad: I've already try to chage all that I remeber to chage,but dosen't work!What I am doing wrong?Can anybody help me out? Here is …

Member Avatar for procyon
0
111
Member Avatar for Spycat

You really don't need to save anything in a cookie for this. You can just pass on what the use has put in the form in the HTTP POST or GET and populate the form with this for the user. It easiest if you use the same PHP script both …

Member Avatar for Spycat
0
122
Member Avatar for Sisil

You may have to do some custom coding on that one. Only advice I can give is to try and stick with the calendar Protocol that google calendar uses. Cant remember what its called but its the most widely adopted. Believe it was first used by Apple - Heres a …

Member Avatar for digital-ether
0
86
Member Avatar for went1180

The url: getdata.php?id=1 works just like a regular url on any php page, only difference with images the content type returned to the client/browser. What php does is parse the URL sent to it via HTTP, in this case [B]getdata.php?id=1[/B]. If the HTTP method is "GET" as is the case, …

Member Avatar for went1180
0
162
Member Avatar for topgas

[QUOTE=topgas;277812]HI im new to php nuke can anybody telll me how i can create many threads and chanee colour o web[/QUOTE] Hi, It is quite hard to understand what you want. Perhaps if you explained the problem a bit better someone may be able to help. As far as I …

Member Avatar for topgas
0
80
Member Avatar for Mitch1979

A parse error usually means that you used the wrong syntax in your code, or typed something wrong.. In your case you forgot the ; after include_once('includes/header_footer.php') It should be: [php] include_once('includes/header_footer.php'); [/php] On line 28. PHP will give you the number where the parsing of failed. This usually isn't …

Member Avatar for digital-ether
0
82
Member Avatar for daletonge

Whats the <tr> <td> doing inside the <?php tags? Is that supposed to be there? try: [php] <?php echo '<tr>'; echo '<td>'; $info_box_contents = array(); ... ?> [/php]

Member Avatar for digital-ether
0
92
Member Avatar for daletonge

Assuming you already have an array, say $rows that represent the data in the table like: $rows = array(0=>array('foo', 'bar'), 1=>array('f o o', 'b a r')); For tables you'll normally want a two dimensional array.. That is: an array holding arrays that represent the rows of the table. When you …

Member Avatar for digital-ether
0
79
Member Avatar for boo_lolly

For example: If you create a submit form field for the "view all" function. Then say name it "view_all". <input type="submit" name="view_all" value="View All" /> Then when someone submits the form with the "view all" button instead of the regular "search" button, you'll get an HTTP_VAR with the index "view_all" …

Member Avatar for digital-ether
0
71
Member Avatar for MDGM

[QUOTE=MaxMumford;276558]Hi all, I need to have a semi transparent picture hovering over a windows media player plugin video. How do i do this? Html preferably... Thanks, Max[/QUOTE] Heres an example of how you will achieve this... [HTML]<!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> <meta http-equiv="Content-Type" content="text/html; …

Member Avatar for MDGM
0
116

The End.