Forum: PHP Apr 18th, 2009 |
| Replies: 11 Views: 827 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: 11 Views: 827 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: 827 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 15th, 2009 |
| Replies: 11 Views: 827 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 14th, 2009 |
| Replies: 11 Views: 827 Could you show me the error displayed? I can't find a syntax error in your code... the error seems to be located on the course year selection, subjects drop down appears to be filtered ok. |
Forum: PHP Apr 14th, 2009 |
| Replies: 4 Views: 637 I'm looking at your code, the method used in your form and mysql variables is ok, but into the form code, the survey code is commented into <!-- ... --> tags, remove it.
Add value="<?php echo... |
Forum: PHP Apr 14th, 2009 |
| Replies: 4 Views: 637 Try $_GET instead of $_POST to get parameters every time you use URL method.
Also, try to remove the single quotes on the SQL query. Use it on the array index.
$sql= sprintf("INSERT INTO... |
Forum: PHP Apr 14th, 2009 |
| Replies: 3 Views: 545 I wrote a solution on your previous thread (http://www.daniweb.com/forums/thread186448.html)... this is almost a duplicated one. Why not to continue to develop your issue into your previous thread ? |
Forum: PHP Apr 13th, 2009 |
| Replies: 1 Views: 1,137 Hi,
I'm returning to this forum from long time ago... Looking at this issue it isn't difficult at all... just dealing a bit with regular expressions, preg_match_all() should be the function that... |
Forum: PHP Dec 7th, 2008 |
| Replies: 5 Views: 625 I'm using the php executable from Terminal to load the php-gtk code (located in /usr/local/php-gtk in my Mac OS 10.5 after installing this DMG (http://www.kix.in/php-gtk2/PHP-GTK-2.0.0.dmg) package).... |
Forum: PHP Dec 6th, 2008 |
| Replies: 5 Views: 625 I've fixed your code:
<?php
if (!class_exists('gtk')) {
die("Please load the php-gtk2 module in your php.ini\r\n");
}
function pressed() |
Forum: PHP Dec 4th, 2008 |
| Replies: 5 Views: 1,497 There is a little mistake, on your code you're using a comparing operator (double equal signs) instead of assignation (one equal sign). Try with this example:
<?php
$a = 20;
$a = $a +... |
Forum: PHP Dec 4th, 2008 |
| Replies: 5 Views: 1,497 I don't undertand the meaning of your question... Why not to use an incrementing/decrementing operators (e.g. $updown--) or assignment operator. The values inside the braces doesn't contain an... |
Forum: PHP Nov 10th, 2008 |
| Replies: 9 Views: 1,028 PHP.net the best reference :-)
Regards |
Forum: PHP Jul 23rd, 2008 |
| Replies: 4 Views: 1,057 I've added the source at code snippets, using HTML message format at this time. |
Forum: PHP Jul 23rd, 2008 |
| Replies: 4 Views: 1,057 To generate a PDF into PHP, there are two techniques: PDFLib or FPDF. PDFLib has some restrictions on licencing (commercial applications), I encourage to use FPDF because is free and Open Source,... |
Forum: PHP Jul 21st, 2008 |
| Replies: 1 Views: 511 To show the origin country, a general way is to lookup into a MySQL database with updated IP country ranges, GeoLite Free is a choice. Some commercial databases provide location even into cities.... |
Forum: PHP Dec 6th, 2007 |
| Replies: 15 Views: 2,097 There is some little mistakes, like missing type on id_client field, a UNIX timestamp normally takes ten positions and lunch_time have one space inside (table names can't have any space). I recommend... |
Forum: PHP Dec 5th, 2007 |
| Replies: 15 Views: 2,097 UNIQUE and KEY id_2 isn't necessary, let alone primary key (id), indexes are meant to use a basic field for lookups, you could use more fields like fname and lname to perform special full-text... |
Forum: PHP Dec 5th, 2007 |
| Replies: 15 Views: 2,097 For clients I recommend to start with id, fname (first name), lname, username, email
For journal, id, id_client, title, body, date
You could use text type for any field except id (I suggest... |
Forum: PHP Dec 5th, 2007 |
| Replies: 15 Views: 2,097 I recommend every-time as possible the guideline use mentioned by digital-ether. I will try to make a more deep review.
Create one table for clients, first field called id_(table name), type Int,... |
Forum: PHP Aug 31st, 2007 |
| Replies: 3 Views: 904 Use WHERE clause to filter occurrences in Mysql results and $_GET or $_POST variables to get url parameters (according to form method). For example, add including the quotes:
WHERE id = '".... |
Forum: JavaScript / DHTML / AJAX Aug 26th, 2007 |
| Replies: 13 Views: 39,125 Another solution is changing z-index on divs, with z-index you could locate an image over another and build a custom header layout too. Higher values put the image on the top.
This is the trick:
... |
Forum: JavaScript / DHTML / AJAX Aug 26th, 2007 |
| Replies: 13 Views: 39,125 Suggestions (maybe one will be enough)
- <div> with more width
- getElementById(id).height with lower value in the condition
- <div> with auto margins or without width property in CSS. |
Forum: JavaScript / DHTML / AJAX Aug 26th, 2007 |
| Replies: 13 Views: 39,125 You can pass the image id as parameter in functions:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html... |
Forum: PHP Aug 26th, 2007 |
| Replies: 3 Views: 699 And another method, I've created a mini function:
function big_num() {
for ($i = 1; $i <= rand(60,80); $i++) {
$a .= rand(1, 32768);
}
return $a; |
Forum: PHP Aug 26th, 2007 |
| Replies: 3 Views: 699 I don't know if it possible, because there are a limit in rand() (http://ar.php.net/manual/en/function.rand.php) and the processor, but if you really want only large numbers you could concatenate... |
Forum: PHP Aug 23rd, 2007 |
| Replies: 2 Views: 619 $form = "<td class=hr>";
$form .= htmlspecialchars(Town)." </td>";
$form .= "<td class=dr><input type=text name=Town maxlength=30 value=\"". str_replace('"', """, trim($row['Town']))... |