nav33n 472 Purple hazed! Team Colleague Featured Poster

I don't know. Ask that in vb6 forum.

nav33n 472 Purple hazed! Team Colleague Featured Poster

My suggestion is, always use integer values if you are are updating a table based on the choice made. Because, it ll be easy for you to update.
But I guess your table structure is not that good.. Do you have an autoincrement field(id or counter or anything like that ?). If you do, then you can fetch first name, last name and id of every users, put id for option value.
Eg. say you have id, firstname, lastname in your table.

<?php
//connect
//select db
$query="select id,firstname,lastname from table";
$result=mysql_query($query);
$option="";
while($row=mysql_fetch_array($result)){
$name=$row['firstname']." ".$row['lastname'];
$id=$row['id'];
  $option.="<option value=$id>$name</option>";
}
?>

This will show the first name and last name as a choice, but when selected, it sends the id of that user.

Cheers,
Naveen

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Please send additional information to:
Billy Winkle
IS Manager
Postal Presort, Inc.
Wichita, Kansas 67203
bwinkle@postalpresort.com

What information ? :S

nav33n 472 Purple hazed! Team Colleague Featured Poster

@erictenson:
sorry??

:) RamyMahrous -> Posting Whiz! Thats what he meant, I guess.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb Mathura! Post your question in java forum to get help!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Hey Aron! Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb. Post your questions in related forum and you will surely get some help!

nav33n 472 Purple hazed! Team Colleague Featured Poster

No.

nav33n 472 Purple hazed! Team Colleague Featured Poster

lol !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Hello fellow Pinoy,I'm from Cavite.Welcome to Daniweb!and also hello to you technogeek!Anyway,
what does OP mean?

OP = Original Poster.

nav33n 472 Purple hazed! Team Colleague Featured Poster

"The OP started this thread almost 2 yrs ago. "
And So?

So, the chances of you getting OP's e-add and cp # is very less.

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome !

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) Welcome to Daniweb Cal !

nav33n 472 Purple hazed! Team Colleague Featured Poster

can i get ur e-add and ur cp #

The OP started this thread almost 2 yrs ago.

nav33n 472 Purple hazed! Team Colleague Featured Poster

You need to post this question in javascript forum. I am sure you ll get better help there.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Thanks for your welcome. There is a lot of similarity between coding and marathoning, such as keeping going when it seems impossible. As the Tee shirt from the last London marathon says " You see impossible I saw the finish line'. May you always reach the final line and show impossible is nothing.

:) exactly ! We need to have that 'don't give up' attitude to be successful !

nav33n 472 Purple hazed! Team Colleague Featured Poster

mysql is not configured. Install WAMP. You dont have to configure anything in it(and ofcourse, it will execute any php/mysql script !)

nav33n 472 Purple hazed! Team Colleague Featured Poster

I really have no clue how you can 'sort by name' when you upload an image using html file upload. What you can do is, when fetching the images from ftp, you can put all the names in an array and use sort function to sort the array.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Well, I guess your server is a linux box. I dunno bout linux since I work on windows. And you can do a simple test this way.

<?php
$connection=mysql_connect("hostname","username","password");
echo $connection;
?>

If it prints a resource id, then you can connect to mysql. Another way to check if mysql is configured is, by using phpinfo function.

<?php
phpinfo();
?>

run this script. Search for mysql. If it says, mysql support enabled, then mysql is configured.

:)

iamthwee commented: C:\PHP\ext\ - does that look like a typical linux path? No. -2
nav33n 472 Purple hazed! Team Colleague Featured Poster

When you upload an image to the server, you can connect to your server through ftp, right click and arrange the files by name. What difference will it make anyway ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

Explain your problem in detail. What do you mean by filename and foldername it doesnt array A-Z,0-9 ? Also, when posting your code, put it in [/code ] tags.[code =php][/code ] tags.

nav33n 472 Purple hazed! Team Colleague Featured Poster

$sql="INSERT INTO $tbl_name VALUES('$pid','$kid', '$pemri', '$pnjm', '$psasia', '$pcmimi', '$pfoto', '$pverejtje'");

You got the " at the wrong place!

$sql="INSERT INTO $tbl_name VALUES('$pid','$kid', '$pemri', '$pnjm', '$psasia', '$pcmimi', '$pfoto', '$pverejtje')";
nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb! lol.. We aren't geeks(well, not me atleast! :P )

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

You should post this question in html and css forum.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Yeah. Its for debugging. And I have no clue why your query doesn't work..

dani190 commented: Awesome help, helped me through the creation of a program. Allowed me to learn a lot also... +1
nav33n 472 Purple hazed! Team Colleague Featured Poster

Yep.. well, you use die to print out the message on failure. mysql_query($query) or die("your own message..."); This will execute your query. If it encounters any error, it will stop the terminate the execution of the script and print the message of die function.

nav33n 472 Purple hazed! Team Colleague Featured Poster
$query="UPDATE grads SET vote_status = 1 WHERE USER_ID ='".$_POST['user_id']."'" or die(mysql_error());

You should have "die" function while using mysql functions and not in query itself.

nav33n 472 Purple hazed! Team Colleague Featured Poster

I can't think of anything else. It should work then.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

print the query. Check if $_POST has any value. You can you die function to check if your query is working fine! mysql_query($query) or die(mysql_error());

nav33n 472 Purple hazed! Team Colleague Featured Poster

have another column in the table. call it "voted" or something, with default value 0. Whenever a user votes, while updating the column vote_status, also update the column "voted" by setting to 1. So, if it is 0, then that particular user has not voted. If its 1, then he has already voted.
And I don't know what's wrong with your query. Looks fine to me.

nav33n 472 Purple hazed! Team Colleague Featured Poster

I've been using HTML-kit for some time and have been happy with it.

hmm.. This looks really good ! It even has alot of plugins ! eh ? :) thanks!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Great! :) Read more, Learn more!

nav33n 472 Purple hazed! Team Colleague Featured Poster

lol.. Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

huh. Dell users are having alot of problems nowadays!
Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

It's my understanding that if the file type is not .php (or one of it's variations) the php parser doesn't get invoked on the web server so the code gets treated like any other content and is displayed.

Right. You can edit your .htaccess file to parse html file as a php file. Check this link.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Cucumber is good to eat !

nav33n 472 Purple hazed! Team Colleague Featured Poster

When the user logs in, start the session, add his name to a session variable.
Eg.

<?php    //page1.php
session_start();
$_SESSION['name']="testuser"; //user name
?>

<?php //page2.php
session_start();
echo $_SESSION['name']; //prints testuser
?>
nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb David ! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

This might help. My suggestion is to use WAMP or XAMPP . It configures everything for you!

nav33n 472 Purple hazed! Team Colleague Featured Poster

umm.. If its selecting the database, then why did you get that error

Warning: Cannot modify header information - headers already sent by
(output started at C:\inetpub\wwwroot\cms\core\db.php:13) in C:\inetpub\wwwroot\cms\index.php on line 20

Why don't you try a simple example ?

<?php
$username='username';
$password='pword';
$hostname='host';
$databasename='db_name';
$create='off';
$prefix='';

//database conection

$connection = mysql_connect($hostname, $username, $password) or die("<p>Unable to connect to the database server at this time.</p>". mysql_error());
$x=mysql_select_db($databasename) or die("<p>Unable to locate the [". $databasename ."] at this time</p>". mysql_error());
echo $x;
?>

Just execute this code and tellme if it returns 1.


Edit: Hey ! remove ob_start and ob_flush.

<?php
$username='username';
$password='pword';
$hostname='host';
$databasename='db_name';
$create='off';
$prefix='';$connection = @mysql_connect($hostname, $username, $password) or die("<p>Unable to connect to the database server at this time.</p>". mysql_error());
@mysql_select_db($databasename) or die("<p>Unable to locate the [". $databasename ."] at this time</p>". mysql_error());
?>

Replace your db.php with this one (or remove //database conection) and try again !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Did you check whether its selecting the database ? I think you got a problem there.

nav33n 472 Purple hazed! Team Colleague Featured Poster
$connection = @mysql_connect($hostname, $username, $password) or die("<p>Unable to connect to the database server at this time.</p>". mysql_error());
@mysql_select_db($databasename) or die("<p>Unable to locate the [". $databasename ."] at this time</p>". mysql_error());

Remove @ before mysql queries. I guess your script is having problems selecting the database. C:\inetpub\wwwroot\cms\core\db.php:13 << That says, line 13 has started outputting already. You either buffer up the output by using ob_start() as the first line of your code, right after <?php and as the last line, have ob_flush(). Most people wont do this because its an unnecessary server load. Do these things.
Remove @ in db.php . Check if its selecting the database. Secondly, (as i said in my earlier post) don't output anything before header function.

nav33n 472 Purple hazed! Team Colleague Featured Poster

You forgot to post index.php. But anyway, here is a suggestion for you. Dont have any html tags, or echo statements (not even a blank space) before calling header function or before starting a session. I guess, in index.php, you are echoing something or you have html tags in it.

P.S: Next time you post your code, please use [/code ] tags.[code ] [/code ] tags.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Dev-php Open source, free editor. I haven't used the ftp option in it. But you should give it a try ! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb!