It is currently Fri Mar 29, 2024 6:13 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 21 posts ] 
Author Message
 Post subject: Help - so confused :(
PostPosted: Wed May 24, 2006 1:12 am 
Noobie
Noobie

Joined: Wed May 24, 2006 12:26 am
Posts: 27
I am a total n00b. I am looking to learn php, but well, ime struggling at only the setting up stage :( I've looked around at many sites on the net, most aren't very helpful. Anyway, i've finally found one, that is also about the sort of thing i am looking to do: http://webmonkey.wired.com/webmonkey/pr ... rial4.html There it is. But i am unable to carry at a step at the bottom of this page. "Copy and paste the following text to a file and save it in MySQL's bin directory." I've read many articles on the internet, but i haven't really found anything that sums it all up...how everything is connected together..it doesn't make much sense on it's own, is confusing as hell... :( What is this bin thing? do i have to make it myself? help? :(

Basically, what i am looking to make is, a very simple table - just one vertical column - a list of names - with 2 boxes at the bottom, one for adding names, and the other for removing names. I dont care about formatting. I just want it to do this very simple function. I like to understand code that I use. Can anyone recommend anywhere that i might be able to learn about this sort of thing?

Thank you

Shears :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 24, 2006 2:30 am 
I have no life!
I have no life!

Joined: Sun Feb 13, 2005 6:12 pm
Posts: 1504
Location: My Office
Greetings,

Well, I didn't fully read that tutorial from the link you posted. But, this should not be too hard.

Here are a couple little things to do:
1. First of all, create your table and stuff exactly how you want it to appear.
2. After doing that, check out the MySQL website - www.mysql.com - and learn what you need to do for your database table. (I am true fan of Open Source Developing, although, instead of giving you exactly what to do, I will lead you to it.)
3. Then use the PHP site - www.php.net - and learn exactly what kind of code, functions and etc. you are going to need to develop to fetch the information from the database to display it in the table, then how to add and delete a user out of the database.
4. Remember, for editing your DB, use the phpMyAdmin. :D :wink:

If you need anymore help with any code or anything, just ask. :D

_________________
Best Regards:
Aaron McGowan (aka: CyberGeek, =cipher=)

CyberGeek's Software Solutions
-- WWW: http://www.cybergeeksoftware.com
-- Tech Line: 1-519-860-4557
-- Email: cybergeek@cybergeeksoftware.com


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 24, 2006 11:23 pm 
Noobie
Noobie

Joined: Wed May 24, 2006 12:26 am
Posts: 27
No offense intended here... It's all very well saying "check out the MySQL website", "use the PHP site" These are big sites...i dunno where to start. I am a n00b. I can see how they could be useful as reference, when people become more experienced, but not when they are trying to learn from the very beginning.

Several places have recommended reading this for beginning. It seems very good in most places, but as usual with these things, at the critical points it can be quite vague :( I am unable to set up the database. Certain things it says to do simply do not coresspond to the options available in phpMyAdmin. :(

I would really like someone to tell me directly, or tell me of some place i can go read, about how everything links together... i need the bigger picture descibed. Help? :( :(

Thank you,
Shears


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 24, 2006 11:44 pm 
Noobie
Noobie

Joined: Wed May 24, 2006 12:26 am
Posts: 27
I'm looking at the contents list... Nothing means anything to me, so i have no idea where to start, and which parts are important. I hope you're not saying that i should read through that manual from start to finish? :roll: help :(


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 25, 2006 1:38 am 
Noobie
Noobie

Joined: Wed May 24, 2006 12:26 am
Posts: 27
The link i posted to here is alot better than php.net if you dont actually already have much programming knowlegde. I am not a geek, but i am defefinetely not dumb either, but just some of the stuff on the php.net site arghh...is just really confusing, no matter how slowly and carefully I read over.it. I'm not talking about what i've read since my last post...i've read great sections of php.net previously to coming here.

Earlier i was looking at MySQL. I atempt to follow a several guides reading some very basic setups. In the phpAdmin, in the SQL query, i type
"mysql> SHOW DATABASES;"

but i just get some error (yeah i know some lame n00b error cos ime a n00b and not doing things right and just rushing in)...

MySQL said: Documentation
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql> SHOW DATABASES' at line 1

Hmm..well that command isn't even shown manual on the mysql.com site and well... Yes i did set up a database.

This isn't my first day or week or even month at attempting php and mysql...i just arhghgh...it's so frustrating...i dont seem to be getting anywhere and just making myself look like even more of a n00b...if that's actually possible :( help? :(

Shears


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 25, 2006 6:44 pm 
Noobie
Noobie

Joined: Wed May 24, 2006 12:26 am
Posts: 27
I have no idea what CLI is :(

Hmm. The php manual. Well I'm guessing i can skip the Installation and Configuration part. I guess i will ask some n00bish questions...

Converting to boolean http://www.php.net/manual/en/language.types.boolean.php

To explicitly convert a value to boolean, use either the (bool) or the (boolean) cast. However, in most cases you do not need to use the cast, since a value will be automatically converted if an operator, function or control structure requires a boolean argument.

wtf does that mean? "use either the (bool) or the (boolean) cast." Use? Use where? what do they do? what does "cast" mean?

What is the difference between echo() or print()? http://www.php.net/manual/en/language.basic-syntax.php

php.net is confusing if you dont know anything much/at all about any type of programming. :( arhg...this is useless :( i got no clue about anything :(


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 25, 2006 10:57 pm 
Noobie
Noobie

Joined: Wed May 24, 2006 12:26 am
Posts: 27
"To explicitly convert a value to boolean, use either the (bool) or the (boolean) cast." what is the bool cast? why might i want to use it? what is the boolean cast? why might i want to use that? infact, what is cast??? Am i right in guessing that boolean and boolean cast are different things. Is this cast thing just a really minor point? i dont know? how am i meant to know which parts are important? how am i meant to know anything? help :( This manual clearly assumes you have some previous programming knowledge, which i, as you can see, do not :(


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 25, 2006 11:16 pm 
Noobie
Noobie

Joined: Wed May 24, 2006 12:26 am
Posts: 27
This manual clearly assumes you have some previous programming knowledge, which i, as you can see, do not :( Do you happen to know any places that explain php from the beginning... -_-


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 25, 2006 11:35 pm 
Posts like crazy!
Posts like crazy!

Joined: Mon Sep 26, 2005 5:03 pm
Posts: 204
Location: The Netherlands
lol Psycho don't be a meany :)

Maybe some of the tutorials on www.phpfreaks.com are something. Try this one http://www.phpfreaks.com/tutorials/37/0.php for a starter.

BTW. Casts are of no concern for you, they aren't that important right now.
And there isn't really much difference between print() and echo(). So just use one you like.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 26, 2006 12:17 am 
Noobie
Noobie

Joined: Wed May 24, 2006 12:26 am
Posts: 27
Thank you Revaroo. I will have a look at that :)

My point was PsychoticDude85, that when reading through that php.net manual, i have no idea of gauging what is important and what isn't. The cast thing that i was unsure of just illustrated that fact. I dont beleive it is very good for beginer learning, especially if you are not familiar with any other programming language, like i am not.

PsychoticDude85, earlier, you seemed to imply there is a difference between SQL and MySQL. If so, what is this difference? In the Admin Control Panel, the two words seem to be used interchangeably. See here. If they are different, why does clicking on either one take me to the same page? If they are the same, why are they named differently...to intetionally confuse people like me? That last question was not at you you PsychoticDude85, but at 100webspace...

[ I had to host that image at photoshop, as yet again, I am unable to log into my site's control panel - the login page simply will not load! :( ]


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 26, 2006 1:44 am 
Noobie
Noobie

Joined: Wed May 24, 2006 12:26 am
Posts: 27
I'm back ;) I found, what looks like, a nice little PHP/MySQL Tutorial here.

I made the table, and got this error. No idea what it mean... I followed the iinstructions as carefully as i could.
#1075 - Incorrect table definition; There can only be one auto column and it must be defined as a key

Part 3 - Inserting Information: It doesn't actually say where to write this. In a php file? Well anyway, that's what i tried...
$username="username";
$password="password";
$database="your_database";
Oh *sighs* another problem. What is my username? Does it mean the username i use to login to my site's control panel from here? I tried that and it didn't work. :( If i look in the Control Panel, if i look at MySQL Databasses, there is a heading "DataBase Name / DataBase Username" So maybe the database name and the username are the same? But i tried that and it didn't work either. :cry: Though maybe i shouldn't be trying them by putting them into a php file... i dunno any of this :cry:


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 26, 2006 3:52 am 
Posts like crazy!
Posts like crazy!

Joined: Sun Jun 05, 2005 10:34 pm
Posts: 452
Location: Indiana
I'm pretty much a noob myself but I know how to do a phpbb installation and install every php/mysql script ever, drop tables and manage a site by using other people's stuff. Everything that is PHP and MYSQL is confusing to me. I know a little bit of php. Some say its easy but I still do not understand whats going on. :P I'll try some references but people have to explain every detail to me or I wont get it at all. Its just that confusing to me. :)

_________________
Image
Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 26, 2006 5:09 am 
Noobie
Noobie

Joined: Wed May 24, 2006 12:26 am
Posts: 27
Could someone help me please with connecting to the database....
$username="username";
$password="password";
$database="your_database";
I don't know what values to use :(

Thank you

Shears :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 26, 2006 6:58 am 
Noobie
Noobie

Joined: Wed Feb 16, 2005 5:24 pm
Posts: 20
Location: Bulgaria BG
Hi Shears an All :),

here are the values that you should use in order for your scripts to be able to connect to the MySQL database:

$username="username"; - this is the same as your databse's name - you can take a look at it from either the Manage SQL Databases or from the PHP MyAdmin sections in your control panel
$password="password"; - here you need to put the password which you chose when you created the database
$database="your_database"; - just take a look at the afore-mentioned database username solution

Oh, and by the way the datbase host which your script has to use is also displayed in the Manage SQL Databses section (right underneath the list of your active datbases).

You shoud be ok now ;).

_________________
The world is set ablaze,
brimstone fills the heavens,
reflected by the grace of the scarlet see,
with crimson shimmering in the melted horizon.
As the red sun rises in its majestic glaring crown,
forever fades away ....


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 26, 2006 9:58 am 
Posts like crazy!
Posts like crazy!

Joined: Sun Jun 05, 2005 10:34 pm
Posts: 452
Location: Indiana
If it says host its not localhost. Its where your control panel is located at for managing your site. Say, if my control panel for my site is at 100webcustomers.com The Host is 100webcustomers.com Also, as he says, the database username and name are the same. Make sure you look for the database name in the control panel and create a database before you install your script. Of course, create your database then look for the name of your database.

_________________
Image
Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 26, 2006 5:31 pm 
Noobie
Noobie

Joined: Wed May 24, 2006 12:26 am
Posts: 27
$username="username";
$password="password";
$database="your_database";
mysql_connect(70.85.132.34,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

In the Help Centre, under SQL database, it says "MySQL Host: your server name (this is the server listed in the Manage SQL Databases section of your web hosting control panel)" Well, quite simply, it is not listed there. There is no server listed there at all!

I did my best to fill in the values, and got..

Parse error: parse error in /home/www/mydomain.com/php/database/database.php on line 7

Line 7 is:
mysql_connect(70.85.132.34,$username,$password);

I'm not sure what host to write. In phpmyadmin, right at the top, it says,
Server: mybesthost.com
I thought maybe that was it but it seems not
Then i look in Server Information in the normal CP. It says:
MySQL host/server : 70.85.132.34
Maybe i am supposed to write in that IP? That didn't work either. :( Then again maybe i have my username wrong. Can i get this confirmed.
$username="username";
$password="password";
$database="your_database";
Should i write the same for username and for database? And should i write for this the name of the database? I tried that and it didn't work :cry: Why is this whole thing so non n00b friendly? :( :(

This is entire thing was made worse, by the fact that, from the normal CP, there are now no databases listed in SQL databases, despite the fact that i created one last night. *Sighs. :( If i try to enter phpmyadmin from the CP, i just get a white screen. Maybe somehow i deleted my database? However, i looked through my broswer history and was able to find the link to login to phpmyadmin. When I logged in, the database i created yesterday was still shown. Does anyone know why there has been just a white screen when i click on phpmyadmin in the CP??

Help? :cry: Thank you

Shears


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 22, 2006 11:30 pm 
Noobie
Noobie

Joined: Wed May 24, 2006 12:26 am
Posts: 27
Shears wrote:
PsychoticDude85, earlier, you seemed to imply there is a difference between SQL and MySQL. If so, what is this difference? In the Admin Control Panel, the two words seem to be used interchangeably. See here. If they are different, why does clicking on either one take me to the same page? If they are the same, why are they named differently...to intetionally confuse people like me?
anyone?

Thanks ^^


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 22, 2006 11:46 pm 
Noobie
Noobie

Joined: Wed May 24, 2006 12:26 am
Posts: 27
Yes PsychoticDude85, you did say they are different and thank you for expalining how they differ. However my question was more of a question to 100 Web Space i guess. Why is MySQL used in one place, and SQL used in another? They point to the same place, so surely one is not correctly named? Besides, If MySQL and SQL can be thought of as the same in this respect, i wonder why 100 Web Space felt the need to interchange between the two names. Are they dileberately trying to be confusing?

Shears


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 23, 2006 4:58 am 
I have no life!
I have no life!

Joined: Sun Feb 13, 2005 6:12 pm
Posts: 1504
Location: My Office
Greetings,

Shears, where abouts are you seeing this?

_________________
Best Regards:
Aaron McGowan (aka: CyberGeek, =cipher=)

CyberGeek's Software Solutions
-- WWW: http://www.cybergeeksoftware.com
-- Tech Line: 1-519-860-4557
-- Email: cybergeek@cybergeeksoftware.com


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 23, 2006 5:09 am 
Noobie
Noobie

Joined: Wed May 24, 2006 12:26 am
Posts: 27
http://img.photobucket.com/albums/v684/ ... /mysql.png


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 23, 2006 5:51 am 
Site Admin
Site Admin

Joined: Fri Feb 11, 2005 7:43 am
Posts: 1818
Location: 100WebSpace's Headquarters
MySQL and SQL is the same in the context of our control panel. I will suggest to our developers to use MySQL only in our control pane, sorry for the confusion.

_________________
Read the F.A.Q. before asking a question!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Moderators: fhmagic, KJ, Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
100WebSpace © 2011