only one
-
Posts
437 -
Joined
-
Last visited
Never
Posts posted by only one
-
-
i think i know what your doing, you making like a traveling thing
-
can you explain what you mean by route?
-
yea isset is for posting stuff, just use an if with your variable doing what ever you want, its very simple
-
um thats it? doesnt make a lot of sense to me :-\
wers the rest of the code*
-
you do something with <span class=the number>infront of the text
-
<? $host='host'; $username='user'; $pass='pass'; $database='CTW_BM_db'; mysql_connect ($host, $username, $pass); mysql_select_db($database) or die('Could not connect to the Database'); $info = mysql_query("SELECT post_title FROM wp_posts"); while ($r = mysql_fetch_array($info)) { echo "<a href=the link>$r[post_title]</a>"; } ?>
stupid [/url] thingy in that 1
-
<?
$host='host';
$username='user';
$pass='pass';
$database='CTW_BM_db';
mysql_connect ($host, $username, $pass);
mysql_select_db($database) or die('Could not connect to the Database');
$info = mysql_query("SELECT post_title FROM wp_posts");
while ($r = mysql_fetch_array($info)) {
echo "<a href=the link>$r[post_title]</a>"; }
?>
-
lol im so stupid, i closed the while too late
-
<?php include("cons.php"); $date = date("Yjm"); $time = date("Gi"); mysql_query("UPDATE `clanusers` SET `time` = '$time', `date` = '$date' WHERE '$user' = `username`"); $info = mysql_query("SELECT * FROM clanusers"); while ($r = mysql_fetch_array($info)) { $rank2 = $r['rank']; $date1 = $r['date']; $time1 = $r['time']; $name = $r['username']; $date2 = date("Yjm"); $time2 = $time1 + 0005; $color2 = $r['color']; if($date2==$date1){ if($time<$time2){ $info2 = mysql_query("SELECT rank FROM ranks WHERE `rankno` = '$rank2'"); while ($r2 = mysql_fetch_array($info2)) { $rank3 = $r2['rank']; echo "<a href='?page=Profile&userna=$name'><title='Rank: $rank3'><font face=\"Arial, Helvetica, sans-serif\" font size=\"1\" color=\"$color2\">$name</font></title>[/url] <font color=#cccccc face=Arial size=1>|</font> "; }}}} mysql_error(); ?>
-
code:
<?php
include("cons.php");
$date = date("Yjm");
$time = date("Gi");
mysql_query("UPDATE `clanusers` SET `time` = '$time', `date` = '$date' WHERE '$user' = `username`");
$info = mysql_query("SELECT * FROM clanusers");
while ($r = mysql_fetch_array($info)) {
$rank2 = $r['rank'];
$date1 = $r['date'];
$time1 = $r['time'];
$name = $r['username'];
$date2 = date("Yjm");
$time2 = $time1 + 0005;
$color2 = $r['color'];
if($date2==$date1){ if($time<$time2){
$info2 = mysql_query("SELECT rank FROM ranks WHERE `rankno` = '$rank2'");
while ($r2 = mysql_fetch_array($info2)) {
$rank3 = $r2['rank'];
echo "<b><a href='?page=Profile&userna=$name'><title='Rank: $rank3'><font face=\"Arial, Helvetica, sans-serif\" font size=\"1\" color=\"$color2\">$name</font></title></a> <font color=#cccccc face=Arial size=1>|</font> </b>"; }}}} mysql_error();
?>
doesnt show whos online for some reason, it works fine without the the ranks bit
-
if you are going to include any files i would suggest setting it in another folder inside your root folder, then if you want to include a file like, include("file/$page.php"); they cant get their page on from their site becasue it will have to be in that folder first, if you have include("$page.php"); they could do, page.php?page='their url', this allows them to include their page fom their own site, hope it make sense to you
by the looks of it from me your safe
-
are you with a webhost that only allows up to 1 database, theyl usually have the functions blocked out so you cant make a new database
-
btw
error code: Duplicate entry '0' for key 1
usually means you got your feild on primary key but not on auto increasment, somewhere along the lines of that
-
lol u got a messy way of doing it
ive made you the whole page
<?php $host='db778.oneandone.co.uk'; $username='dbo191523062'; $pass='zfMcsqnB'; $database='db191523062'; mysql_connect ($host, $username, $pass); mysql_select_db($database) or die('Could not connect to the Database'); if (isset($_POST["name"])) { $useremail = $_POST["useremail"]; $name = $_POST["name"]; if($rsname==NULL) { echo "some form of error"; }else{ $query = "INSERT INTO phpbb_users(`username`, `user_email`) VALUES('$name','$useremail')"; mysql_query($query) or die(mysql_error()); echo "succesfull"; } } ?> <form method="POST" action="newslettertest4.php"> Name: <input type="text" name="name" size="20"> Email: <input type="text" name="useremail" size="20"> <button name="B1">Subscribe</button></p> </form>
-
thats done by javascript
-
soz forgot to say, thats for creating the table in your database
-
yup
CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(25) NOT NULL default '',
`password` varchar(32) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-
anyone figure it yet? ???
-
heres my uploading images code, make a folder called uploads
<?php echo('Upload image<br><br>'); $path = "uploads/"; $max_size = 5000000; if (!isset($HTTP_POST_FILES['userfile'])) exit; if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) { if ($HTTP_POST_FILES['userfile']['size']>$max_size) { echo "The file is too big<br>"; exit; } if (($HTTP_POST_FILES['userfile']['type']=="image/gif") || ($HTTP_POST_FILES['userfile']['type']=="image/pjpeg") || ($HTTP_POST_FILES['userfile']['type']=="image/jpeg") || ($HTTP_POST_FILES['userfile']['type']=="image/png")) { if (file_exists($path . $HTTP_POST_FILES['userfile']['name'])) { echo "The file already exists, try calling it a different name.<br>"; exit; } $res = copy($HTTP_POST_FILES['userfile']['tmp_name'], $path . $HTTP_POST_FILES['userfile']['name']); if (!$res) { echo "upload failed!<br>"; exit; } else { echo "upload sucessful<br><br>"; } echo "File Name: ".$HTTP_POST_FILES['userfile']['name']."<br>"; echo "File Path: <a href=uploads/".$HTTP_POST_FILES['userfile']['name']." TARGET=_BLANK>uploads/".$HTTP_POST_FILES['userfile']['name']."</a><br>"; echo "File Size: ".$HTTP_POST_FILES['userfile']['size']." bytes<br>"; echo "File Type: ".$HTTP_POST_FILES['userfile']['type']."<br>"; echo "<img src=uploads/".$HTTP_POST_FILES['userfile']['name']." width=200 height=250><br>"; mysql_connect (your host,your username,your pass); mysql_select_db($database) or die('Could not connect to the Database'); $avatar2 = ""; mysql_query("UPDATE `users` SET `avatar` = 'uploads/".$HTTP_POST_FILES['userfile']['name']."' WHERE `username` = '$user';"); echo "Profile Pic updated"; } else { echo "Wrong file type<br>"; exit; } } $my_file = $HTTP_POST_FILES['userfile']['name']; ?>
heres the page before that
<? echo "<FORM ENCTYPE=multipart/form-data ACTION='?page=Upload Clan Image&clan=$clan' METHOD=POST>"; ?> <p>The file: <INPUT TYPE="file" NAME="userfile" style="border: 1px solid #222222; background-color: #111111; color: #888888"> </p> <p> <INPUT TYPE="submit" VALUE="Upload" style="border: 1px solid #222222; background-color: #111111; color: #888888"> </p> </FORM>
-
oops just realised, i didnt coppy the full error, if it makes much difference
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/d-pures.freehostia.com/pages/Apply.php on line 9
Unknown column 'username' in 'field list'
-
CREATE TABLE `clanapps` (
`id` int(11) NOT NULL auto_increment,
`clan` varchar(25) NOT NULL default '',
`username` varchar(25) NOT NULL default '',
PRIMARY KEY (`id`)
-
my codes exits; something happens
-
no different
-
its obviously connecting to the database if all the other coides are working, everytime i use the mysql_num_rows() function i always get an error, it seems to work alright on my register page
Help with time
in PHP Coding Help
Posted
thats gonna take alot of ifs, i cant think of any other way :-\