## martin5211 37

By general, I insert only the name of an image. I save the images in a folder.

Anyway, sure that you can do so. There are some tutorials talking about that. You will have to do output buffering to display the mime content stored in the mysql record with header function or ob_start (depending if the headers are already sent).

Look at the [URL="http://www.onlamp.com/pub/a/onlamp/2002/05/09/webdb2.html"]ONLamp[/URL] tutorial.

## martin5211 37

The most important thing it's the array concept, if you learn to manipulate arrays, you will be able to put almost any data or given result. I like very much [URL="http://www.devshed.com/"]devshed.com[/URL], [URL="http://www.phpbuilder.com/"]phpbuilder.com[/URL] and [URL="http://www.phpit.net/"]phpit.net[/URL], very good articles about everything.

## martin5211 37

This is the last corrected version, tested the results with Mathematica from Wolfram Research. The first version is like unkempt - very ugly.

First, if you have to deal with an algorithm, build one, you will have to separate the business logic (like functions to do math operations in this occasion) from the user interface. We have two problems. I recommend start with the business logic always.

We use variables or arrays to contain the values. Both are the same, array can be defined as a variable conjunct, each one with an index to make more easy the location. I'm using the symbol equal to assign the result of the operation (with variables) to unique array index, separating the terms.

Given the parameters by the function, I use conditions to define an action in accordance with an event. In this case, we know that I can't apply the same formula with any given value.

In the square function of a number, I'm using a controlled loop to make a repetitive task of multiply a parameter by itself given the number of times by another parameter too (in this case, parameter can be omitted, have a default value, two times).

I don't know how to put simpler, but in almost every language you can do math operations easily like with a calculator. The problem growth when you don't have built-in functions in the language to make operations, you have the possibility to use more specialized libraries and collection of objects from ...

## martin5211 37

This is the last corrected version, tested the results with Mathematica from Wolfram Research.

## martin5211 37

I love PHP, now it's time to take a large breath before submerge myself in Java struts/spring. I like more open platforms and code with long long life and not much microsoft.

## martin5211 37

why not c# acting as cgi? I appreciate a tool that works and deal with really ugly code, a perfect one :)

## martin5211 37

Pseudo language reminds me to learn another language :) The code have some errors, like the absence of the square root and another condition to put: (sqr(b) - (4ac)) have negative value (nan if I do the square root). Basically, there three functions, one to calculate the square because I haven't a built-in function in PHP to do this, and two functions with the same resemblance to calculate with the quadratic formula ((-b ± sqrt( sqr(b) - (4ac) )) / (2a)).

I use parenthesis to make the order of precedence of the operations and yes, the logic will be more complex dealing with complex numbers.
Each function return the values in a array. An array is a container of data. So, in this way, I can save the two terms of the imaginary result and display then.

The part below the functions there are to display the results. First, to get the parameters sended by the form and store in variables. Then, execute the functions with the parameters obtained. Now then, a condition to show imaginary or real results and finally, the form to input the data. I'm assigning strings to a variable and concatening another strings, then I show the variable with all strings using HTML code.

I have enclosed the new source code, maybe it is more clear.

## martin5211 37

I would like to see and grasp hot sand, a place like Tunisia.

## martin5211 37

^ you can't kill your soul :)

## martin5211 37

Personally, I don't like very much Dreamweaver 8 because now I have my own style, but I've to admit that in the first two weeks I started to build a social networking site, you don't have to worry very much, and you can focus to learn the most basics things: array manipulation, iterate arrays to display content, conditions to show, hide sections of the website and send parameters by url in forms.

PHP.net is a great resource, almost all examples are very easy, you can copy&paste and see the results, then modify it and apply your idea. For example, the foreach example to read an array and the subsequent examples to deal with multidimensional arrays (arrays like excel spreadsheets). The foundations of PHP are very basic, you have to learn not to see all like very complex.

phpDesigner is more cheaper and lighter than Dreamweaver, it have a great potential but have confussing behaviors: automated hiding of php or html code, and the instantaneous bug reporter, both very annoying for beginners.

## martin5211 37

yes, it's true, but you can use a condition like this to deal with compatibility issues:

[code=php]
<? if (isset(\$_SERVER['HTTP_USER_AGENT']) && (strpos(\$_SERVER['HTTP_USER_AGENT'], 'MSIE') == true)) { ?>
[/code]

I'm using z-index and I haven't see strange issues [URL="http://agec.ath.cx/lead"]http://agec.ath.cx/lead[/URL] maybe you could see a solution there

Web developer toolbar in firefox is a great tool to see CSS properties and change values on the fly.

## martin5211 37

SQL Server Express is "free", free in the meaning that you can download, install, test, personal use without the need to buy that rights. The copyright remain as Microsoft property, so you will need to accept a license agreement before installing because you cannot be able to sell a copy, make commercial software with this application, and another legal issues.

## martin5211 37

You could use for example z-index: -10; lower numbers will put an object in the background.

## martin5211 37

This is a source code example to calculate that expression with any value, you can test it at [URL="http://agec.ath.cx/eq"]http://agec.ath.cx/eq[/URL], two functions to calculate each ± result, and one condition to put the two values (the real one and the imaginary) in the imaginary case (b < 4ac), tomorrow I'll inspect the code for errors and I'll add the graph.

[code=php]
<?php

/**

• @author Martin Caminoa
*/

function eq_plus(\$a, \$b, \$c){
\$value=array();

``````if (\$b < (4*a*c)){

\$value[0] = (-1*-\$b) / (2*\$a);
\$value[1] = ((sqr(\$b + (4*\$a*\$c))) / (2*\$a));
}
else
{
\$value[0] = ((-\$b + sqr(\$b - (4*\$a*\$c))) / (2*\$a));
}

return \$value;``````

}

function eq_minus(\$a, \$b, \$c){
\$value=array();

``````if (\$b < (4*a*c)){

\$value[0] = ((-1*-\$b) / (2*\$a));
\$value[1] = ((sqr(\$b - (4*\$a*\$c))) / (2*\$a));
}
else
{
\$value[0] = ((-\$b - sqr(\$b - (4*\$a*\$c))) / (2*\$a));
}

return \$value;``````

}

// get the square of a number
function sqr(\$value, \$power = 2){ // \$power = 2 default value

``````for(\$i = 1; \$i < \$power; \$i++){
\$value = \$value * \$value;
}
return \$value;``````

}

\$a=\$_GET['a'];
\$b=\$_GET['b'];
\$c=\$_GET['c'];

// display results
if(\$b < (4ac)){
echo "Results in imaginary numbers
";
\$result = eq_plus(\$a,\$b,\$c);
echo "+ = ". number_format(\$result[0], 2);
echo " i". number_format(\$result[1], 2) ."
";
\$result = eq_minus(\$a,\$b,\$c);
echo "- = ". number_format(\$result[0], 2);
echo " i". number_format(\$result[1], 2) ."

";
}

if(\$b > (4ac)){
echo "Results in real numbers
";
\$result = eq_plus(\$a, \$b, \$c);
echo "+ = ". number_format(\$result[0], 2) ."
";
\$result ...

## martin5211 37

why not to add the files using "Send to" option on contextual menu (right button), then you could access to your dvd from "My PC" then click on "Write these files to CD"... There are not many clicks

## martin5211 37

It isn't simple as you see it. You could reuse your database of your windows app (access, mssql maybe if exists) and display, modify the data through web but you will need a web developer.

If you want to see your desktop from web you could use a VNC server (has a java plugin), and forward the necessary ports from your router to your computer. And setup a dynamic dns redirector (Dyndns maybe). A technician can do so. In this way, you could access the app from web but not like a website.

## martin5211 37

yes, right logic. Also you can add a field in Users table to add friends separated by comma, you could use then explode function to separate the array and find again each user to find correlations. I think your solution is the best choice.

## martin5211 37

\$form = "";
\$form .= htmlspecialchars(Town)." ";
\$form .= "<input type=text name=Town maxlength=30 value=\"". str_replace('"', """, trim(\$row['Town'])) ."\">";

echo \$form;

Always use escaping \ when you use quotations inside another quotations, you could separate and concatenate items to deal then more clearly.

## martin5211 37

appart from sessions, you could use hash or random ids to reassert an identity coming from one computer

## martin5211 37

maybe you would like a tool like acronis director to resize partitions without losing data... there another open source tools but I'm not tested yet

## martin5211 37

You can look self-paced the PHP tutorial from w3schools (PHP is the most easier language) and then you can look feedback and contact form tutorials from Google to get a general idea.
Start using Dreamweaver 8, you can do DB queries easily and another stuff automatically. If you want to set programming as your primarly goal start learning PHP and OOP, use the ezsql class to create DB queries for example.
PHP are very documented, you could find more tutorials than another language.