Search Results

Showing results 1 to 40 of 108
Search took 0.01 seconds.
Search: Posts Made By: martin5211 ; Forum: PHP and child forums
Forum: PHP Sep 1st, 2009
Replies: 1
Views: 308
Posted By martin5211
The jQuery questions should be made on JavaScript / DHTML / AJAX forum.

From Drupal perspective, some jQuery plugins could not work with the jQuery bundle included on Drupal core (the jQuery...
Forum: PHP Apr 20th, 2009
Replies: 1
Views: 1,268
Posted By martin5211
Use CURL or fsockopen() to get the result from Google, then simplexml_load_string()


$zip = 10001;
$url = "http://news.google.com/news?pz=1&ned=us&hl=en&q=".$zip."&output=rss";

$ch =...
Forum: PHP Apr 20th, 2009
Replies: 2
Views: 609
Posted By martin5211
Do you have activated the permissions for create and edit content types on User Management / Access Control ?

Take a look if is enabled all CCK field types in modules.
Forum: PHP Apr 19th, 2009
Replies: 21
Views: 1,210
Posted By martin5211
I'm using mainly one check... subtracting 18 years to 2009 would be 1991, so any user should have a born date below 1991 to access www.example.com. That conditional isn't dynamic, to adjust the code...
Forum: PHP Apr 19th, 2009
Replies: 21
Views: 1,210
Posted By martin5211
<?php

$msg = null;

if ((is_numeric($_POST['month']) && !empty($_POST['month'])) &&
(is_numeric($_POST['day']) && !empty($_POST['day'])) &&
(is_numeric($_POST['year']) &&...
Forum: PHP Apr 19th, 2009
Replies: 21
Views: 1,210
Posted By martin5211
That is not intended for a 'perfect' system, it's only a disclaimer. If you want to bypass it, it's your problem, you're violating the law. Look the little legend on every drug, that doesn't avoid to...
Forum: PHP Apr 19th, 2009
Replies: 21
Views: 1,210
Posted By martin5211
I agree with you, it is not pretty but several sites use this method of control with drop down lists and even input fields. I think more for legal purposes.
Forum: PHP Apr 19th, 2009
Replies: 21
Views: 1,210
Posted By martin5211
That's doable with simple conditionals. The most important field is year. We assume if is not > 1991 or 91. You wan to check boundaries, also use strtotime('-18 years')
Forum: PHP Apr 19th, 2009
Replies: 21
Views: 1,210
Posted By martin5211
Look at the *third* code example:

http://www.lotsofcode.com/php/validation.htm

is_numeric() is a common form to avoid characters from alphabet on age field.
Forum: PHP Apr 19th, 2009
Replies: 14
Views: 15,903
Posted By martin5211
If the page only shows the code that's because the PHP interpreter isn't running. Look at your httpd.conf (Apache configuration file) and look if the line that says 'LoadModule php5_module' isn't...
Forum: PHP Apr 19th, 2009
Replies: 6
Views: 755
Posted By martin5211
That's correct. There is better methods to show the code in a more readable way e.g. using sprintf() like in PHP.net mysql_real_escape_string() reference, curly braces on variables, doing escaping...
Forum: PHP Apr 19th, 2009
Replies: 6
Views: 755
Posted By martin5211
Strings, values (except numeric) in SQL must be enclosed into quotes. Quotes delimit the string content, avoiding being confused by the interpreter, due to a string can contain spaces and...
Forum: PHP Apr 18th, 2009
Replies: 6
Views: 755
Posted By martin5211
Enclose strings between quotes:


$query = "SELECT * FROM $table WHERE Username='".$user."' AND Password='".$pass."'";
Forum: PHP Apr 18th, 2009
Replies: 11
Views: 832
Posted By martin5211
Paste the code at end, outside from the last conditional that checks $progyear variable.

Test the MySQL query directly from phpMyAdmin 'SQL' sheet if returns any result from your tables... I'm...
Forum: PHP Apr 17th, 2009
Replies: 5
Views: 860
Posted By martin5211
I think you cannot use Javascript to access local files by default, that would be the law of the jungle, a giant security hole... easy to spoof or block client domains, phishing and browser hijacking...
Forum: PHP Apr 17th, 2009
Replies: 11
Views: 832
Posted By martin5211
Use a SELECT...JOIN query to get results from related tables e.g.


SELECT * FROM courseyeartable JOIN elements ON (yearid = exampapers) WHERE courseid = $programme


I have seen an error in...
Forum: PHP Apr 17th, 2009
Replies: 11
Views: 832
Posted By martin5211
Misticles, please try to make a more precision or give more details what do you want to perform. I mean, the code is working right, I can't see what is your real issue.

You're performing only two...
Forum: PHP Apr 17th, 2009
Replies: 3
Views: 577
Posted By martin5211
It will work with minimal changes, if your table comply with the structure mentioned previously. Modify 'customers' table name using your own. Make a DB connection too if doesn't exist. If you do...
Forum: PHP Apr 16th, 2009
Replies: 3
Views: 577
Posted By martin5211
Basically, you can do:


$query = "SHOW COLUMNS FROM customer";

$result = mysql_query($query) or die(mysql_error());

while ($row = mysql_fetch_array($result)) {
$fieldnames[] = $row[0];...
Forum: PHP Apr 16th, 2009
Replies: 11
Views: 1,459
Posted By martin5211
What does fulfil <b></b> tags into <a href="..." code ?


$Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '<a href="javascript<b></b>:go(\'${1}\')">${1}</a>', $Text);

$Text =...
Forum: PHP Apr 16th, 2009
Replies: 5
Views: 422
Posted By martin5211
Who is underestimating? I agree with ShawnCplus. There is no way that we can understand him if he wants to formulate a question in such imprecise way. My concern, this is not a question related to...
Forum: PHP Apr 15th, 2009
Replies: 11
Views: 1,744
Posted By martin5211
I was talking about MySQL DATETIME and DATE field, there is a MySQL function to convert directly to UNIX timestamp:
...
Forum: PHP Apr 15th, 2009
Replies: 11
Views: 832
Posted By martin5211
I can't replicate your issue without the structure of your tables.

I'm testing your code here, seems to be working right with these tables


SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

DROP...
Forum: PHP Apr 15th, 2009
Replies: 11
Views: 1,744
Posted By martin5211
If that is a DATETIME field type, you can use UNIX_TIMESTAMP() like this SELECT UNIX_TIMESTAMP(`date`) FROM `my_table` then use date() to show it correctly
Forum: PHP Apr 15th, 2009
Replies: 11
Views: 1,459
Posted By martin5211
//$Text = "http://www.google.com/";
$Text = "fdsfd_shttp:// (http://www.google.com/)";

$Text = preg_replace("/\[url\]([a-z\:\/\.]*)\[\/url\]/",
'<a...
Forum: PHP Apr 15th, 2009
Replies: 5
Views: 422
Posted By martin5211
Is that a question ? :)

Most simple mail() tutorial

http://email.about.com/cs/phpemailtips/qt/et031202.htm
Forum: PHP Apr 15th, 2009
Replies: 10
Views: 877
Posted By martin5211
When a blank page happens, you can do simply on the action page


echo '<pre>'; print_r($_POST);


to see what variables are being passed
Forum: PHP Apr 15th, 2009
Replies: 10
Views: 877
Posted By martin5211
The site passes validation test (http://validator.w3.org/) ?

Common situations with blank pages is due to a syntax error, and error reporting isn't enabled, cache fault... Try to use print_r or...
Forum: PHP Apr 15th, 2009
Replies: 10
Views: 877
Posted By martin5211
The loop is before the mysql query... try to put backward


<?php
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 =...
Forum: PHP Apr 15th, 2009
Replies: 27
Views: 1,145
Posted By martin5211
If you were a beginner programmer, you will prefer to learn PHP or how to use Eclipse/Aptana with quasi-uncountable functionalities?

Netbean has a lot of controls and issues, preferable for Java...
Forum: PHP Apr 15th, 2009
Replies: 27
Views: 1,145
Posted By martin5211
This is a popular subject, ask Google, you will see hundred of thousand threads like this, and that isn't a issue at all like fashion does. I am not trying fall low on such topic, only exposing why...
Forum: PHP Apr 15th, 2009
Replies: 27
Views: 1,145
Posted By martin5211
Ask to work from a Mac at EDS or Microsoft :) Fortunately, I haven't passed for that yet. Microsoft have very well discriminated their 'Apple' team. But similar cases succeed often on small...
Forum: PHP Apr 15th, 2009
Replies: 27
Views: 1,145
Posted By martin5211
Some companies will let you use your platform or IDE of your choice, other doesn't. Some software factories in Argentina aren't well equipped or better than India or Pakistan ones. Old computers...
Forum: PHP Apr 15th, 2009
Replies: 27
Views: 1,145
Posted By martin5211
The thing is... the choice of an IDE is a very personal subject, maybe you like some features that other IDE doesn't have, there isn't anyone perfect and preferences will vary for example if you work...
Forum: PHP Apr 15th, 2009
Replies: 27
Views: 1,145
Posted By martin5211
A hammer is a hammer, maybe you want one lightweight, ergonomic, rubber handle with micropore, it's the same.
Forum: PHP Apr 15th, 2009
Replies: 27
Views: 1,145
Posted By martin5211
I visited some clients on-site and the only resource was only notepad. Notepad is installed on every computer, works every time, some quick changes on the code and done! Notepad is faithful.
Forum: PHP Apr 15th, 2009
Replies: 3
Views: 899
Posted By martin5211
If it is only an image URL, you can simply concatenate into an <img> tag after using the mysql query e.g. echo "<img src=\"". $row['image_url'] ."\" alt=\"\" />";


<?php
$query = "SELECT...
Forum: PHP Apr 15th, 2009
Replies: 3
Views: 551
Posted By martin5211
No problem, I could have continued the development anyway... regex for scrapping data and manipulating arrays can be a pain sometimes...
Forum: PHP Apr 15th, 2009
Replies: 5
Views: 860
Posted By martin5211
Anyway, would we good to know why you want to access a host file. If you want to block some domains you can do it directly from .htaccess files.
Forum: PHP Apr 15th, 2009
Replies: 5
Views: 860
Posted By martin5211
Hosts configuration file have global scope -address translation for any user- and it is stored on one location e.g. /etc/hosts, for that reason you cannot create individual configuration files. For...
Showing results 1 to 40 of 108

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC