Links
Budownictwo
naklejki ścienne
apartamenty sopot
DOMESTOS Płyn do WC 750 ml Citrus
Posts Tagged ‘Php Code’
What ’s wrong with my php code?
,” and “/n” how can i actually make it break with a new line.
=========================…
function ipset(){
$ip = $_SERVER["REMOTE_ADDR"];
$new_file = "addresses.txt";
$file_handle = fopen($new_file,'a');
fwrite($file_handle,
$ip."-".date("m/d/Y").
"
“)/n;
fclose($file_handle);
ipset();
}
?>
=========================…
OUTPUT in textfile:
(making more than one line because text box won’t let me put long strings…)
=========================…
69.152.147.191-06/06/2007
(continue string on next line*)
69.152.147.191-06/06/…
(continue string on next line*)
=========================…
By: truepal20032001
PHP Code Question?
—
$host = getenv("REMOTE_ADDR");
if ($host == "63.97.200.11") { $redirect = "Location: http://www.google.com"; }
header ($redirect)
?>
Okay it works now. Thank you all for the great answers.
By: webmaster
Please help me? Where from collect India News Ticker (HTML Code)?
By: Ram
What’s the answer to this php riddle?
$getit = “hts”.’f'; $y = $_GET['getvar']; eval(”\$getit = \$y;”);
By: Des Racoga
Problem with PHP and cookies! Open for more details:?
Hello, $username!
Click here to change your username or click here to continued!
the index.php code is:
Please enter your username:
the user.php code is:
setcookie ("user", $username);
?>
echo 'Hello, $username!
Click here, to change your username or click here to continued!’
?>
ps: im useing WAMP5 1.6.6
By: Mitko
Can anyone help figure out wats wrong.its a database driven site?
Alarm Codes
| Alarm Code: | |
| Alarm Description: |
//This is only displayed if they have submitted the form
if ($_POST['searching'] =="True")
{
echo "
Results
“;
//If they did not enter an alarm we give them an error
if ($find == “”)
{
exit;
echo “
You forgot to enter an alarm code”;
}
// Otherwise we connect to our Database
mysql_connect(”localhost”, “eoin”, “password”) or die(mysql_error());
mysql_select_db(”alarm_codes”) or die(mysql_error());
// We preform a bit of filtering
$find = strtoupper($find);
$find = strip_tags($find);
$find = trim ($find);
//Now we search for our search term, in the field the user specified
$data = mysql_query(”SELECT * FROM users WHERE upper($field) LIKE’%$find%’”);
//And we display the results
while($result = mysql_fetch_array( $data ))
{
echo $result['codes'];
echo ” “;
echo $result['description'];
echo “
“;
echo “
“;
}
//This counts the number or results - and if there wasnt any it gives them a little message explaining that
$anymatches=mysql_num_rows($data);
if ($anymatches == 0)
{
echo “Sorry, but we can not find an entry to match your query. Please add this alarm
“;
}
//And we remind them what they searched for
echo “Searched For: ” .$find;
}
?>





