ShawnCplus 456 Code Monkey Team Colleague

Well it could be because the "BACKGROUND" attribute hasn't been used in about 10 years.

<style type="text/css">
  background-image:url('<?php echo $xyzimage ?>');
</style>
ShawnCplus 456 Code Monkey Team Colleague

You need the ; for the htmlentity to be parsed so it's.

echo "&deg;";
ShawnCplus 456 Code Monkey Team Colleague

It's called a switch statement.

switch($value) {
  case 1:
    do something;
    break;
  case 2:
    do something;
    break;
  default:
    do something if the others aren't true;
    break;
}

Though there is also the much more hacky way of

if(in_array($value, array(1, 2, 3, 4, 5)) {
  do something;
}
ShawnCplus 456 Code Monkey Team Colleague

Well you can't really do array_unique on mysql_fetch_array since it actually acts as an iterator for the MYSQL Resource that is returned by mysql query.
The correct way to fix it would be to fix your database to have unique keys so you don't have duplicates.
The hacky way to fix it would be to choose a field like title and add the title to another array as you iterate through the list. and don't output if it already exists in the array.

$entries = array();
while($data = mysql_fetch_array($query)) {
  $entries[]=$data['title'];
  if(!in_array($data['title'], $entries)) {
    // Your code here
  }
}
ShawnCplus 456 Code Monkey Team Colleague

mysql_query returns an object, not a string. you have to use mysql_fetch_array or mysql_fetch_assoc to turn the resulting resource set into an array.
http://us.php.net/mysql_fetch_assoc

ShawnCplus 456 Code Monkey Team Colleague

Aside from what they've said about validation just remove the quotes around the variable. Variables inside '' aren't parsed out so you won't get anything but that string. Either use "" or none at all when only echoing a variable.

Kavitha Butchi commented: thnx fr the valuable info +1
ShawnCplus 456 Code Monkey Team Colleague

If you're thinking large scale you might want to start thinking about an ORM to handle your object model and connections. Doctrine, Propel and Creole are 3 of the bigger ORMs in PHP.

ShawnCplus 456 Code Monkey Team Colleague

*cough* You definitely just bumped a 3+ year old thread along with ignoring code tags. Aside from that A) What is the error, saying "I have an error" is the equivalent of a Check Engine light.

ShawnCplus 456 Code Monkey Team Colleague

PHP has no built-in functionality for threading. You can fake it by using shell calls to fork php processes but that is a far cry from multithreading.

ShawnCplus 456 Code Monkey Team Colleague

Yeah... mailto doesn't work that way. Take a quick search on google or Daniweb(there are plenty of them) on email scripts.

ShawnCplus 456 Code Monkey Team Colleague

You image attachment didn't work. Just copy and paste the code, there is no reason to use images

ShawnCplus 456 Code Monkey Team Colleague

In PHP if it says there is an unexpected T_<something> on a line the error is usually in the lines ABOVE that line, not ON the line so.

ShawnCplus 456 Code Monkey Team Colleague

I heard that AJAX is good!... I dont understand it well. I need to learn it in two months. I am not sure if it is possible. The project is running out of time!.

AJAX isn't a programming language or a platform, it's a methodology.

ShawnCplus 456 Code Monkey Team Colleague

Well there are better ways around protecting your code such as licensing and NDAs that allow developers to work on your code and still have it be yours.

ShawnCplus 456 Code Monkey Team Colleague

Well for starters you wont be able to have a cohesive, trusting set of developers by hiding your code from them. It will make the code less compatible than it could be. Modularity is good to a point, then all it does is serve to obfuscate code, frustrate developers and make debugging more difficult. I would wholly recommend against that methodology. Is there a particular reason you don't want them to see your code?

ShawnCplus 456 Code Monkey Team Colleague

My experience tells me that php is used mostly for small and medium size projects, huge projects are written on other environment.

3 "words": Facebook, Yahoo, and a little one called Wikipedia (MediaWiki)

ShawnCplus 456 Code Monkey Team Colleague

Built-in function for php http://php.net/wordwrap

PomonaGrange commented: Very Helpful, Thanks +1
ShawnCplus 456 Code Monkey Team Colleague

I read the URL you provided and especially the user contributed notes that followed. It appears to me that the folks that designed the process control portion of PHP (pcntl) were rank amateurs with little real world experience.

Using pcntl_exec after forking really misses the mark. It has no way to pass anything back to the parent, not even a return code. :(

Excellent, then write your own extension to PHP to implement process control the way it should be handled. It's open source, don't complain unless you have something meaningful to contribute as a retort.

ShawnCplus 456 Code Monkey Team Colleague

So you want a copy of WebToMail?

ShawnCplus 456 Code Monkey Team Colleague

The only current way to do anything of that sort is on execution of a child process with http://us.php.net/manual/en/function.pcntl-exec.php

ShawnCplus 456 Code Monkey Team Colleague

Of course not. If I knew how to pass info from one process to another, I would not have asked the question!

The reason to post code was to clarify your question. It was incredibly vague. In what context are you passing information between processes?

ShawnCplus 456 Code Monkey Team Colleague

Might want to head over to the Javascript section to have that one answered.

ShawnCplus 456 Code Monkey Team Colleague

Actually that code does nothing. It should be

<?php echo $_POST['txt'] ?>

Anyway, the reason that it would have been in there is if there was validation happening on that page then the forms would be repopulated so a user would not have to re-type.

ShawnCplus 456 Code Monkey Team Colleague

The filename does not specify a path to save the file, only the name of the file to be downloaded. You can't force a user to save a file in a particular place.

ShawnCplus 456 Code Monkey Team Colleague

Personally, I use Symfony and it is without a doubt the most well documented piece of software I've ever developed for/in. I can't speak for the other frameworks but Cake and Code Igniter have followings. The Zend Framework is supported by Zend ( the people behind the Zend Engine that drives PHP ). If you do decide to create your own I would advise you to develop it in a stable, isolated environment during development, MVCs are pretty complex so my hat is off to you as a first whack at OOP.
Good Luck. Maybe start a Daniweb blog to keep us updated :)

ShawnCplus 456 Code Monkey Team Colleague

There are many MVCs around so first off I'd suggest you take a look at those since they've had years of development and large teams behind them (Zend Framework, Code Igniter, Symfony, Cake, etc.) Though, obviously, the large, more feature-rich the framework the slower it will be (ie., Code Igniter is faster than Symfony but not as feature-rich)

ShawnCplus 456 Code Monkey Team Colleague

Firsly, use code tags. Secondly this is what you need to change

for ($i = 1; $i <= $num_pages; $i++) {
  if ($i != $option_page) {
    echo "<a href='qualify_search.php?option_page=$i&property_type=$_REQUEST[property_type]&region_id=$_REQUEST[region_id]&country_id=$_REQUEST[country_id]&state_id=$_REQUEST[state_id]&minprice=$_REQUEST[minprice]&maxprice=$_REQUEST[maxprice]' class='smalltext'> $i</a> | ";
  } else {
    echo '<b><font color=#0C0C7E>' . $i . '</font></b> | ';
  }
}

The loop needs to be changed to do something along the lines of

$start = $option_page - 5;
$end = $option_page + 5;
for( $i = $start; $i < $end; $i++) {
 <your code here>
}

That will limit it to 10, however, you should add in your own checks to make sure it doesn't go below 0 or past the final page.

ShawnCplus 456 Code Monkey Team Colleague

Where is the code for your loop that is actually printing out the links? It's not in any of the code you've posted.

ShawnCplus 456 Code Monkey Team Colleague

The black stripe is magnetic, as far as I know PHP can't charge magnets. There are however quite a few libraries to create barcodes. Google for a "PHP Barcode class"

ShawnCplus 456 Code Monkey Team Colleague

There seems to be an interesting and undocumented precedence taking place with the concatenation operator. It seems

echo $num . ++$num;

prints out 66. Whereas

echo $num , ++$num;

prints out 56

ShawnCplus 456 Code Monkey Team Colleague

I'm pretty sure emsg is not a standard attribute for input tags, if emsg is from a Javascript library you might want to look into that as the culprit. The input field itself has no properties other than that emsg field that could cause anything to "reset"

ShawnCplus 456 Code Monkey Team Colleague

What you could do is modify the onsubmit property of the form to send an AJAX request to validate the CAPTCHA, if that validates then return true(submit the form), or return false(cancels the submit)

ShawnCplus 456 Code Monkey Team Colleague

If you are on a shared provider and don't have access to the server's php.ini file you can use the http://us2.php.net/iniset function to manipulate settings at runtime

ShawnCplus 456 Code Monkey Team Colleague

No but you can do it the other way around. www.php.net/Java

ShawnCplus 456 Code Monkey Team Colleague

Just in case you hadn't fixed it yet, (\d{2}\-){2}\d{4} is the correct regular expression. for 12-34-5678 format. To correctly write a regular expression you have to know exactly what your input must look like. If you post what you want in your fields it would be easier.

jackakos commented: good +1
ShawnCplus 456 Code Monkey Team Colleague

Firstly, you don't need window.confirm , confirm works just fine. Secondly, you're missing the ending ) on the first if-check.

ShawnCplus 456 Code Monkey Team Colleague

In the app directory app/<app>/config/settings.yml there is a configuration for login_module and login_action. Modify the action to redirect the user to the other site.

ShawnCplus 456 Code Monkey Team Colleague

Symfony redirects are done with $action->forward('module', 'action'); OR $action->redirect('<route>'); . I'm not exactly sure what you're trying to accomplish.

ShawnCplus 456 Code Monkey Team Colleague

What do you want the variable $value to be because right now its nothing, all you would get would be

<a href="=1">Data: 1</a> ...
ShawnCplus 456 Code Monkey Team Colleague
$_SESSION['cart'][] = array('team'=> $teamID,'tournament'=>$tournyID,'gatefee'=>$gatefee,'cost' => $cost);

Note the code tags!

ShawnCplus 456 Code Monkey Team Colleague

Quick solution, use reCAPTCHA

ShawnCplus 456 Code Monkey Team Colleague
ShawnCplus 456 Code Monkey Team Colleague

Well to clarify a bit, both of those languages have the capability of being used as web development languages but neither were made specifically for that purpose. .NET itself is a framework, ASP.NET is the web language in the framework.

ShawnCplus 456 Code Monkey Team Colleague

There are really only two ways until the CSS3 @fontface proposal makes it's way through. One is to pass it through a server-side language which will make an image to replace the text, the other is sIFR which uses Javascript and Flash to replace text

ShawnCplus 456 Code Monkey Team Colleague

There aren't any Javascript animation studios because there are so many quirks between the different browsers they'd be doing N times more work, where N is the number of current browsers. Believe it or not people still use IE5.5 and if you're going to do business you have to support those people whether you like it or not.
To answer your second question, it's both Javascript and CSS and HTML and pretty much everything else that is rendered in the browser is rendered differently unless they use the same rendering engine (Chrome uses Webkit)

ShawnCplus 456 Code Monkey Team Colleague

If you have no programming experience why does your final project, most likely the purpose of which is to show off accumulated knowledge, involve programming?

ShawnCplus 456 Code Monkey Team Colleague

You don't have the close brace } on the function

ShawnCplus 456 Code Monkey Team Colleague

My biggest recommendation would be to use a prebuilt syntax highlighter and just add a syntax extension. GeSHi is one my my favorites.

ShawnCplus 456 Code Monkey Team Colleague

well for one thing that is javascript and you have it wrapped in PHP tags

ShawnCplus 456 Code Monkey Team Colleague

Why are you creating the query with $q but then using $campaign? A doctrine update should look like

Doctrine_Query::create()->update('Table')->set('field','bound_value')->where('id = ?',$bound_id)->execute()