Bounty
-
Posts
78 -
Joined
-
Last visited
Never
Posts posted by Bounty
-
-
I ment something like this..could i make a string like "$userlist = command for listing" and use it in html anywhere in the code?
I know this is not a table structure but what is it? It looks messed up...
-
What do you mean import username "directly"? I don't follow what you're asking.
Well could i make a variable that displays the list and when needed in html code just inserting the variable in the table..
That isn't the table's structure, really. In phpMyAdmin, select the table, the click the "Structure" tab at the top to see the structure.Well what is it? I think its data inside the table...if it is than it is weird...
-
So how can i order it?
And is there a way to import data (usernames) in html directly?
Edit:
This is the table data structure its weird..
http://img149.imageshack.us/img149/5174/databh.jpg
I'm lost...
-
It finally works...
It shows:
1
2 Adam
3 Bounty
First i created "Bounty" and then i created "Adam" so it should be Bounty then Adam..://
And why is 1. empty?
-
Have no idea how that line got in there...must be my mistake when pasting or something...
Anyhow..do i need database connection for this?
Wont work with or without the connection :///
This is the code i use now...
<html> <head> <title>Members</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php $server = "localhost"; $user = "***"; $pass = "***"; $db_name = "mysql"; $dbc = mysql_connect($server, $user, $pass); mysql_select_db( $db_name, $dbc) $query = "SELECT `username` FROM `users` WHERE `username` IS NOT NULL"; $result = mysql_query($query) or die('Query cratered: ' . mysql_error() . '<br />Using query string: ' . $query); echo "<table>"; $count = 1; while( $array = mysql_fetch_assoc($result) ) { echo "<tr><td>{$count}</td><td>{$array['username']}</td></tr>"; $count++; } echo "</table>"; ?> </body> </html>
It shows error in this line:
$query = "SELECT `username` FROM `users` WHERE `username` IS NOT NULL";
Should i escape quotes or anything..?
-
Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\register\memberspage.php on line 17
Line 17:
$username = $_POST['username'];
://
-
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\register\memberspage.php on line 10
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\xampp\htdocs\register\memberspage.php on line 10
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\register\memberspage.php on line 14
Line 10:
$result = mysql_query ("SELECT username FROM $tablee WHERE username IS NOT NULL");
Line 14:
while ($array = mysql_fetch_assoc($result)) {
haven't changed a thing...the last time i was trying something thats why it was changed i forgot to undo it
-
<html> <head> <title>Members</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php $tablee = "users"; $username = $_POST['username']; $result = mysql_query ("SELECT username FROM $tablee WHERE username IS NOT NULL"); echo '<table>'; $count = 1; while ($array = mysql_fetch_assoc($result)) { echo ("<tr><td>$count</td><td>$array[username]</td></tr>"); $count++; } echo '</table>'; ?> </body> </html>
-
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\register\memberspage.php on line 14
Sorry for troubling you so much...:/
-
I think you missed an '$' at count = 1;
Btw with this script i get this error
Parse error: syntax error, unexpected '{' in C:\xampp\htdocs\register\memberspage.php on line 15Line 15 is this:
while( $array = mysql_fetch_assoc($result) {
://
Thanks for the help btw
-
Ok i made this simple register / login script so how can i list all Usernames from database table like this:
1.user1
2.user2
3.user3
......
?
-
Any idea why this wont work??
-
Ok i managed to change the password and now it connects ok...but it wont select sql database,this is the code..idk what is wrong :///
$connection = mysql_connect("localhost", "root", "*password*"); mysql_select_db("users") or die( "Unable to select database");
Database is called "users"...:/
Thanks u helped me alot
-
One more..
$connection = mysql_connect('host', 'user', 'password');
I'm using this Xampp virtual server program...ive never registered or anything...what is my db password and how can i change it???
-
Ok i installed the software and it works charming...only problem is in my script line 166 witch says:
echo <META HTTP-EQUIV=Refresh CONTENT="0; URL=.$url.">
Error:
syntax error, unexpected '<' in C:\xampp\htdocs\livereg.php on line 166Whats the problem?
-
I would search if i knew what i was looking for or how to name it xDD
Thanks on answers i will try all of this today so if i get any errors ill post here
Umm i just remembered one...where can i find virtual ftp server,like offline host so i can test all of this...?
-
Its solved for now...if i have any more difficulties with this ill post them here..thanks for quick answer )
Another question...
Can you tell me how can i make a page that creates pages...like on youtube.com,every clip has its own page,right? and only 1 page that makes them (the upload one)...or can you at least point me in right direction...a tutorial or anything...
Thanks =)))
-
Here...this is the original code it wont work too...://
<html> <body> <?php $url = /'http://www.yourdomain.com/accountok.php\'; // Where to redirect //the user after that form has been processed successfully. Now we will //get the values sent by the form: to get a value you can generally access //it with $_POST[\'valuename\'] where valuename is the string you put into //the value of the the field you are accessing $user = $_POST[\'username\'];//get username from form $pass = $_POST[\'password\'];//get password from form $pass2 = $_POST[\'password2\'];//get password2 from form $name = $_POST[\'name\'];//get name from form $domain = $_POST[\'domain\'];//get domain from form $zip = $_POST[\'zip\'];//get zip from form $city = $_POST[\'city\'];//get city from form $email = $_POST[\'email\'];//get email from form $state = $_POST[\'state\'];//get state from form $country = $_POST[\'country\'];//get country from form $address = $_POST[\'address\'];//get address from form $phone = $_POST[\'phone\'];//get phone from form //now that we have picked all the values we need from the form we can //start checking them one at a time //PASSWORD VERIFICATION if (($pass)!=($pass2)) //if the values stored in the 2 variables are //different we redirect the users to a previously created error page { header("Location: error-pwverify.php"); //the user will be sent to this page Die(); } //EMAIL VERIFICATION function CheckMail($email) // this function checks if the email format is ok, //if the chars are allowed, if there are enough chars in the TLD learn more //about eregi function here: http://www.php.net/manual/en/function.eregi.php { if(eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\.[a-z]{2,4}$",$email)) { return true; } else { return false; } } if ((empty($email)) || (!CheckMail($email))) //here we check if the email is //empty and if the previous function controls are passed, if there are //errors the user is sent to a previously prepared custom error page { header("Location: error-email.php"); //the user will be sent to this page Die(); } //ZIP CODE VERIFICATION function CheckZip($zip) { if (eregi("[0-9]", $zip)) //here we check if the ZIP code contains only numbers { return true; } else { return false; } } if ((empty($zip)) || (!CheckZip($zip)) || (strlen($zip)!=5)) //if the ZIP code is empty, the CheckZip function fails or the code length is //different from 5 chars the user is sent to a previously prepared custom error page { header("Location: error-zip.php"); //the user will be sent to this page Die(); } //NAME VERIFICATION //the name and the following fields don\'t allow us to make strict //verifications by the way the user has to have a name so if the name //is empty the user is sent to a previously prepared custom error page if (empty($name)) { header("Location: error-name.php"); //the user will be sent to this page Die(); } //CITY VERIFICATION //exactly the same as the name verification if (empty($city)) { header("Location: error-city.php"); //the user will be sent to this page Die(); } //STATE/PROVINCE VERIFICATION //exactly the same as the name verification if (empty($state)) { header("Location: error-state.php"); //the user will be sent to this page Die(); } //COUNTRY VERIFICATION //exactly the same as the name verification if (empty($country)) { header("Location: error-country.php"); //the user will be sent to this page Die(); } //ADDRESS VERIFICATION //exactly the same as the name verification if (empty($address)) { header("Location: error-address.php"); //the user will be sent to this page Die(); } //USER AND PASSWORD LENGTH CHECK $min_lenngth = 6; //this value is the minimal length that we desire our passwords //to be if the username or the password is shorter than 6 chars the user is sent //to a previously prepared custom error page if(strlen($user) < $min_lenngth || strlen($pass) < $min_lenngth) { header("Location: error-pwshort.php"); //the user will be sent to this page Die(); } //NOTE: insert here the code between //****************// and //****************// //in the following part of the tutorial if you want to add these values to your //database //NOTE:don\'t use the following code line (erase it) if you inserted here the code //to add the values to the database //if all our checks are passed we go to the url assigned at the top to the variable url echo <META HTTP-EQUIV=Refresh CONTENT="0; URL=.$url.">; ?> </body> </html>
-
Heya...i'm getting this strange result when writing php in dreamweaver. When typing <?php tag below <body> it goes red letters and it displays it as an error..even in basic scripts like
<html> <body> <?php echo "Hello World"; ?> </body> </html>
This is the picture of it..
And when i try to open my html page all html comments (text behind "//") shows on the page..
Can you tell me what is wrong?
-
Heh and now how to display text in text box?
//fopen your file for reading and echo it's content
-
So far xDD
Just another question...i created another text field to be input for a name of the file...the string looks like this:
$myFile = $_POST['name'];
And it works but what to use to add .txt to the name of file ?
Sorry for bothering :/
-
Sorry about that..it works fine now..i noticed the problem..thanks guys..i will experiment a little more and if i have some more questions i will post here.thanks again
-
Why this cant be done without all these things :/
It should be simple...script.php/html and done..
-
Im not sure i have that..all my php scripts i tested on this host worked just fine..:/
Smf theme navbar
in Third Party Scripts
Posted
Okay ive had this forum running very well but i missed 6monthly payment and they shut my host down, luckily i have backup with this cool dynamic theme..i hosted new forum with same theme on byethost so u can see what i want...
Anyways what i want to do (with your help ). In this theme there is included dynamic navigation bar (or menu) witch you can see here,i want to use that menu on the new site im making now..as i looked through smf source code i found that this nav bar is powered from the javascript file named "menu.js" and some more files...so can this scripts be pulled out from smf pages and codes so i can use it on the page of my own???
Sorry for my bad English i hope you understand what i mean with all this :/
Thanks..