• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Inherited PHP site, having trouble with mySQL

New Here ,
Sep 24, 2012 Sep 24, 2012

Copy link to clipboard

Copied

So first let me start by saying that I'm very new to PHP files in general, and to mySQL. I have some experience with basic HTML and reasonable experience with C++ so I'm confident I'll learn my way around, but for now I seem to be hitting some roadblocks. Recently I inherited a few project websites as my responsibility at work. The individual that created the sites was independently contracted, and I have no means of communicating with them on how the site was implemented.

Where I'm at:

So I've been using dreamweaver to manipulate code here and there to make some minor changes to the site, but definitely not in the way Adobe intended. I know some extra effort on my part now will result in a much easier to edit website, so I've been trying to create a local "test" server and setup the PHP and mySQL appropriately. I installed XAMPP, followed the instructions listed here: http://www.adobe.com/devnet/dreamweaver/articles/setup_php.html; and all my servers are up and running. I believe the issue I'm having now is importing the websites existing SQL file (can't find it anywhere), which I'm hoping will allow me to edit logins and permissions... that is, if I am understanding how all this works so far. Previously I was editing login information via simply changing the code in the PHP file and that was working okay, but I couldn't seem to add new logins this way; hence my desire to get things setup correctly now.

So, now that I've created a local "test" server and connected my index.php file to the mySQL database I am seeing the following errors in design view:

Notice: Undefined index: logout in C:\xampp\htdocs\Elliott_test_server\index.php on line 15

Notice: Undefined index: username in C:\xampp\htdocs\Elliott_test_server\index.php on line 20

Notice: Undefined index: username in C:\xampp\htdocs\Elliott_test_server\index.php on line 22

Notice: Undefined index: username in C:\xampp\htdocs\Elliott_test_server\index.php on line 24

Notice: Undefined index: username in C:\xampp\htdocs\Elliott_test_server\index.php on line 25

Notice: Undefined index: username in C:\xampp\htdocs\Elliott_test_server\index.php on line 26

Notice: Undefined index: njyur6543trwefgsbdhnfjr6u54yer inC:\xampp\htdocs\Elliott_test_server\index.php on line 27

Notice: Undefined index: username in C:\xampp\htdocs\Elliott_test_server\index.php on line 31

Notice: Undefined index: username in C:\xampp\htdocs\Elliott_test_server\index.php on line 35

The bulk of these lines correspond with user logins in the PHP file. My assumption is that the PHP file is seeking the SQL dadtabase that contains these logins, but I haven't the slightest clue where it's trying to pull this information from. Any help getting this set up correctly would be great. I'm sure I could be providing more information, but I'm not entirely sure what would be helpful since I'm still new to this.

Hope to hear from you guys...

TOPICS
Server side applications

Views

4.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 25, 2012 Sep 25, 2012

Copy link to clipboard

Copied

'I believe the issue I'm having now is importing the websites existing SQL file (can't find it anywhere),'

You need to login to the remote websites control panel and go to the 'databases' section. From the database section in the control panel you should be able to fire up phpMyAdmin. Select the tables from the database and 'export' them to your desktop (or folder of your choice on your desktop).

Next you need to 'import' the database tables into your local database set up via phpMyAdmin. Fire it up from xamp, create a new database (IMPORTANT: name it the same as the remote database). Once created 'import' the tables you 'exported' from the remote site by selecting 'import' in phpMyAdmin. Browse to database tables you downloaded and import them into you local database.

If you echo the remote set up then all 'connection' files to the database will be preserved. (YOU will have to open the database connections file (which should be in a folder which you will/should have downloaded while getting the site files for use locally) and make sure the user and password are set to the user and password required by your local version  of mySQL.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 25, 2012 Sep 25, 2012

Copy link to clipboard

Copied

Darn, I really thought this seemed like my solution. Only problem is, there are no databases associated with the websites. I accessed the control panel > databases section and there aren't any databases. The sites function fine though so this definitely seems strange to me. The person that created the sites did mention that he tried to "simplify" everything before handing over the files. I'm thinking I just need to create a new database and go from there?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 25, 2012 Sep 25, 2012

Copy link to clipboard

Copied

No databases?

Is there nothing at the top of your php pages that connects to a database like:

<?php require_once('Connections/conUsers.php'); ?>

I was a bit concerned that you said you have been altering the login information in the php page itself which would infer that no database is being used.

Can you post the php page here, obvioulsy change the passwords. Someone maybe able to say why it is you are getting the warning 'undefined index' message.

Creating a new data base is easy but then you have to create the login/user/password script too. Dreamweaver can do most of this for you.

If you Google creating login in Dreamweaver and have a look around you'll probably find enough information.

I don't know how recent the below instructions are but it might be worth going through if you decide to set up a login page from scratch:

http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7884a.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 25, 2012 Sep 25, 2012

Copy link to clipboard

Copied

I don't particularly mind if the login info is contained within the PHP file, as I don't foresee the need to add additional logins. All the future project sites will basically look and feel the same as the site I inhereted. Here is the code in the PHP file:

<link href="css.css" rel="stylesheet" type="text/css" />

<?php

if(!isset($_SESSION['_access_']))

{

session_start();

session_regenerate_id(true);

}

function sanitize_paranoid($string)

{

$string = preg_replace("/[^a-zA-Z0-9!_. @-]/","",$string);

return $string;

}

if(sanitize_paranoid($_GET['logout'])==1)

{

$_SESSION['njyur6543trwefgsbdhnfjr6u54yer']="";

}

if (

(sanitize_paranoid($_POST['username'])=="ID_superadmin"&&

sanitize_paranoid($_POST['password'])=="***") ||

(sanitize_paranoid($_POST['username'])=="Elliott-InDepth"

&&sanitize_paranoid($_POST['password'])=="***") ||

(sanitize_paranoid($_POST['username'])=="Elliott-Stakeholders"

&&sanitize_paranoid($_POST['password'])=="***") ||

(sanitize_paranoid($_POST['username'])=="Elliott-Accord"

&&sanitize_paranoid($_POST['password'])=="***") ||

(sanitize_paranoid($_POST['username'])=="Elliott-USACE"

&&sanitize_paranoid($_POST['password'])=="***") ||

(sanitize_paranoid($_SESSION['njyur6543trwefgsbdhnfjr6u54yer'])=="mkyui7u56y4ergsdfer3wt4y5u6") )

{

$posted_correctly = "yes";

}

if($_POST['username'])

{

if(sanitize_paranoid($_POST['username'])!=$_SESSION['iamthesuperadministrator'] ) {$_SESSION['iamthesuperadministrator'] = "";}

}

if(sanitize_paranoid($_POST['username'])=="ID_superadmin") {$_SESSION['iamthesuperadministrator'] = "ID_superadmin";}

echo '<HTML>

<HEAD>

<TITLE>East Elliott</TITLE>

<LINK rel="stylesheet" href="css.css" type="text/css">

<script type="text/javascript">

var iframeids=["myframe"]

var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]

var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0

function resizeCaller() {

var dyniframe=new Array()

for (i=0; i<iframeids.length; i++){

if (document.getElementById)

resizeIframe(iframeids)

if ((document.all || document.getElementById) && iframehide=="no"){

var tempobj=document.all? document.all[iframeids] : document.getElementById(iframeids)

tempobj.style.display="block"

}

}

}

function resizeIframe(frameid){

var currentfr=document.getElementById(frameid)

if (currentfr && !window.opera){

currentfr.style.display="block"

if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight)

currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;

else if (currentfr.Document && currentfr.Document.body.scrollHeight)

currentfr.height = currentfr.Document.body.scrollHeight;

if (currentfr.addEventListener)

currentfr.addEventListener("load", readjustIframe, false)

else if (currentfr.attachEvent){

currentfr.detachEvent("onload", readjustIframe)

currentfr.attachEvent("onload", readjustIframe)

}

}

}

function readjustIframe(loadevt) {

var crossevt=(window.event)? event : loadevt

var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement

if (iframeroot)

resizeIframe(iframeroot.id);

}

function loadintoIframe(iframeid, url){

if (document.getElementById)

document.getElementById(iframeid).src=url

}

if (window.addEventListener)

window.addEventListener("load", resizeCaller, false)

else if (window.attachEvent)

window.attachEvent("onload", resizeCaller)

else

window.onload=resizeCaller

</script>

</HEAD>

<BODY bgcolor="#FFFFFF">

<div align="center">

<table width="747" border="0" align="center" cellspacing="0" cellpadding="0" bgcolor="737573">

<tr>

  <td height="2" colspan="3"></td>

</tr><tr>

  <td width="2" rowspan="9"></td>

  <td width="743" height="100" colspan="3">

  <img src="images/header.jpg" border="0"></td>

  <td width="2" rowspan="9"></td>

</tr><tr>

  <td height="2" colspan="3"></td>

</tr><tr>

  <td width="743" height="30" colspan="3">

';echo '

   <table width="100%" height="30" border="0" cellspacing="0" cellpadding="2" background="images/navback.jpg">

    <tr>

     <td width="106" align="center"><a href="index.php" class="nav">Home</a></td>

';if ( $posted_correctly == "yes") {echo '     <td width="106" align="center"><a href="index.php?p=proj_documents" class="nav">Project<BR>Documents</a></td>

     <td width="106" align="center"><a href="index.php?p=ref_documents" class="nav">Reference<BR>Documents</a></td>

     <td width="106" align="center"><a href="index.php?p=maps" class="nav">Maps</a></td>

     <td width="106" align="center"><a href="index.php?p=photos" class="nav">Photos</a></td>

     <td width="106" align="center"><a href="index.php?p=proweb" class="nav">ProWeb</a></td>

';}echo '

     <td width="106" align="center"><a href="index.php?p=contact" class="nav">Contact Us</a></td>

';if ( $posted_correctly == "yes") {echo '     <td width="106" align="center"><a href="index.php?logout=1" class="nav">Log Out </a></td>

';}if ( $posted_correctly != "yes") {echo "<td colspan=\"5\" width=\"530\"> </td>";}echo '    </tr>

   </table>

';echo '  </td>

</tr><tr>

  <td height="2" colspan="3"></td>

</tr><tr valign="top">

  <td width="550" bgcolor="#FFFFFF">

';echo '   <table width="100%" border="0" cellspacing="0" cellpadding="10" bgcolor="#FFFFFF">

    <tr valign="top">

     <td width="100%" ';

echo ' >

';

if ( $posted_correctly == "yes")

{

$_SESSION['njyur6543trwefgsbdhnfjr6u54yer']="mkyui7u56y4ergsdfer3wt4y5u6";

if(sanitize_paranoid($_GET['p'])=="proj_documents")

{

f_project_documents();

}

elseif(sanitize_paranoid($_GET['p'])=="ref_documents")

{

f_reference_documents();

}

elseif(sanitize_paranoid($_GET['p'])=="maps")

{

f_maps();

}

elseif(sanitize_paranoid($_GET['p'])=="photos")

{

f_photos();

}

elseif(sanitize_paranoid($_GET['p'])=="proweb")

{

f_proweb();

}

elseif(sanitize_paranoid($_GET['p'])=="contact")

{

f_contact();

}

else

{

f_main();

}

}

else

{

if(sanitize_paranoid($_GET['p'])=="contact")

{

f_contact();

}

else

{

f_login();

}

}

echo '<tr>

     <td height="10"></td>

    </tr>

   </table>

';echo '  </td>

  <td width="2"></td>

  <td height="350" width="191" background="images/rightback.jpg">

   <table width="100%" border="0" cellspacing="0" cellpadding="0">

    <tr valign="top">

    <td width="100%">

';echo '      <table width="100%" border="0" cellspacing="0" cellpadding="5">

       <tr>

        <th width="100%" height="28" align="left" class="rightnav"> Resources</th>

       </tr><tr>

    <td width="100%" height="1"></td>

       </tr>

      </table>

      <table width="100%" border="0" cellspacing="5" cellpadding="10">

       <tr>

    <td width="100%">

         <table width="100%" border="0" cellspacing="0" cellpadding="0">

          <tr valign="top">

       <td align="left" width="100%" height="22"><a class="nav" target="_blank" href="http://www.spl.usace.army.mil/">USACE LA District<BR>Home Page</a></td>

          </tr><tr valign="top">

       <td width="100%" height="22"> </td>

          </tr><tr valign="top">

       <td align="left" width="100%" height="22"><a class="nav" target="_blank" href="http://www.hnd.usace.army.mil/oew/CX_refdocs.aspx ">MM-CX Reference Documents</a></td>

          </tr><tr valign="top">

       <td width="100%" height="22"> </td>

          </tr><tr valign="top">

       <td align="left" width="100%" height="22"><a class="nav" target="_blank"  href="http://deparc.xservices.com/deparc/do/mmrp">Munitions Response Site (MRS) Inventory</a></td>

          </tr><tr valign="top">

       <td width="100%" height="22"> </td>

          </tr><tr valign="top">

       <td width="100%" height="22"> </td>

          </tr>

         </table>

        </td>

       </tr>

      </table>

';echo '     </td>

    </tr>

   </table>

  </td>

</tr>

<tr >

  <td valign="bottom" bgcolor="#FFFFFF"><img src="images/camo_header.jpg" alt="" width="550" height="82" border="0">

</tr>

<tr height="2">

  <td colspan="3"></td>

</tr><tr>

  <td colspan="3">

';echo '   <table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="#FFFFFF">

    <tr>

     <td align="center" ><font size="-2">&copy; ';echo date('Y');echo ' InDepth Corporation - All Rights Reserved</font></td>

    </tr>

   </table>

';echo '  </td>

</tr><tr height="2">

  <td colspan="3"></td>

</tr>

</table>

</div>

</body>

</html>

';

function f_login()

{

echo '<fieldset>

<legend><font class="dbrown14b">Please Log In</font></legend>

<BR><BR>

<form action="?" method="post" name="login">

      <div align="center">

        <center>

        <table width="200" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse">

          <tr>

            <td align="center">

            Username:<BR><input name="username" type="text" alt="username" size="10" />

            </td><td align="center">

            Password:<BR><input type="password" name="password" size="10" alt="password" />

           </td>

            </tr>

            <tr><td align="center" colspan="2">

            <BR>

<input type="submit" name="Submit" class="button" value="Login" />

             </td>

            </tr>

           </table>

           <br><BR>

               <table width="400" align="center" border="0" ><tr><td align="center" colspan="2">

<em>Use of this site is restricted to individuals with an authorized username and password. Please protect your password to prevent unauthorized use of this site.</em>

             </td>

            </tr>

           </table>

            </center>

            </div>

          </form>

          </fieldset>

';

}

function f_main()

{

echo '

<fieldset>

<legend><font class="dbrown14b">Welcome</font></legend>

<BR>

<blockquote>Welcome to the East Elliott Project Team Website. This website was designed as an information exchange site for Stakeholders, the Contractor Project Team and USACE. Use of this site is restricted to individuals with an authorized username and password.  Please protect your password to prevent unauthorized use of this site.</blockquote>

<BR><BR>

<div align="center">

<table border="1" cellpadding="3" style="border-width:0; border-collapse: collapse; " bordercolor="#111111" width="500" cellspacing="0">

  <tr>

    <td align="center" width="100%" colspan="2" style="border-style:none; border-width:medium; ">

    <font class="dbrown14bb">Upcoming Events</font><br><BR>

';if ($_SESSION['iamthesuperadministrator'] == "ID_superadmin")

{

echo '

';

if ($_POST['calendar1'])

{

$message = $_POST["calendar1"];

$out = fopen("cal_data.php","w");

if (!$out) {

print("Could not write to file");

exit;

}

fputs ($out,implode,("\n"));

fwrite($out,"$message");

fclose($out);

}

echo '

';

$messagecontent = "";

$fp = fopen('cal_data.php','r');

if (!$fp) {echo 'ERROR: Unable to open file.</table></body></html>';exit;}

$loop = 0;

while (!feof($fp)) {

$loop++;

$line = fgets($fp,1024);

$field[$loop] = explode (' | ',$line);

$messagecontent .= $field[$loop][0].' | '.$field[$loop][1];

$fp++;

}

fclose($fp);

echo '

<div align="center"><font size="-2" color="#808080"><em>Syntax: COLUMN1 | COLUMN2</em></font></div>

<a name="cal" id="cal"></a>

<form action="index.php#cal" method="POST">

<textarea cols="70" rows="10" name="calendar1" style="font-size: 12px;">';

echo $messagecontentecho;

echo '</textarea><br />

<input type="submit" value="Make Changes">

</form>

    </td>

  </tr>

  <tr>

    <td width="100%" colspan="2" align="center" style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-bottom-style: none; border-bottom-width: medium" >

    <br style="line-height: 70px;"><font class="dbrown14bb">Project Schedule</font><BR><BR>

    </td>

  </tr>

  <tr>

    <td align="center" width="100%" colspan="2" style="border-style: none; border-width: medium" >

<font size="-2" color="#808080"><em>Allowed file types: PDF, JPG</em></font>

<iframe id="myframe" src="resources/project_schedule/edit.php" scrolling="yes" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; height:300; display:none"></iframe>

    </td>

  </tr>

';

}

else

{

echo '        ';

$fp = fopen('cal_data.php','r');

if (!$fp) {echo 'ERROR: Unable to open file.</table></body></html>';exit;}

$loop = 0;

while (!feof($fp)) {

$loop++;

$line = fgets($fp,1024);

$field[$loop] = explode ('|',$line);

echo '

        <tr>

        <td>'.$field[$loop][0].'</td>

        <td>'.$field[$loop][1].'</td>

        </tr>';

$fp++;

}

fclose($fp);

echo '

  <tr>

    <td width="100%" colspan="2" align="center" style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-bottom-style: none; border-bottom-width: medium" >

    <br style="line-height: 70px;"><font class="dbrown14bb">Project Schedule</font><BR><BR>

    </td>

  </tr>

  <tr>

    <td align="center" width="100%" colspan="2" style="border-style: none; border-width: medium" >

<table border="1" style="border-width:1; border-collapse: collapse; " bordercolor="#111111" width="500" cellspacing="0">

  <tr>

    <td align="center" width="100%" colspan="2" style="border-style:none; border-width:medium; ">

<iframe id="myframe" src="resources/project_schedule/view.php" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>

    </td>

  </tr>

</table>

    </td>

  </tr>

';

}

echo '

</table>

</div>

<BR><BR></fieldset>

';

}

function f_project_documents()

{

echo '

<fieldset>

<legend><font class="dbrown14b">Project Documents</font></legend>

<BR><BR>

<div align="center">

';

if ($_SESSION['iamthesuperadministrator'] == "ID_superadmin")

{

echo '<font size="-2" color="#808080"><em>Allowed file types: PDF, JPG</em></font>

<iframe id="myframe" src="resources/documents/edit.php" scrolling="yes" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; height:400; display:none"></iframe>

';

}

else

{

echo '<iframe id="myframe" src="resources/documents/view.php" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>

';

}

echo '</div>

<BR><BR></fieldset>

';

}

function f_reference_documents()

{

echo '<fieldset>

<legend><font class="dbrown14b">Reference Documents</font></legend>

<BR><BR>

<div align="center">

';if ($_SESSION['iamthesuperadministrator'] == "ID_superadmin")

{

echo '<font size="-2" color="#808080"><em>Allowed file types: PDF, JPG</em></font>

<iframe id="myframe" src="resources/ref_documents/edit.php" scrolling="yes" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; height:400; display:none"></iframe>

';

}

else

{

echo '<iframe id="myframe" src="resources/ref_documents/view.php" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>

';

}

echo '</div>

<BR><BR></fieldset>

';

}

function f_maps()

{

echo '<fieldset>

<legend><font class="dbrown14b">Maps</font></legend>

<BR><BR>

<div align="center">

';if ($_SESSION['iamthesuperadministrator'] == "ID_superadmin")

{

echo '<font size="-2" color="#808080"><em>Allowed file types: PDF, JPG</em></font>

<iframe id="myframe" src="resources/maps/edit.php" scrolling="yes" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; height:400; display:none"></iframe>

';

}

else

{

echo '<iframe id="myframe" src="resources/maps/view.php" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>

';

}

echo '</div>

<BR><BR></fieldset>

';

}

function f_photos()

{

echo '<fieldset>

<legend><font class="dbrown14b">Photos</font></legend>

<BR><BR>

<div align="center">

';if ($_SESSION['iamthesuperadministrator'] == "ID_superadmin")

{

echo '<font size="-2" color="#808080"><em>Allowed file types: PDF, JPG</em></font>

<iframe id="myframe" src="resources/photos/edit.php" scrolling="yes" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; height:400; display:none"></iframe>

';

}

else

{

echo '<iframe id="myframe" src="resources/photos/view.php" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>

';

}

echo '</div>

<BR><BR></fieldset>

';

}

function f_contact()

{

echo '<fieldset>

<legend><font class="dbrown14b">Contact Us</font></legend>

<BR><BR>

<div align="center">

<table width="100%" border="0" align="center">

<tr>

    <td width="20%"> </td>

    <td align="left" width="80%">

<p style="vertical-align:baseline"><strong>Jay Field</strong><br>

Public Affairs Officer<br>

US Army Corps of Engineers,<br>

Los Angeles District<br>

Phone (213) 452-3920<br>

<a class="link8" href="mailto:thomas.j.field@usace.army.mil" >

thomas.j.field@usace.army.mil</a><br><br> </p>

<p style="vertical-align:baseline"><strong>William Dam</strong><br>

FUDS Project Manager<br>

US Army Corps of Engineers,<br>

Los Angeles District, CESPL-PM-M<br>

Phone 213-452-3978 <br>

<a class="link8" href="mailto:William.L.Dam@usace.army.mil" >

William.L.Dam@usace.army.mil</a><br><br> </p>

<p><strong>Tom Tomczyk</strong>  <br>

Project Manager<br>

Bristol Environmental Remediation Services, Inc. <br>

Phone 505-918-4663<br>

<a class="link8" href="mailto:ttomczyk@bristol-companies.com" >

ttomczyk@bristol-companies.com</a><br><br></p>

<p><strong>Justin Stanley</strong><br>

Webmaster <br>

Indepth Corporation<br>

Phone  619-507-8787<br>

<a class="link8" href="mailto:jstanley@indepthcorporation.com" >

jstanley@indepthcorporation.com</a><br><br></p>

</td>

</tr>

</table>

</div>

<BR><BR></fieldset>

';

}

function f_proweb()

{

echo '<form method="post" action="https://secure.sharefile.com/login-noaccount-2.aspx" enctype="multipart/form-data">

<fieldset>

        <legend><font class="dbrown14b">Pro-Web Login</font></legend>

    <BR><BR>

    <table border="0" cellpadding="0" cellspacing="0" width="100%">

      <tr>

          <td width="16%"> </td>

        <td width="16%"><label for="email">Email:</label>    </td>

        <td><input id="email" name="email" type="text" /></td>

      </tr>

      <tr>

        <td> </td>

        <td><label for="password" >Password:</label>        </td>

        <td> <input id="password" name="password" type="password" /></td>

      </tr>

      <tr>

      <td> </td>

      <td><input type="submit" id="btnLogin" class="go png" value="Login" /></td>

      <td> </td>

      </tr>

</table>

<BR><BR>

</fieldset>

<p> </p>

    <div class="buttons">

    </div>

</form>

<p> </p>

<p> </p>

';

}

echo '   ';

?>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 25, 2012 Sep 25, 2012

Copy link to clipboard

Copied

I should add that my primary goal in resolving this issue is that I believe it will resolve the problem I'm having with "design" view in which nothing (other than my background) shows up. The site shows up with those line errors in Live view, but basically nothing shows up in design view. I'm hoping the design view issue and line code errors are related.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 25, 2012 Sep 25, 2012

Copy link to clipboard

Copied

Ding! - unfortunately the php code doesn't mean a whole lot to me......it's bit too complex for my level of understanding.

It does look as though there is no database involved though and all passwords and usernames have been 'hard-coded' into the php itself. In circumstances where only a few users  are required it's probably easier to do this than set up a database.

But I have no idea what half that php code does!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 25, 2012 Sep 25, 2012

Copy link to clipboard

Copied

Hmm... any ideas then why I'm getting the line code errors?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 25, 2012 Sep 25, 2012

Copy link to clipboard

Copied

LATEST

I'm not a php programmer, but here's a good guess. Let's start with the first:

>Notice: Undefined index: logout in C:\xampp\htdocs\Elliott_test_server\index.php on line 15

which is in reference to :  if(sanitize_paranoid($_GET['logout'])==1)

If you have no querystring name/value pair named 'logout', you will get an error. You need to test variables with isset() before using them. Same goes for the other variables from the POSTed form.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines