
Digitry Designs
Members-
Posts
42 -
Joined
-
Last visited
Never
Everything posted by Digitry Designs
-
using md5 for database communication
Digitry Designs replied to Digitry Designs's topic in PHP Coding Help
No as it's one of the requirements for a hash-function. How do you MD5 these password's? Like: WHERE password = md5('$password'); Then your website is in danger as hacker's can use rainbow table's to retrieve a value that will match the MD5 stored in your database and it's best to use salt's like: WHERE password = md5( concat( password_salt, md5( '$password' ) ) ) The hacker now isn't able to use a rainbow table as the retrieved value wouldn't be correct. Thank you for your concern. I am not sure that it being required as a hash function answered my question or that maybe i did not understand it. Also I am a bit new with login scripting and so forth but here is what I have. <?php (((((my sql connect info)))))) function cleanString($string){ htmlentities(mysql_real_escape_string($string)); return $string; } if(!$_SESSION['username'] || !$_SESSION['password']){ $loggedIn = False; } else { $loggedIn = True; } <<<<<<<<this splits what is 2 files. Above is the session handler file, and the below is the login processing file.>>>>>>>>>> <there is an include_function here to include the above file> $username = cleanString($_POST['username']); $password = md5($_POST['password']); //If the fields are empty you must go back and fill them out if(empty($username) || empty($password)){ echo 'You must enter a username and password!'; } //lets compare the username to others in the database for a match else{ $sql = mysql_query("SELECT * FROM users WHERE username='$username'"); if(mysql_num_rows($sql) < 1){ echo 'That username does not exist.'; } //if we do have a username match, now we can compare the username password to see if it is a match as well else{ $sql2 = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password'"); if(mysql_num_rows($sql2) < 1){ echo 'Your password is incorrect.'; } //since everything worked out, lets log the user in else{ $_SESSION['username'] = $username; $_SESSION['password'] = $password; echo '<meta HTTP-EQUIV="REFRESH" content="0; url=mail.php">'; } } } ?> how do I make it more secure and how do I make it so i can log in? every time i try it says i put in the wrong password. Any ideas? Thank you for your help. -
Hello and thank you for reading. I am using the md5 statement to send passwords to the database and verifying and what not. I have used this same code in the past and I am simply migrating it to another database and site. So my question is, Does collation matter if I am using the md5 statement? Thank you in advance
-
how do I add mysql_error() to my code
Digitry Designs replied to Digitry Designs's topic in PHP Coding Help
Wow, Thank you so much JAY. that worked and helped alot!! I really appreciate the help! By the way, I have been looking, How do I mark this post resolved? -
how do I add mysql_error() to my code
Digitry Designs replied to Digitry Designs's topic in PHP Coding Help
That would imply that you change the "or die" statement so that it also contains a mysqli_error(). You have two "or die()" statements. Which one are you receiving the output from, that you need to troubleshoot? ok, I got it fixed. I is the query statement, not the connect statement. Well not fixed, I got the error. The error is: MYSQL ERROR: Duplicate entry '0' for key 'PRIMARY' How do I ascend the id number? -
how do I add mysql_error() to my code
Digitry Designs replied to Digitry Designs's topic in PHP Coding Help
Ok, so where would I put it exactly? If I put it in between the query and the or die statement, I get syntax error. If I put it after the or die statement, it doesnt run because the code stops at or die and parses the custom error? -
how do I add mysql_error() to my code
Digitry Designs replied to Digitry Designs's topic in PHP Coding Help
Thank you JAY. Unfortunately it does nothing more then parse what is already there before I add the mysqli_error($dbc) it just says MySQL Error: We are sorry, your email could not be sent at this time. Please try again in a few minutes Any ideas? -
hello and thank you again for reading. Here is my problem. I am trying to connect to the database and post information from a form. It doesnt seem to be working. I have logged into my db and verified db name and table name is correct. I have verified the password is correct. Another person here suggested to add "mysql_error()" to the "or die" statement. how do I do this. I guess what I am asking is what would it look like? I googled the issue and came up with one solution that shows the mysql_error statement to go immediately after the table insert statement like this: $query = "INSERT INTO mail (name, organization, phone, email, description) " . "VALUES ('$name', '$organization', '$phone', '$email', '$description')"; echo "MySQL Error:" . mysqli_error(); I am afraid this is incorrect because I get this: Warning: mysqli_error() expects exactly 1 parameter, 0 given in C:\xampp\htdocs\digitrydesigns\templates\pro\include\process_mail.php on line 14 MySQL Error:We are sorry, your email could not be sent at this time. Please try again in a few minutes This is the entire code: <?php $name = $_POST['name']; $organization = $_POST['organization']; $phone = $_POST['phone']; $email = $_POST['email']; $description = $_POST['description']; $dbc = mysqli_connect('localhost', 'root', 'nuv1420', 'digitry') or die('We are sorry, due to extensive server overload we were unable to process your mail.'); $query = "INSERT INTO mail (name, organization, phone, email, description) " . "VALUES ('$name', '$organization', '$phone', '$email', '$description')"; echo "MySQL Error:" . mysqli_error(); $result = mysqli_query($dbc,$query) or die('We are sorry, your email could not be sent at this time. Please try again in a few minutes'); mysqli_close($dbc); echo '<meta HTTP-EQUIV="REFRESH" content="0; url=../admin/digitrycms_panel.php">'; ?> Can someone please help me out. I really appreciate it in advance. Thank you.
-
Ok so I am trying to send information from a form to a data base. I keeps giving me an error, to be specific, the error for querying the database. Any suggestions? Thank you in advance. <?php $name = $_POST['name']; $organization = $_POST['organization']; $phone = $_POST['phone']; $email = $_POST['email']; $description = $_POST['description']; $dbc = mysqli_connect('localhost', 'root', 'password', 'my_database') or die('We are sorry, due to extensive server overload we were unable to process your mail.'); $query = "INSERT INTO mail (name, organization, phone, email, description) " . "VALUES ('$name', '$organization', '$phone', '$email', '$description')"; $result = mysqli_query($dbc,$query) or die('We are sorry, your email could not be sent at this time. Please try again in a few minutes'); mysqli_close($dbc); echo '<meta HTTP-EQUIV="REFRESH" content="0; url=../admin/digitrycms_panel.php">'; ?>
-
Thank you for your help, I ended up have to simply move the .swf file into the root folder. I changed several areas where the url may have been indicated but no luck. Thank you again. I will just call this one not resolved but fixed enough.
-
Hello and thank you for reading. Simply put, I am building my site and I currently have one page that "include_once();" several pages that hold the divs. ie <html> <head> <title></title> here are all my <link rel css/text href=template/css/main.css> <link rel css/text href=template/css/flash.css> and so on </head> <body> <?php include_once('header.php'); include_once('menu.php'); include_once('content.php'); include_once('login.php'); include_once('sidebar.php'); include_once('footer.php'); </body> <html> sorry for the crudness in code but i think you get my point. Now I want to click on a link from the menu and say only the content.php and sidebar.php would change without forcing the user to reload the page on every click of a link. Any ideas? Thank you in advance.
-
ok, so I fixed the double tag issuse and now I am getting the bgcolor of the <object> to show, but still no .swf file is being played. I change what I think is the url to flash/main.swf and ../flash/main.swf and just main.swf but still nothing but a bgcolor is displayed. the url where I changed it is in the embed src="flash/main.swf" ... correct? I really dont know what else to do.
-
It kind of worked. The swf is not playing, though it plays when I view it seperately. what i have is <html> <head> <title> </title> </head> <body> <?php include('header.php'); include('menu.php'); include('content.php'); include('login.php'); include('footer.php'); ?> </body> </html> then now on my content.php page I have what you said, <div id='content'> <div id='flash1'> <?php include('flash/main.html'); ?> </div> <p> a whole bunch of text here </p> </div> The main.html is a flash cs4 generated html file to display the swf <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>main</title> <script language="JavaScript" type="text/javascript"> <!-- //v1.7 // Flash Player Version Detection // Detect Client Browser type // Copyright 2005-2008 Adobe Systems Incorpora ted. All rights reserved. var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false; function ControlVersion() { var version; var axo; var e; // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry try { // version will be set for 7.X or greater players axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); version = axo.GetVariable("$version"); } catch (e) { } if (!version) { try { // version will be set for 6.X players only axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); // installed player is some revision of 6.0 // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29, // so we have to be careful. // default to the first public version version = "WIN 6,0,21,0"; // throws if AllowScripAccess does not exist (introduced in 6.0r47) axo.AllowScriptAccess = "always"; // safe to call for 6.0r47 or greater version = axo.GetVariable("$version"); } catch (e) { } } if (!version) { try { // version will be set for 4.X or 5.X player axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); version = axo.GetVariable("$version"); } catch (e) { } } if (!version) { try { // version will be set for 3.X player axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); version = "WIN 3,0,18,0"; } catch (e) { } } if (!version) { try { // version will be set for 2.X player axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); version = "WIN 2,0,0,11"; } catch (e) { version = -1; } } return version; } // JavaScript helper required to detect Flash Player PlugIn version information function GetSwfVer(){ // NS/Opera version >= 3 check for Flash plugin in plugin array var flashVer = -1; if (navigator.plugins != null && navigator.plugins.length > 0) { if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) { var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : ""; var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description; var descArray = flashDescription.split(" "); var tempArrayMajor = descArray[2].split("."); var versionMajor = tempArrayMajor[0]; var versionMinor = tempArrayMajor[1]; var versionRevision = descArray[3]; if (versionRevision == "") { versionRevision = descArray[4]; } if (versionRevision[0] == "d") { versionRevision = versionRevision.substring(1); } else if (versionRevision[0] == "r") { versionRevision = versionRevision.substring(1); if (versionRevision.indexOf("d") > 0) { versionRevision = versionRevision.substring(0, versionRevision.indexOf("d")); } } var flashVer = versionMajor + "." + versionMinor + "." + versionRevision; } } // MSN/WebTV 2.6 supports Flash 4 else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4; // WebTV 2.5 supports Flash 3 else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3; // older WebTV supports Flash 2 else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2; else if ( isIE && isWin && !isOpera ) { flashVer = ControlVersion(); } return flashVer; } // When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) { versionStr = GetSwfVer(); if (versionStr == -1 ) { return false; } else if (versionStr != 0) { if(isIE && isWin && !isOpera) { // Given "WIN 2,0,0,11" tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"] tempString = tempArray[1]; // "2,0,0,11" versionArray = tempString.split(","); // ['2', '0', '0', '11'] } else { versionArray = versionStr.split("."); } var versionMajor = versionArray[0]; var versionMinor = versionArray[1]; var versionRevision = versionArray[2]; // is the major.revision >= requested major.revision AND the minor version >= requested minor if (versionMajor > parseFloat(reqMajorVer)) { return true; } else if (versionMajor == parseFloat(reqMajorVer)) { if (versionMinor > parseFloat(reqMinorVer)) return true; else if (versionMinor == parseFloat(reqMinorVer)) { if (versionRevision >= parseFloat(reqRevision)) return true; } } return false; } } function AC_AddExtension(src, ext) { if (src.indexOf('?') != -1) return src.replace(/\?/, ext+'?'); else return src + ext; } function AC_Generateobj(objAttrs, params, embedAttrs) { var str = ''; if (isIE && isWin && !isOpera) { str += '<object '; for (var i in objAttrs) { str += i + '="' + objAttrs[i] + '" '; } str += '>'; for (var i in params) { str += '<param name="' + i + '" value="' + params[i] + '" /> '; } str += '</object>'; } else { str += '<embed '; for (var i in embedAttrs) { str += i + '="' + embedAttrs[i] + '" '; } str += '> </embed>'; } document.write(str); } function AC_FL_RunContent(){ var ret = AC_GetArgs ( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" , "application/x-shockwave-flash" ); AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs); } function AC_SW_RunContent(){ var ret = AC_GetArgs ( arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000" , null ); AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs); } function AC_GetArgs(args, ext, srcParamName, classid, mimeType){ var ret = new Object(); ret.embedAttrs = new Object(); ret.params = new Object(); ret.objAttrs = new Object(); for (var i=0; i < args.length; i=i+2){ var currArg = args[i].toLowerCase(); switch (currArg){ case "classid": break; case "pluginspage": ret.embedAttrs[args[i]] = args[i+1]; break; case "src": case "movie": args[i+1] = AC_AddExtension(args[i+1], ext); ret.embedAttrs["src"] = args[i+1]; ret.params[srcParamName] = args[i+1]; break; case "onafterupdate": case "onbeforeupdate": case "onblur": case "oncellchange": case "onclick": case "ondblclick": case "ondrag": case "ondragend": case "ondragenter": case "ondragleave": case "ondragover": case "ondrop": case "onfinish": case "onfocus": case "onhelp": case "onmousedown": case "onmouseup": case "onmouseover": case "onmousemove": case "onmouseout": case "onkeypress": case "onkeydown": case "onkeyup": case "onload": case "onlosecapture": case "onpropertychange": case "onreadystatechange": case "onrowsdelete": case "onrowenter": case "onrowexit": case "onrowsinserted": case "onstart": case "onscroll": case "onbeforeeditfocus": case "onactivate": case "onbeforedeactivate": case "ondeactivate": case "type": case "codebase": case "id": ret.objAttrs[args[i]] = args[i+1]; break; case "width": case "height": case "align": case "vspace": case "hspace": case "class": case "title": case "accesskey": case "name": case "tabindex": ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1]; break; default: ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1]; } } ret.objAttrs["classid"] = classid; if (mimeType) ret.embedAttrs["type"] = mimeType; return ret; } // --> </script> </head> <body bgcolor="#001646"> <!--url's used in the movie--> <!--text used in the movie--> <!-- Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! Welcome to Digitry Designs! Please feel free to cruise through our portfolio and send us an email! --> <!-- saved from url=(0013)about:internet --> <script language="JavaScript" type="text/javascript"> AC_FL_RunContent( 'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0', 'width', '329', 'height', '300', 'src', 'main', 'quality', 'high', 'pluginspage', 'http://www.adobe.com/go/getflashplayer', 'align', 'middle', 'play', 'true', 'loop', 'true', 'scale', 'showall', 'wmode', 'window', 'devicefont', 'false', 'id', 'main', 'bgcolor', '#001646', 'name', 'main', 'menu', 'true', 'allowFullScreen', 'false', 'allowScriptAccess','sameDomain', 'movie', 'main', 'salign', '' ); //end AC code </script> <noscript> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="329" height="300" id="main" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="false" /> <param name="movie" value="main.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#001646" /> <embed src="main.swf" quality="high" bgcolor="#001646" width="329" height="300" name="main" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /> </object> </noscript> </body> </html> would this be because I am not using any kind of frames and I am calling another html file inside of an existing html file? i.e. <html> <head> <title> </title> </head> <body> <head> <title> </title> <script language="JavaScript" type="text/javascript"> a whole bunch of java script </script> </head> <body> <body> <script language="JavaScript" type="text/javascript"> </script> <object> <noscript> </object> </noscript>
-
Hell and thank you for reading. I am having a difficult time getting flash to show up. Here is what I have so far. Can anyone tell me what I am doing wrong? <?php echo "<div id='content'>" . "<div id='flash1'>" . include('flash/main.html'); echo "</div>" . "<p>" . "a whole bunch of text here" . "</div>"; ?>
-
Ok so I am experimenting with a lil sum sum right now. I need to find out if I need to use html or php to do what I want. I am trying to make a site extremely simple in all of its complexities. simple tree index.php | |______________________________________________ | | INCLUDE TEMPLATE/CSS | | |-home.php |-main.css |-header.php |-header.css |-menu.php |-menu.css |-login.php |-login.css |-content.php |-content.css |sidebar.php |-sidebar.css |footer.php |-footer.css on index.php here is what i have right now. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?php //include_once("include/analyticstracking.php") ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Web Design and Development</title> <link href="template/css/main.css" rel="stylesheet" type="text/css" /> <link href="template/css/header.css" rel="stylesheet" type="text/css" /> <link href="template/css/login.css" rel="stylesheet" type="text/css" /> <link href="template/css/menu.css" rel="stylesheet" type="text/css" /> <link href="template/css/content.css" rel="stylesheet" type="text/css" /> <link href="template/css/sidebar.css" rel="stylesheet" type="text/css" /> <link href="template/css/footer.css" rel="stylesheet" type="text/css" /> <link href="template/css/flash.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="container"> <?php include_once("include/header.php"); include_once("include/menu.php"); include_once("include/content.php"); include_once("include/login.php"); include_once("include/sidebar.php"); include_once("include/footer.php"); ?> </div> </body> </html> then on say header.php i used concatination and have this <?php echo "<div id='header'>" . "</div>"; ?> would this actually work using the main page to call up the css files then using php to include the file the uses that css file?
-
I am having some issues. I am using zen cart and need to change define('FOOTER_TEXT_BODY', 'Copyright © ' . date('Y') . ' <a href="' . zen_href_link(FILENAME_DEFAULT) . '" target="_blank">' . STORE_NAME . ' </a>. Powered by <a href="http://www.zen-cart.com" target="_blank">Zen Cart </a>'); to define('FOOTER_TEXT_BODY', 'Copyright © 2005 ' <a href="' . zen_href_link(FILENAME_DEFAULT) . '" target="_blank">' . STORE_NAME . ' </a>. Powered by <a href="http://www.zen-cart.com" target="_blank"> Zen Cart</a>'); but when I do and save the file, the entire site goes blank. Here is what I have <?php /** * @package languageDefines * @copyright Copyright 2003-2007 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: english.php 7440 2007-11-17 21:51:35Z drbyte $ */ // FOLLOWING WERE moved to meta_tags.php //define('TITLE', 'Zen Cart!'); //define('SITE_TAGLINE', 'The Art of E-commerce'); //define('CUSTOM_KEYWORDS', 'ecommerce, open source, shop, online shopping'); // END: moved to meta_tags.php define('FOOTER_TEXT_BODY', 'Copyright © ' . date('Y') . ' <a href="' . zen_href_link(FILENAME_DEFAULT) . '" target="_blank">' . STORE_NAME . ' </a>. Powered by <a href="http://www.zen-cart.com" target="_blank"> Zen Cart</a>'); // look in your $PATH_LOCALE/locale directory for available locales.. // on RedHat try 'en_US' // on FreeBSD try 'en_US.ISO_8859-1' // on Windows try 'en', or 'English' @setlocale(LC_TIME, 'en_US.ISO_8859-1'); define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'm/d/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY if (!function_exists('zen_date_raw')) { function zen_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } } } Thank you in advance for any help.
-
deleting specific rows from database with $_POST()
Digitry Designs posted a topic in PHP Coding Help
Ok, here is what i have. I am trying to use a form where user types out the name of something in the row. upon submit the row is deleted. User is not editing php so hardcoding wont work. I am able to delete all rows, but I want to delete just what was input into the form. Here is what i have <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("time_sheets", $con); $sql = "DELETE FROM jobs VALUES ('$_POST[jobs],$_POST[jobID]') "; echo "Row deleted!"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "Jobs updated"; mysql_close($con) ?> <html> <head> ...You are being redirected to the jobs update form. <meta http-equiv="refresh" content="1;url=list.php"> </head> <title>Jobs updated</title> </html> Any help is very apreciated! Thank you in advance! -
getting mysql warning can someone help?
Digitry Designs replied to Digitry Designs's topic in PHP Coding Help
Ok, I added the code but I am sure it is wrong cause I have errors. I am sorry that I am clueless and miserably frustrated. Here is my code from the members page. [ <?php $dl = "Download as <a href='xls.php'>.xls </a>file!"; echo $dl; // Connects to your Database //connect to the data base mysql_select_db("time_sheets") or die(mysql_error()); //get info and parse that info if (session_start()) { $usernameSQL = "select username from login where username = '".$_SESSION['username']."'"; } $query="SELECT * FROM employees WHERE $usernameSQL"; $result=mysql_query($query); $num=mysql_num_rows($result); mysql_close(); echo "<b><center>Database Output</center></b><br><br>"; $i=0; while ($i < $num) { $date=mysql_result($result,$i,"date"); $first=mysql_result($result,$i,"FirstName"); $last=mysql_result($result,$i,"LastName"); $job=mysql_result($result,$i,"JobName"); $timein=mysql_result($result,$i,"TimeIn"); $timeout=mysql_result($result,$i,"TimeOut"); $lunch=mysql_result($result,$i,"Lunch"); $total=mysql_result($result,$i,"TotalHours"); echo "<b>$date $first $last</b><br>$job $timein - $timeout Lunch (-$lunch)<br>Total hours for $date = $total<hr><br>"; $i++; } ?> Here is the code from the login page <?php // Connects to your Database mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("login") or die(mysql_error()); //Checks if there is a login cookie if(isset($_COOKIE['ID_my_site'])) //if there is, it logs you in and directes you to the members page { $username = $_COOKIE['ID_my_site']; $pass = $_COOKIE['Key_my_site']; $check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) { if ($pass != $info['password']) { } else { header("Location: members.php"); } } } //if the login form is submitted if (isset($_POST['submit'])) { // if form has been submitted // makes sure they filled it in if(!$_POST['username'] | !$_POST['pass']) { die('You did not fill in a required field.'); } // checks it against the database if (!get_magic_quotes_gpc()) { $_POST['email'] = addslashes($_POST['email']); } $check = mysql_query("SELECT * FROM users WHERE username = '".$_POST['username']."'")or die(mysql_error()); //Gives 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=registration.php>Click Here to Register</a>'); } while($info = mysql_fetch_array( $check )) { $_POST['pass'] = stripslashes($_POST['pass']); $info['password'] = stripslashes($info['password']); $_POST['pass'] = md5($_POST['pass']); //gives error if the password is wrong if ($_POST['pass'] != $info['password']) { die('Incorrect password, please try again.'); } else { // if login is ok then we add a cookie $_SESSION['userLogin'] = $_POST['username']; $_POST['username'] = stripslashes($_POST['username']); $hour = time() + 3600; setcookie(ID_my_site, $_POST['username'], $hour); setcookie(Key_my_site, $_POST['pass'], $hour); //then redirect them to the members area header("Location: members.php"); } } } else { // if they are not logged in ?> <form action="<?php echo $_SERVER['PHP_SELF']?>" method="post"> <table border="0"> <tr><td colspan=2><h1>Login</h1></td></tr> <tr><td colspan="2"> <?php $reg = "Not signed up? <a href='registration.php'>Register </a>here!"; echo $reg; ?> </td></tr> <tr><td>Last Name:</td><td> <input type="text" name="username" maxlength="40"> </td></tr> <tr><td>Password:</td><td> <input type="password" name="pass" maxlength="50"> </td></tr> <tr><td colspan="2" align="right"> <input type="submit" name="submit" value="Login"> </td></tr> </table> </form> <?php } ?> here is also a screen shot of what I have when sent to the members page. I am afraid though you will come back with something like, there is no way I can do what I want without learning a great deal more or paying someone to write it for me. lol I hope I am close. I do appreciate all your help even if you can no longer do so. Thank you. [attachment deleted by admin] -
Ok, so I have tried everything you said I think and still nothing different. Am I doing something wrong... or what am I doing wrong? <td width="60%"><?php mysql_connect("localhost", "root", "") or die(mysql_error()); $result = @mysql_query("SELECT jobs FROM time_sheets.jobs"); print "<select name=\"Jobs\">\n"; print "<option selected value=\"Select a Job\">Select A Job</option>\n"; while ($row = mysql_fetch_assoc($result)) { $jobs = $row['jobs']; print "<option value=$jobs[iD]>$jobs[jobs]</option>\n"; } print "</select>\n"; print "</p>\n"; ?></td> I even called my table and db like you said just so you know I am trying. lol I hope that is worth something for your help. I really do appreciate it. I feel that we are close in getting this solved. I have also added another ss from phpmyadmin. Are my tables set up correctly? [attachment deleted by admin]
-
i only have 1 column in my table called jobs. so now I have this print "<option value=$jobs[jobs]>$jobs[jobs]</option>\n"; and now it shows only the first letter of each job name but now my code looks like <table width="87%" border="0"> <tr> <td width="34%">Job Name:</td> <td width="60%"><?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("time_sheets") or die(mysql_error()); $result = @mysql_query("SELECT jobs FROM jobs"); print "<select name=\"JobName\">\n"; print "<option selected value=\"Select a Job\"> Select A Job </option>\n"; while ($row = mysql_fetch_assoc($result)) { $jobs = $row['jobs']; print "<option value=$jobs[jobs]>$jobs[jobs]</option>\n"; } print "</select>\n"; print "</p>\n"; ?></td> <td width="6%"> </td> </tr> </table> [attachment deleted by admin]
-
ok here is the page source Admin Area<p><a href=logout.php>Logout</a> <form action="insert.php" method="post"> <p align="left"> </p> <table width="87%" border="0"> <tr> <td width="34%">Date: </td> <td width="60%"><input type="text" name="date" /></td> <td width="6%"> </td> </tr> </table> <table width="87%" border="0"> <tr> <td width="34%">Firstname: </td> <td width="60%"><input type="text" name="firstname" /></td> <td width="6%"> </td> </tr> </table> <table width="87%" border="0"> <tr> <td width="34%">Lastname: </td> <td width="60%"><input type="text" name="lastname" /></td> <td width="6%"> </td> </tr> </table> <table width="87%" border="0"> <tr> <td width="34%">Job Name:</td> <td width="60%"><select name="Select a Job"> <option value=Center Point> <option value=Emory Hillel> <option value=warner robins maintnance bldg> <option value=Warner Robins Post Office> <option value=warner Robins Smith Center> </select> </p> </td> <td width="6%"> </td> </tr> </table> <table width="87%" border="0"> <tr> <td width="34%">Time In:</td> <td width="60%"><input type="text" name="timein" /></td> <td width="6%"> </td> </tr> <tr> <td>Time Out:</td> <td><input type="text" name="timeout" /></td> <td> </td> </tr> <tr> <td>Lunch:</td> <td><input type="text" name="lunch" /></td> <td> </td> </tr> <tr> <td>Total Hours:</td> <td><input type="text" name="totalhours" /></td> <td> </td> </tr> </table> <table width="87%" border="0"> <tr> <td width="7%"> </td> <td width="7%"> </td> <td width="7%"> </td> <td width="13%"> </td> <td width="38%"><input type="submit" /></td> <td width="7%"> </td> <td width="7%"> </td> <td width="7%"> </td> <td width="7%"> </td> </tr> </table> </form> Download as <a href='xls.php'>.xls </a>file!<b><center>Database Output</center></b><br><br><b>0000-00-00 James McKay</b><br>warner robins 05:00:00 - 09:00:00 Lunch (-0.00)<br>Total hours for 0000-00-00 = 4.00<hr><br><b>2010-01-23 James McKay</b><br>warner robins 05:00:00 - 09:00:00 Lunch (-0.00)<br>Total hours for 2010-01-23 = 4.00<hr><br><b>2010-01-24 James McKay</b><br>center point 09:00:00 - 08:00:00 Lunch (-0.00)<br>Total hours for 2010-01-24 = 11.00<hr><br><b>2010-01-24 James McKay</b><br>center point 09:00:00 - 08:00:00 Lunch (-0.00)<br>Total hours for 2010-01-24 = 11.00<hr><br><b>2010-01-24 James McKay</b><br>center point 09:00:00 - 08:00:00 Lunch (-0.00)<br>Total hours for 2010-01-24 = 11.00<hr><br><b>2010-01-24 James McKay</b><br>center point 09:00:00 - 08:00:00 Lunch (-0.00)<br>Total hours for 2010-01-24 = 11.00<hr><br><b>2010-01-24 James McKay</b><br>center point 09:00:00 - 08:00:00 Lunch (-0.00)<br>Total hours for 2010-01-24 = 11.00<hr><br> near the middle it show the 5 option values. hillel, center point warner robins... here is a screen shot also [attachment deleted by admin]
-
I assume they are there. there is enough room for about 2 digits. That is how wide the list box is. Maybe 4 digits. It has 4 slots that highlight when you mouse over them, but doesnt seem to be wide enough to show the data inside it. there are currently 4 entries in the data base.