Pelican Parts Forums

Pelican Parts Forums (http://forums.pelicanparts.com/)
-   Off Topic Discussions (http://forums.pelicanparts.com/off-topic-discussions/)
-   -   Anyone using MyPhpAdmin with Dreamweaver? (http://forums.pelicanparts.com/off-topic-discussions/423211-anyone-using-myphpadmin-dreamweaver.html)

rattlsnak 08-02-2008 11:44 PM

Anyone using MyPhpAdmin with Dreamweaver?
 
I have questions about uploading a MySQL database to my remote server through Dreamweaver. I'm using DW8 with XP, and MyPhpAdmin. I've built my databases in MySQL (through the MyPhpAdmin on my local machine)and setup the local testing server through DW site management and everything works fine. The question is how do I upload the database to the remote server? I have copied and pasted the folder from the Php directory into my root site folder and uploaded it through DW to the server and verified it is there, but it will not work. Apparantly not the right way to do it! Can anyone tell me what I'm doing wrong? I'm guessing its something to do with the Export function, but not sure which way to go about that.

Thanks!

HardDrive 08-02-2008 11:48 PM

Arg....there is path issue here somewhere...sorry, not enough of developer to know where.....

stomachmonkey 08-03-2008 07:48 AM

In PHPAdmin export the local DB and in admin on the server import it.

DW is not necc.

rattlsnak 08-03-2008 10:55 AM

OK, I figured it was somewhere in that function. In what format? CSV, or what? And i dont see an import function on my server side admin page,. hmm, I see an upload file, but not import.

stomachmonkey 08-03-2008 11:14 AM

Quote:

Originally Posted by rattlsnak (Post 4098834)
OK, I figured it was somewhere in that function. In what format? CSV, or what? And i dont see an import function on my server side admin page,. hmm, I see an upload file, but not import.

You should have an option to export as SQL among other things.

http://forums.pelicanparts.com/uploa...1217787027.jpg

Then hit the little House or SQL icon(depending on your interface)

And Import File. Upload is generally interchangeable with Import.


http://forums.pelicanparts.com/uploa...1217787073.jpg

It should automagically parse the format.

Create the DB instance without tables on your server first so you can set user/pass privileges before importing. Use same user/pass as you did for the local.

rattlsnak 08-03-2008 02:51 PM

pm sent

stomachmonkey 08-03-2008 02:58 PM

Quote:

Originally Posted by rattlsnak (Post 4099175)
pm sent

got it

rattlsnak 08-03-2008 09:54 PM

ok, got all that figured out so far. MANY thanks to Scott! Only issue left is the database linking to the login page in Dreamweaver. So, I need a DW expert now!

See below:
I have built a dynamic site with a login .php page. I have uploaded the MySQL database through MyAdminPhp to my server.
Question is: How do I link my database for user authentication to my login page? When i try it on WAMP (localhost) it works fine, but will not work through the server side. I'm assuming this is because when I setup the script, it asks me where the database is, and I can find it locally, so I think the link is broken to my server side because it doesnt know where/what database to search for? My host does not allow server side remote testing so i cant go that route. So, how do i tell my server behavior of my login page to go to the right place?

Thanks..

slodave 08-04-2008 12:29 AM

Have you checked the MySQL connect line:

mysql_connect("server","username","password")

"server" can be an I.P. address, domain name, localhost.

Dave

rattlsnak 08-04-2008 11:03 AM

Dave, PM sent

stomachmonkey 08-04-2008 11:41 AM

Hey Mark,

Send me the html file.

You have the email.

slodave 08-04-2008 12:47 PM

Hi Marc,

I talked with stomachmonkey and read your PM. I have a couple of things to do and eat lunch. I'll call a little late, but if you read this, send me a PM with a link I can view. Does not matter if it is broken.

Dave

rattlsnak 08-04-2008 01:11 PM

Sent

slodave 08-04-2008 06:51 PM

I wrote two php/mysql scripts. They should be pretty plug and play for you. There is one little thing left for me to do and then I will email you a link so that you can check it out. I will also email you the code.

Time to go to the park for a quick 5 mile rollerblade. Will finish when I get back.

Dave

slodave 08-04-2008 09:38 PM

Update:

Looks like things are working now. I sent some bits of code to Marc and he did his own searching online as well. Now he has some clean up coding to do.

FYI - Here's the scripts that I wrote this afternoon...

admin.html:
PHP Code:

<HTML>

<
HEAD>
<
TITLE>Test MySQL/PHP login page</TITLE>
</
HEAD>

<
BODY>

<
FORM METHOD=POST ACTION="verify.php">
Username: <INPUT TYPE=TEXT NAME="var_un"><BR />
Password: <INPUT TYPE=PASSWORD NAME="var_pw"><BR />
<
INPUT TYPE=SUBMIT NAME=login VALUE=Login>
</
FORM>
</
BODY>
</
HTML

---------------------------------------
verify.php
PHP Code:

<?php
//include("db_connect.inc");
 
mysql_connect("SERVER","test_username","test_password") or
                die (
"could not connect to database");
        
mysql_select_db("test_db") or
                die (
"Ack!");

if (isset(
$_POST['login'])) {

// Check to see if both fields are filled in.
        
if(!$_POST['var_un'] | !$_POST['var_pw']) {
                die(
'You did not fill in a required field.');
        }
                
$check mysql_query("SELECT * FROM info WHERE username = '".$_POST['var_un']."'")or die('Error');

// Error if user dosen't exist
        
$check2 mysql_num_rows($check);
        if (
$check2 == 0) {
                die(
'That user does not exist in our database. <a href=admin.html>Try Again.</a>');
        }
        while(
$info mysql_fetch_array$check ))
        {
        
$_POST['var_pw'] = stripslashes($_POST['var_pw']);
        
$info['password'] = stripslashes($info['password']);
        
$_POST['var_pw'] = $_POST['var_pw'];

// Error if the password is wrong
        
if ($_POST['var_pw'] != $info['password']) {
                die(
'Incorrect password, please try again.');
        } else {

// If all is good, then redirect them to the members area
        
header("Location: members.php");
        }
        }
        }else{
// If user tries to access this page directly, redirect.
// print "You must login first<BR />";
// print "please visit - <A HREF=\"admin.html\">login</A>";
header("Location: admin.html");
}

?>

----------------------------------------------------
members.php *No error checking on this little test page* :rolleyes:
PHP Code:

<HTML>
<
HEAD>
<
TITLEMembers only!</TITLE>
</
HEAD>

<
BODY>
Welcome to the members area!
</
BODY>
</
HTML

Dave

rattlsnak 08-05-2008 06:20 PM

Thanks to Scott and Dave for the help! You guys definetly pointed me in the right direction. The site is up and running, and correctly I might add!

At one point I thought I was going to lose it when I had one teeny weeny simple syntax error that kept the whole script from running. After a two hour hunt, I found it... Yes, I apparantly made the holy grail of mistakes.

You see I used a '{' instead of a '[' in one of the lines! :rolleyes:

stomachmonkey 08-05-2008 06:33 PM

Awesome.

slodave 08-05-2008 06:49 PM

Hi Marc,

I got your voicemail. I'm glad it's all working. Yes, coding can be frustrating, especially when it's the tiniest of errors and an error you have looked at for two hours but still don't see. I had that happen to me last night. One letter was missing on a variable and even though I kept staring right at it, I still did not notice.

It's rewarding when it all works in the end though!

Dave


All times are GMT -8. The time now is 12:43 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0
Copyright 2025 Pelican Parts, LLC - Posts may be archived for display on the Pelican Parts Website


DTO Garage Plus vBulletin Plugins by Drive Thru Online, Inc.