-
Posts
1,842 -
Joined
-
Last visited
Posts posted by marcus
-
-
Well, if you're looking for phpmyadmin to be installed on a cPanel you're going to have to ask your host to do it, or manually do it (linux).
Or get your own "localhost."
http://www.apachefriends.org/en/xampp.html
http://www.wampserver.com/en/ -
[code]
<?php
// connect to database.
$select = mysql_query("SELECT * FROM `table_name`");
echo "<table><tr><td>Week</td><td>Date Start</td><td>Notes</td><td>Date End</td></tr>";
while ($info = mysql_fetch_assoc($select)) {
$week = $info['week'];
$date_start = $info['date_start'];
$notes = $info['notes'];
$date_end = $info['data_end'];
echo "<tr>
<td>
$week
</td>
<td>
$date_start
</td>
<td>
$notes
</td>
<td>
$date_end
</td></tr>";
}
mysql_free_result($select);
echo "</table>";
?>
[/code] -
Might I note you should connect to your database (update):
[code]
<?php
$ipaddy = $_SERVER['REMOTE_ADDR'];
$ipaddy = str_replace(".","",$ipaddy);
$connect = mysql_connect(host,dbuser,dbpass);
$db = mysql_select_db(dbname,$connect);
$query = "SELECT ip FROM ipbase WHERE ip=$ipaddy";
$result = mysql_query($query) or die("mysql error: " . mysql_error());
$line = mysql_fetch_assoc($result);
$ipad = $line['ip'];
if ( $ipad == $ipaddy ){
echo 'Welcome!';
$query = "INSERT INTO `ipbase` (`ip`) VALUES('$ipaddy')";
$result = mysql_query($query) or die(mysql_error());
}else {
echo " ";
};
?>
[/code] -
try this:
[code]
<?php
$ipaddy = $_SERVER['REMOTE_ADDR'];
$ipaddy = str_replace(".","",$ipaddy);
$query = "SELECT ip FROM ipbase WHERE ip=$ipaddy";
$result = mysql_query($query) or die("mysql error: " . mysql_error());
$line = mysql_fetch_assoc($result);
$ipad = $line['ip'];
if ( $ipad == $ipaddy ){
echo 'Welcome!';
$query = "INSERT INTO `ipbase` (`ip`) VALUES('$ipaddy')";
$result = mysql_query($query) or die(mysql_error());
}else {
echo " ";
};
?>
[/code] -
[code]
<?php
$ipaddy = $_SERVER['REMOTE_ADDR'];
$ipaddy = str_replace(".","",$ipaddy);
$query = "SELECT ip FROM ipbase WHERE ip=$ipaddy";
$result = mysql_query($query) or die("mysql error: " . mysql_error());
while ($line = mysql_fetch_assoc($result)) {
$ipad = $line['ip'];
if ( $ipad == $ipaddy ){
echo 'Welcome!';
$query = "INSERT INTO `ipbase` (`ip`) VALUES('$ipaddy')";
$result = mysql_query($query) or die(mysql_error());
}
else
{
echo "";
}
}
mysql_free_result($result);
?>
[/code]
-
This is 3rd party, you're going to have to ask them.
-
Post the full code
-
You could have just used
<?php
ob_start();
codestuffhere
ob_end_flush();
?> -
Just a simple cron job will do it.
-
You should be able to.
-
Show us the code...
-
You should try tizag.com
They have some good tutorials there. -
have you tried
[code]
<?php
system("convert file.pdf file.jpg",$return);
?>
[/code] -
-
Yep, as fert said, very big project.
-
Alright
[code]
<?php
session_start();
$un = $_POST[Username];
$_SESSION['Username'] = $un;
$con = mysql_connect(host,dbuser,dbpass);
$db = mysql_select_db(dbname,$con);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
$sql = "INSERT INTO Usagers (`Username`) VALUES('$un')";
$result = mysql_query($sql);
mysql_close($con);
?>
[/code]
if session username and post username are the same, why not just insert post username into the database? -
Did you update your fields? host,dbuser,dbpass and dbname?
-
I had to re-edit my code, which is like the same as his.
-
[code]
<?php
session_start();
$_SESSION['Username'] = $_POST["Username"];
$con = mysql_connect(host,dbuser,dbpass);
$db = mysql_select_db(dbname,$con);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_query("INSERT INTO Usagers (Username) VALUES ($_SESSION['Username'])");
mysql_close($con);
?>
[/code] -
Oh, you can just remove it then. I was just using my login script to yours.
-
Hmm... this is interesting. Have you thought of using cookies?
-
It echo's test now.
-
How bout this, connect to your database.
-
Look where it checks if the user actually exists.
displaying delimited data from mySQL in a HTML table
in PHP Coding Help
Posted