cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Then in that case the example I prevously posted will do the job but you will need to tell php what to place on the end of the link. Below are several more examples which will link to the same page but with an additional url parameter:

$page=basename($_SERVER['REQUEST_URI']);
$page.='&id=6438';
echo '<a href="'.$page.'">test</a>';
$page=basename($_SERVER['REQUEST_URI']);
$page.='&status=online';
echo '<a href="'.$page.'">test</a>';

And below will allow you to send the user to a different php file with the current url parameters:

$page=explode('?',basename($_SERVER['REQUEST_URI']));
$page=$page[1];
$page='filename.php?'.$page.'&id=6438';
echo '<a href="'.$page.'">test</a>';
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Is this what you mean?

<TEXTAREA NAME="comments3" style='width:50%' rows='4'>
<?php
for ($i =0; $i < $ValuenumtableChildren; $i++)
{
echo '<a href="viewingdetails.php?name='.$Valuechild[$i].'</a>';
}
?>	
</TEXTAREA>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Could you be a bit more clearer on what you want done because the description is a bit patchy. From what I can understand, you have a variable somewhere and you want to append it to the current url. I think the following php script would do that if the variable originated from the php side and not javascript.

$page=basename($_SERVER['REQUEST_URI']);
$page.='&newvar=true';
echo '<a href="'.$page.'">test</a>';
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

What's a search engine bot??

Have you wondered how google has ever collected all those search results. They don't have a human emailing every website owner asking for links and descriptions. Instead they have what's called a 'search engine bot' that scans the web for information which is then reported to the server for sorting and storing. And that is where 'search engine optimisation' comes in which is one of the basics of web design. Below is an example of a php site security tester bot that I made in my spare time.

<?
set_time_limit(0);
function domain($domainb) {
	$bits = explode('/', $domainb);
	if ($bits[0]=='http:' || $bits[0]=='https:')
		{
		return $bits[0].'//'.$bits[2].'/';
		} else {
		return 'http://'.$bits[0].'/';
		}
	unset($bits);
	}
if (isset($_GET['site'])) {
    echo '<head><title>Testing site security - '.domain($_GET['site']).'</title></head><body>';
    } else {
    echo '<head><title>PHP Site Security Tester</title></head><body>';
    }
echo '<center><font size=5 face=\'arial black\'><b>PHP Site Security Tester</b></font><br><form method=\'get\' style=\'margin:0px; padding:0px;\'>
<input type=\'text\' name=\'site\' size=64 value="'.$_GET['site'].'"><input type=\'submit\' value=\'Test\'></form></center>';
if (substr_replace($_GET['site'],'',3)=='ftp') {
exit('You may not connect to the ftp protocole');
}
if (!isset($_GET['site'])) { exit(''); }

$_GET['site']=domain($_GET['site']);

function url_exists($durl)
		{
		// Version 4.x supported
		$handle   = curl_init($durl);
		if (false === $handle)
			{
			return false;
			}
		curl_setopt($handle, CURLOPT_HEADER, true);
		curl_setopt($handle, CURLOPT_FAILONERROR, true);  // this works
		curl_setopt($handle, CURLOPT_HTTPHEADER, Array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15") );
		curl_setopt($handle, CURLOPT_NOBODY, true);
		curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
		$connectable = curl_exec($handle);
		curl_close($handle);  
        if (preg_match('/200 OK/i',substr_replace($connectable,'',30))) {
            return true;
            } else {
            return false;
            }
		}

//below function will only get links within own domain and not links outside the site. …
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Also your function has a big security hole. Try using mysql_real_escape_string() on all mysql input. Below is an example:

function mcheckTime($ip,$a){
$a=mysql_real_escape_string($a);
$ip=mysql_real_escape_string($ip);
$myDb = new myDb;
$myDb->connect();
$sql = "SELECT * FROM cpmip WHERE ip='$ip' and adid='$a'";
$res = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_array($res);
$myDb->close();

$time = time();

if($time >= $row['time']){

$myDb->connect();
$sql1 = "DELETE FROM cpmip WHERE ip='$ip' and adid='$a'";
$res1 = mysql_query($sql1) or die(mysql_error());
$myDb->close();

return true;
}elseif($time < $row['time']){

return false;
}}
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The form needs to surround the outside of the table. Below is a fixed up version:

<?php 
if ($_POST['Submit'] == 'Submit')
{
print_r($_FILES) ;
}
?>
<!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; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript">
function addFileInput() {
var d = document.createElement("div");
var file = document.createElement("input");
file.setAttribute("type", "file");
file.setAttribute("name", "image[]");
//d.appendChild(file);
document.getElementById("moreUploads").appendChild(file); 
}
</script>
</head>

<body>
</body>
<form name="f1" method="post" action="test.php" enctype="multipart/form-data" > 
<table width="95%" border="0" align="center" cellpadding="5" cellspacing="0" class="border_table">
<tr>
<td align="right"><b>File 1 for image Upload</b></td>
<td align="left"><label id="moreUploads"> 
</label>
<div id="moreUploadsLink" ><a href="javascript:addFileInput();">Attach another File</a></div></td>
</tr>

<tr>
<td align="right"><br /></td>
<td align="left">by hitting submit, you agree to the websites terms and conditions</td>
</tr>
<tr>
<td align="right">&nbsp;</td>
<td align="left"><input name="Submit" type="submit" class="buttons" value="Submit" />
<input name="Reset" type="reset" class="buttons" value="Reset" /></td>
</tr>
</table>
</form>
</html>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Hi cwarn

I've never gone further than doing simple select, update and delete requests but if I understand this correctly JOINS join two tables together, so when I do the while loop for the initial JOIN then I nest another MySQL statement looking for the relevant info in order for me to calculate the total amounts?

From what I can understand of that yes that is correct. So basically it just joins the columns of the two tables so there is one big table with lots of columns then the new data joins with the existing table data where those two columns are the same if you get what I mean. So have a play around with it and you'll see what I mean.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

When combining tables to make one big table, you need to have a common column to pair with which in your case appears to be the column named "code". A tutorial can be found at http://www.tizag.com/mysqlTutorial/mysqljoins.php and below is a query example:

SELECT *
FROM fruit, cart
WHERE fruit.code = cart.code
Venom Rush commented: Helped a lot. Thanks ;) +2
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The easiest of all things is a search engine bot. I've made several of them before and are really easy to make with impressive results if you have enough cpu.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

As mentioned in the Faq, the common problem that I use to have was that no results were returned. So try adding the following if statement around the while loop:

$r = mysql_query('SELECT * FROM `table`') or die(mysql_error());
if (mysql_num_rows($r)>0) {
while ($row=mysql_fetch_array($r)) {
    echo $row[0].'<br>';
    }
}

Also make sure you have the or die(mysql_error()); after the mysql query. That usually does the trick even though it has been said that there are other ways to receive the same error. Below is an alternative while loop which I have been told you shouldn't need the if function for.

$r = mysql_query('SELECT * FROM `table`') or die(mysql_error());
while ($row=mysql_fetch_assoc($r)) {
    echo $row['column'].'<br>';
    }

I might see if I can find a way to add to the tutorials and code snippets sections to help people with these common errors.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I received your pm and the only other problem I can see is that you only specified one email address. Below is an example of specifying mutliple email addresses:

<?php

$to= $_POST['to'];
$from=$_POST['from'];
$subject = $_POST['subject'];
$message=$_POST['message'];

// Obtain file upload vars
$fileatt      = $_FILES['fileatt']['tmp_name'];
$fileatt_type = $_FILES['fileatt']['type'];
$fileatt_name = $_FILES['fileatt']['name'];

$headers = "From: $from";

foreach($_FILES['fileatt'] as $file) { 
    if(is_uploaded_file($file['tmp_name'])) { 
  // Read the file to be attached ('rb' = read binary)
  $file = fopen($fileatt,'rb');
  $data = fread($file,filesize($fileatt));
  fclose($file);

  // Generate a boundary string
  $semi_rand = md5(time());
  $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
  
  // Add the headers for a file attachment
  $headers .= "\nMIME-Version: 1.0\n" .
              "Content-Type: multipart/mixed;\n" .
              " boundary=\"{$mime_boundary}\"";

  // Add a multipart boundary above the plain message
  $message = "This is a multi-part message in MIME format.\n\n" .
             "--{$mime_boundary}\n" .
             "Content-Type: text/plain; charset=\"iso-8859-1\"\n" .
             "Content-Transfer-Encoding: 7bit\n\n" .
             $message . "\n\n";

  // Base64 encode the file data
  $data = chunk_split(base64_encode($data));

  // Add file attachment to the message
  $message .= "--{$mime_boundary}\n" .
              "Content-Type: {$fileatt_type};\n" .
              " name=\"{$fileatt_name}\"\n" .
              //"Content-Disposition: attachment;\n" .
              //" filename=\"{$fileatt_name}\"\n" .
              "Content-Transfer-Encoding: base64\n\n" .
              $data . "\n\n" .
              "--{$mime_boundary}--\n";
}

// Send the message
$emails=array($to,
'email@hotmail.com',
'email@gmail.com',
'test@gmail.com',
'another@hotmail.com');
$errors=0;
foreach ($emails AS $email) {
    if (!mail($email, $subject, $message, $headers)) {
    $errors+=1;
    }
}
if (errors==0) {
  echo "<p>All mail sent! Yay PHP!</p>";
} else {
  echo "<p>$errors emails could not be sent. Sorry!</p>";
}
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Update, I have managed to solve it with the following script:

<script>var row="tr0";
function javascripthighlight(var1) {
document.getElementById(row).style.backgroundColor = '#FFFFFF';
document.getElementById(var1).style.backgroundColor = '#FF0000';
row=var1;
}
</script>
<table><tr id="tr0">
<td>column</td>
<td>radio button</td>
</tr><tr id="tr1">
<td>aaa</td>
<td><input type="radio" onclick="javascripthighlight('tr1')"></td>
</tr><tr id="tr2">
<td>bbb</td>
<td><input type="radio" onclick="javascripthighlight('tr2')"></td>
</tr><tr id="tr3">
<td>ccc</td>
<td><input type="radio" onclick="javascripthighlight('tr3')"></td>
</tr></table>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I have managed to come up with the following but will try and improve it for you.

<script>function javascripthighlight(var1) {
document.getElementById(var1).style.backgroundColor = '#FF0000';
}
</script>
<table id='tablee'><tr id="tr0">
<td>column</td>
<td>radio button</td>
</tr><tr id="tr1">
<td>aaa</td>
<td><input type="radio" onclick="javascripthighlight('tr1')"></td>
</tr><tr id="tr2">
<td>bbb</td>
<td><input type="radio" onclick="javascripthighlight('tr2')"></td>
</tr><tr id="tr3">
<td>ccc</td>
<td><input type="radio" onclick="javascripthighlight('tr3')"></td>
</tr></table>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

anything coded can be decoded, given time and incentive, made easier, the php interpreter has to be able to decipher the code

With that being said, I remember reading somewhere in daniwebs about this topic that you get what you pay for. So as you mentioned free ones are more likely to be cracked however, if you pay for a thousand dollar encrypter then not many people will buy the product just so they can find the right algorithm to crack. So point is, generaly the more you pay the more secure it will be.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

gagan how did u solved your session issue?

He may take a while since earlier today he was online and might be night time in his timezone. But since I am familiar with this common problem I will ask for you to run these two test pages in the problem browser(s) to see if they work.

index.php

<? session_start();
$_SESSION['var']='test';
echo '<a href="page2.php?' . SID . '">click here to see if session are enabled.</a>';
?>

page2.php

<? session_start();
if (empty($_SESSION['var']) || !isset($_SESSION['var'])) {
echo '<b>Sessions are not enabled with this method.</b>';
} else {
echo 'Sessions work the $_SESSION[\'var\']='.$_SESSION['var'];
}

Edit: I see gagan is now online so he must spend a wider range of hours online than I thought.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

According to the mysql manual which has no mention of left join, it would be one of the following:

mysql_query( "SELECT c.category_id,c.category_name,photo_filename,COUNT(photo_id)
FROM gallery_category  as c 
WHERE user='$user'
LEFT JOIN gallery_photos as p ON p.photo_category = c.category_id 
GROUP BY c.category_id" );

or

mysql_query( "SELECT c.category_id,c.category_name,photo_filename,COUNT(photo_id)
FROM gallery_category  as c 
LEFT JOIN gallery_photos as p ON p.photo_category = c.category_id 
WHERE user='$user'
GROUP BY c.category_id" );

But when using this in a mysql query don't forget to make the mysql query one long line. Hope one of those examples works for ya.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

After checking line by line I discovered only 1 line with 1 symbol needs adding. In the gap just before the comment // Send the message simple add a second closing bracket to close the foreach loop. That's the biggest bug I can see and below is an example of what needs changing. Let me know if that works.

//"Content-Disposition: attachment;\n" .
//" filename=\"{$fileatt_name}\"\n" .
"Content-Transfer-Encoding: base64\n\n" .
$data . "\n\n" .
"--{$mime_boundary}--\n";
}

} //this was added
// Send the message
$ok = @mail($to, $subject, $message, $headers);
if ($ok) {
echo "<p>Mail sent! Yay PHP!</p>";
} else {
echo "<p>Mail could not be sent. Sorry!</p>";
}
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

hi
you can also call the css file as like this in php....
where no need of echo function for <link> tag

<?php
$link = $_POST['fs'];
?>
<link rel='stylesheet' href='<?=$link?>'>

Thanks

That sometimes causes problems on some servers and would need to be replaced with the following:

<?php
$link = $_POST['fs'];
?>
<link rel='stylesheet' href='<?php echo $link; ?>'>

I don't know why but many people have posted a sample code simular to yours saying it doesn't work and the above is usually the solution.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well most of the good ones you need to pay for but just for the basics, Pobs does the job and can be found at: http://pobs.mywalhalla.net/. I've used it in the past it works great providing you read the manual.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

If you mean to copy the contents of a text file into a webpage then the file_get_contents() function should do the trick. Below is an example:

<?
$data=file_get_contents('filename.txt'); //get data from file
$dat=explode("\r\n",$data); //split data at new lines
echo '<table border=1 cellpadding=3 cellspacing=0>';
foreach ($dat AS $val) { //loop
echo '<tr><td>'.$val.'</td></tr>'; //display
}
echo '</table>';
?>

The above example will display every line of the text file in a new table row. Hope that helps.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

php returns static html pages
nothing else is seen on the user browser, unless part of the html is a javascript, then the javascript is dynamic (from the user perspective)
Trying to get my head round how what you want could not be solved with a mod_rewrite rule, with lower overheadI might (grimace(probably)) be missing somethingbut I guess my learning curve isnt helping your problem, sorry

I managed to get my head around the problem with a simple question. What if php in this case does no processing and only displays multiple pages based on url input? That is the theorm my script works on. So to some degree you would then convert the usage of if(/*blah*/$_GET/*blah*/) to html. It is only things like $_POST, mysql input and mail() that won't process. So there are 2 answers to your question depending on what your using php for.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I just tested the script for the bug you mentioned and have now got a fix and the code is as follows:

<?
$domain='http://example.com/'; //must end in a slash
$links=array(
'index.php',
'index.php?id=1',
'data.php',
'folder/phpfile.php?id=43');
//set the links in the array above
foreach ($links AS $link) {
$data=file_get_contents($domain.$link);
file_put_contents(str_replace(array('?','*',':','|','"',"'"),'_',$link).'.html',$data);
unset($data);
}
echo 'process complete.';
?>

However, with the change in the code, in the domain variable on the second line you will need to specify your website domain and all the links in the array below that will need to be relative to the homepage directory. Hope that helps.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Perhaps the email is being classified as spam or maybe theres a bug in your code. Try posting the code you used for the 10 emails for us to check for bugs. Note that you may want to replace the email address with fake ones in the sample code you posted on the forums.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Do you mean that you want to convert all your php documents into html documents or are you trying to place php content under a .html extension. If you are trying to convert all the php documents to html documents then the following script will do the job although you will need to specify each php location in the array.

<?
$links=array(
'index.php',
'index.php?id=1',
'data.php',
'folder/phpfile.php?id=43');
//set the links in the array above
foreach ($links AS $link) {
$data=file_get_contents($link);
file_put_contents(str_replace(array('?','*',':','|','"',"'"),'_',$link).'.html',$data);
unset($data);
}
echo 'process complete.';
?>

If however you want to keep them as php files but want to give them a .html extension without .htaccess files then you could modify apache to treat html files as php files and just leave the extension .htm (not .html) for the regular html files.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Edit: Sorry but I was typing this when adatapost beat me to the answer by seconds.
Simply use action="test.php" in the <form> tag. Below is an example:

<form method="post" action="test.php">
<input type="text" name="mobile" id="mobile" />
<input type="submit" value="send"></form>

Then in test.php, to display the value use the following

$mobile=$_POST['mobile']; //retrieves it
echo $mobile; //displays it

Although you may want to modify the form a bit to suit your needs, the above is the basic code.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I have just done a yahoo search to see if there were any databases online available for download and could not find a single one. So it appears that there are three ways of getting the data into your website they are:

  1. To spend hundreds of dollars making a deal with someone who currently has such a database
  2. To spend about a thousand dollars getting one developed by a company
  3. To download an application (exe) that contains the data and to catalogue all of that data into your website which I believe would fall under the fair dealing act if your download has no commercial license. But it could take years cataloging every book in existence single handed.

So those are your options and if I were to choose one I would choose option 2 as you would then own full rights to the data and might even be able to resell it.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

If $_POST contains the email address then that would not be such a wise idea since it would be open to experienced hackers. I would suggest making a html form like the following then below that is the php code that will process the form.

<?
if (isset($_POST) && !empty($_POST)) {
//set details
$subject='This is a test';
$message='This is a test email and this text will apear in the message body.';

//set email addresses
$email[0]='email1@domain.com';
$email[1]='another@domain.com';
$email[2]='user@gmail.com';
$email[3]='user@hotmail.com';

//decide which email to use
$n=stripslashes($_POST['to']);
$to=$email[$n];
unset($n);

//process email
if (mail($to, $subject, $message)) {
echo '<b>Success</b>, email sent to '.$email;
} else {
echo '<b>Failure</b>, try checking your server settings or that you have specified a valid email.';
}
} //!empty($_POST)
?> <form method="post"><select name="to">
<option value="0">email1@domain.com
<option value="1">another@domain.com
<option value="2">user@gmail.com
<option value="3">user@hotmail.com
</select></form>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Although I haven't bothered making custom 404 pages in the past, I would suggest placing the admin section in a separate directory with is own .htaccess rules for 404 error reporting while all other directories have a different .htaccess file pointing to the custom 404 error page. I've read things like that around the web so try a google search and see what pops up.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

To make it easier below is a more complete version of my code:

$to=stripslashes($_POST['to']);
$subject='This is a test';
$message='This is a test email and this text will apear in the message body.';
$headers='';
if($to == '1'){
$email='user@gmail.com';
mail($email, $subject, $message, $headers);
}else {
$email='name@hotmail.com';
mail($email, $subject, $message, $headers);
}

Another version of the same thing but with error reporting is as follows:

$to=stripslashes($_POST['to']);
$subject='This is a test';
$message='This is a test email and this text will apear in the message body.';
$headers='';
if($to == '1'){
$email='user@gmail.com';
}else {
$email='name@hotmail.com';
}
if (mail($email, $subject, $message, $headers)) {
echo '<b>Success</b>, email sent to '.$email;
} else {
echo '<b>Failure</b>, try checking your server settings or that you have specified a valid email.';
}
cwarn23 387 Occupation: Genius Team Colleague Featured Poster
$to=stripslashes($_POST['to']);
if($to == '1'){
mail($email, $subject, $message, $headers);
}else {
mail($email, $subject, $message, $headers);
}

Above is an example and for further reading the mail function manual is at http://au2.php.net/function.mail

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

So many questions to answer so here are the answers

Are you using just php in your work?

No, I like to use a wide variety of languages including C++, Java, html, css, Ajax, php and javascript.

Are you using a templating system like Smarty?

If you mean a content management system then in most cases I like to make my own from scratch. That way I can decide how the result is.

Are you learning php?

Well php is a thing where you can never stop learning especially since you can invent core libraries for php using c and c++. So yes I am learning php but at a high level.

Do you find any of the books teaching php any good? Which one(s)?

The only book I've found that covers it all is the Php5 and Mysql bible It has great learning information and makes great reference material with php.net

When an author throws something into the learning process like smarty does that throw you a curve that makes learning more difficult?

Well for some languages that is true but with php, as long as the author clearly explains the process it is normally easy to understand since php is actually one of the easiest languages to learn.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Perhaps you are using the wrong ip address to remotely access the data. To find out what ip address to put into the browser url to view your pages, first go onto your server computer. Then click start->Run->Type: "cmd" (without the quotes)
Then in the command box type "ipconfig" without the quotes. And from the results that come back it is the IP Address. The IP address that this method provides is a special one that no internet website can provide as it provides you with the internal IP address. And that is the address to use for viewing the pages over the network.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try making your php page the following:

<?php
echo 'The email you entered is '.$_POST['email'].'.';
echo 'The password you entered is '.$_POST['pswd'].'.';
?>

And other than that your code should be fine unless there is other code in the php file that may be causing the problem.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

You are comparing apples and oranges. Visual C++ Express 2008 is an IDE (Integrated Development Environment) and that's way more than a compiler as gcc is. Stay with VC++E2k8 as it is the most comfortable development environment for C++ in my opinion. For Java development I recommend Eclipse.

Well I'm not exactly comparing anything but to make it clearer, I am trying to modify a compiler to compile my own type of applications. And the overall project is being done is Visual c++ Express 2008. So I hope that makes more sense and download links with 1 or 2 tutorials on compiling would be good.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Hi, I'm looking for an open source c++ compiler to embed into an ide project I'm working on. I'm using Visual C++ express 2008 and would like to know what you's recommend as I have heard of gcc and MinGW but don't know what is best and EASIEST as they can be so hard to understand.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Cool! So I can still be a freebee. Thanks Ancient Dragon for the new information.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Hi, I have been learning some c++ with a friend and saw a youtube video where there were some features I just couldn't find in my version (express edition). I have to ask in which version of Visual Studio 2008 does the Project type Windows Forms Application appear in where some click and drag functionality (for gui setup) appears. I have read the features list and am not sure which editions has this functionality. Would love to know especially if standard edition has that feature as it would make my life so much easier. BTW, I am actually going to buy one of these versions but the pro edition is a bit pricy.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I just check the windows folder for the php.ini and there isn't any in the windows folder. Also, I just tried adding the extension to every php.ini file on the computer and still no result.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I have just tried the dll you posted and it doesn't show up in the php_info(). To install it I simply added extension=php_talkphp.dll to the extension list and placed the dll in the etc/ directory. I am also using Xampp and located the php.ini at apachie/bin/. Comfirmed the location with php_info() and yet the module just won't load. I have also tried rebooting both apachie and the computer but the dll you gave me just won't work. Am I not doing something.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I meant the tsrm_config_common.h file. Just that I can't get my head around the modifications since I'm unsure of exactly what to change.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Could you please post the file to hopefully solve this one because I've been changing it by commenting sections but I just keep on getting the linker warnings unless I use the original file in which case is a single error.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

So do I delete the lines before the occurance of that code?

PS: I just tried replacing the whole file with that code and 101 warnings came up but zero errors and php didn't recornise it. That is when I replace the entire file with that code.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I just set the library paths and compiled your project but the following error came up:

1>c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(620) : warning C4273: 'getwchar' : inconsistent dll linkage
1> c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(435) : see previous definition of 'getwchar'

1>c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(622) : warning C4273: 'putwchar' : inconsistent dll linkage
1> c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(437) : see previous definition of 'putwchar'

1>c:\documents and settings\owner\my documents\visual studio 2008\projects\test\phpfiles\tsrm\tsrm_config_common.h(5) : fatal error C1017: invalid integer constant expression

I just googled the last error which is the only fatal error and it turns out to be a common one which I am trying to find a work around. But thanks for the source as I didn't have those original files and I kept the old preprocessor definitions which I now know more about. Any suggestions are welcome as I google this problem.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Then could you please send the folder that contains the project as a zip so I can check what I did wrong.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I tried using dl but since I'm running it on Windows XP, it has an error message saying the operating system is multi-threaded. The message is as follows:

Warning: dl() [function.dl]: Not supported in multithreaded Web servers...

Is there by any chance an existing extension that will do the same as dl() but for windows to help determine the error?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

anybody?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Although I don't know much about SSL certificates, I would say that its more likely to be related to the apachie httpd.conf file instead of the php.ini Also, if you have cpanel installed then I think you might be able to do most of the work through the cpanel interface. But as I said, I haven't had much experience with SSL certificates but hope that information helps.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The corrected code is as follows however you will need to add an array called $prizes near the beginning.

<!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>
<title>Available Prizes</title>
<link rel="StyleSheet" href="styles.css" type="text/css">
</head>
<body>
<h1>Available Prizes</h1>
<table cellpadding="0" cellspacing="0" class="table">
	<tr class="tablehead">
	<td>SN</td>
	<td>Title</td>
	<td>Description</td>
	<td>Image</td>
	<td>Quantity</td>
	</tr>
    <?php 
    $count=0;
    foreach ($prizes as $prize) 
    {
    $class=(!($count%2))?'class="even"':'';
    $do=$count+1;
    echo '<tr align="center" '.$class.'>
        <td>'.$do.'</td>
        <td>'.$prize['title'].'</td>
        <td>'.nl2br($prize['description']).'</td>
        <td><img src="images/prize_th_'.$prize['id'].'.jpg"/></td>
        <td>'.$prize['quantity'].'</td>
    </tr>';
    unset($do);
    $count++; 
	}
	 ?>
</table>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

All my forms submit to themselves, even those that take multiple submits to complete, the url does not change, you cant mess up referer, dont need sessions, cant be bypassed, now I know why my son suggested that.
I have added your post to my references, to make sure I dont again. - Thanks

I have residential rentals
my booking form, appl.php
outputs a different html page, dependant on the prior page's $_POST array. and the entire dataset is posted to the database and email notice sent at the end of the third form
m-hrt, you could use a single php page with multiple forms the url of the page never changes

I shall send I pic showing the option in Opera where you can disable the referer information which I would assume most other browsers do by default. A picture of the option in Opera is shown in the attachment to this post. Also you will find that if one browser can block the referer information then it is likely that some other browsers block it too.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

http://listhoster.net/scratch/images/prize_th_%3C?=$prize[%27id%27];%20?%3E.jpg

It appears you have incorrectly connected an array to a string. Without the code that echos that line I can only guess but I would say that line would look something like the following:

<?php echo 'http://listhoster.net/scratch/images/prize_th_'.$prize['id'].'.jpg'; ?>

And the above will return something like the below:

http://listhoster.net/scratch/images/prize_th_variable.jpg