Solved

Problem in script

Posted on 2007-03-26
103
233 Views
Last Modified: 2013-12-13
Hello,

I'm having problems with following script:

<?php
ob_start();
?>
<?php
// include/require hier evt nog andere zaken
require ("../scripts/connect.php");
// we willen op deze pagina gebruik maken van beveiliging mbv sessies,
// dus includen (requiren) we session.php
require("../scripts/session.php");
$id = htmlentities($_GET["id"], ENT_QUOTES);
   // Fetch the article category
   $rsc = mysql_query("SELECT category FROM articles WHERE id=".$_GET['id']) or die(mysql_error());
   $row = mysql_fetch_array($rsc);
      $cat = $row['category'];

  if (($cat == 2) && ((int)$_SESSION['slevel'] < 2)) {
      header("Location:accessdenied.php");
      exit(); //stop the script.
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>KB RBINS</title>
<link rel="stylesheet" type="text/css" href="../main.css" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
</head>
<body>
   <!-- Begin Wrapper -->
   <div id="wrapper">
         <!-- Begin Header -->
         <div id="header">
                  <h1>Knowledgebase System RBINS</h1>      
             </div>
             <!-- End Header -->
         <!-- Begin Faux Columns -->
             <div id="faux">            
                   <!-- Begin Left Column -->
                   <div id="leftcolumn">      
                     <?php
                            include("../scripts/checkuser.php");
                     ?>      
                   </div>
                   <!-- End Left Column -->
                   <!-- Begin Right Column -->
                   <div id="rightcolumn">      
                     <center><h2>Change an article</h2></center><br />  
                               <?php
                                    if( isset($_GET['id']) && is_numeric($_GET['id']))
                                    {
                                       $res = mysql_query("SELECT title, article, category, author FROM articles WHERE id = " .$_GET['id']) or die('QUERY_SELECT ERROR: <hr />' . mysql_error());
                                       $results = mysql_fetch_assoc($res);
                                       if($_SERVER['REQUEST_METHOD'] == 'POST')
                                       {
                                          if (strlen(trim($_POST['title']) < 2) && strlen(trim($_POST['article']) < 2))
                                          {
                                             $error = "One or both fields are empty. This is not allowed. Please fill something in.";
                                          }    
                                          if (empty($error))
                                          {
                                             //error is niet leeg dus query uitvoeren
                                             $update = mysql_query("UPDATE articles SET title     = '" . mysql_real_escape_string($_POST['title']). "', article = '". mysql_real_escape_string($_POST['article']) . "' WHERE id = "  . $_GET['id']) or die('QUERY_UPDATE ERROR: <hr />'. mysql_error());
                                             echo "Changes have been made!";
                                          }
                                          else
                                          {
                                             //error is niet leeg dus error weergeven
                                             echo $error;
                                          }
                                       }
                                    }
                                    // form without PHP
                                    ?>
                                    <!-- HIER FORMULIER -->
                                    <form method="post" action="" style="margin-left:1px;">
                                    <table>
                                       <tr>
                                          <td>
                                             <input type="hidden" name="berichtID" value="<?php echo $results['id']; ?>" />
                                          </td>
                                       </tr>
                                       <tr>
                                          <td valign="top">
                                             Title
                                          </td>
                                          <td>
                                             <input type="text" name="title" value="<?php echo $results['title']; ?>"style="width:535px;" />
                                          </td>
                                       </tr>
                                       <tr>
                                          <td valign="top">
                                             Article:
                                          </td>
                                          <td>
                                             <textarea id="article"  name="article" rows="10" style="width:535px;"><?php echo $results['article']; ?></textarea>
                                          </td>
                                       </tr>
                                       <tr>
                                          <td></td>
                                          <td>
                                             <input type="submit" value="Change" />
                                          </td>
                                       </tr>
                                    </table>
                                    </form>    
                  <br />
                     <div class="clear"></div>                    
                   </div>
                   <!-- End Right Column -->                    
                     <div class="clear"></div>                    
         </div>        
         <!-- End Faux Columns -->
         <!-- Begin Footer -->
         <div id="footer">                  
               <h4>Jo Vanattenhoven&copy;2007</h4>            
         </div>
             <!-- End Footer -->            
   </div>
   <!-- End Wrapper -->
</body>
</html>
<?php
ob_end_flush();
?>

Ik takes the data from the DB and puts it in textboxes. Then I want to change it, but when I change something I get the error message (that I wrote in the script) that there one or both fields aren't filled in. Another problem I see is through the validation. When I look at the source code (when it's generated) I see that there is an error on the line:
<input type="hidden" name="berichtID" value="<?php echo $results['id']; ?>" />

And it says that the variable isn't known.

Can someone help me here?

Thanx,
Jvuz
0
Comment
Question by:jvuz
  • 48
  • 44
  • 11
103 Comments
 
LVL 6

Expert Comment

by:deresh
ID: 18791400
maybe you could say what error do you get? maybe id is invalid?
0
 
LVL 21

Author Comment

by:jvuz
ID: 18791402
You mean about the second problem? It says: error:missing quote mark for attribute value
0
 
LVL 17

Expert Comment

by:psimation
ID: 18791491
1) I might be wrong, but this could be a cause:

<input type="hidden" name="berichtID" value="<?php echo $results['id']; ?>" />

This will "create" a variable called $berichtID on POST, but your SQL only mentions $_GET[id], which is good for the first time you run the script ( i guess it is run by clicking on a link that has the id value appended to the URL), but when you submit the form, the method=post, meaning it will look for the variable in the $_POST[] array which will come from your form variables, which, as pointed out, does NOT contain a "id" only a "berichtID", so just change the form variable name to "id"...  

2) change your <?php echo $results['id']; ?> to <?=$result['id']?> - will probably have no impact on any errors, just a shortcut format for the whole <?php echo ... , reads easier too. ;)
0
 
LVL 17

Expert Comment

by:psimation
ID: 18791504
Sorry, forgot, so your "update" SQL must also change to : $update = mysql_query("UPDATE articles SET title     = '" . mysql_real_escape_string($_POST['title']). "', article = '". mysql_real_escape_string($_POST['article']) . "' WHERE id = "  . $_POST['id']) or die('QUERY_UPDATE ERROR: <hr />'. mysql_error());

OR, if you don't want to change the form name, just change the SQL to:

$update = mysql_query("UPDATE articles SET title     = '" . mysql_real_escape_string($_POST['title']). "', article = '". mysql_real_escape_string($_POST['article']) . "' WHERE id = "  . $_POST['berichtID']) or die('QUERY_UPDATE ERROR: <hr />'. mysql_error());


0
 
LVL 21

Author Comment

by:jvuz
ID: 18791510
Thanx, but it doesn't change anything. For the second problem (validation) I can give you the error that it gives in the source code.

Undefined index:  id on line "<input type="hidden" name="id" value="<?=$results['id']; ?>" />"
0
 
LVL 17

Expert Comment

by:psimation
ID: 18791600
"<input type="hidden" name="id" value="<?=$results['id']; ?>" />"

remove the ; after the ['id']

=> "<input type="hidden" name="id" value="<?=$results['id']?>" />"
0
 
LVL 6

Expert Comment

by:deresh
ID: 18791604
as psimation stated the problem is in :

<input type="hidden" name="berichtID" value="<?php echo $results['id']; ?>" />

in your original script just change berichtID to id, an then it should work as expected, because you never get into database saving part oy your script because POST variable ID isnt set at all ( variable bereichtID is set instead.

do you understand your error now?
0
 
LVL 21

Author Comment

by:jvuz
ID: 18791615
I keep getting the message that there is an empty field. Strange...
0
 
LVL 21

Author Comment

by:jvuz
ID: 18791626
deresh, I already changed that, but still no avail.

This is the code up till now:

<?php
ob_start();
?>
<?php
// include/require hier evt nog andere zaken
require ("../scripts/connect.php");
// we willen op deze pagina gebruik maken van beveiliging mbv sessies,
// dus includen (requiren) we session.php
require("../scripts/session.php");
$id = htmlentities($_GET["id"], ENT_QUOTES);
   // Fetch the article category
   $rsc = mysql_query("SELECT category FROM articles WHERE id=".$_GET['id']) or die(mysql_error());
   $row = mysql_fetch_array($rsc);
      $cat = $row['category'];

  if (($cat == 2) && ((int)$_SESSION['slevel'] < 2)) {
      header("Location:accessdenied.php");
      exit(); //stop the script.
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>KB RBINS</title>
<link rel="stylesheet" type="text/css" href="../main.css" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
</head>
<body>
   <!-- Begin Wrapper -->
   <div id="wrapper">
         <!-- Begin Header -->
         <div id="header">
                  <h1>Knowledgebase System RBINS</h1>      
             </div>
             <!-- End Header -->
         <!-- Begin Faux Columns -->
             <div id="faux">            
                   <!-- Begin Left Column -->
                   <div id="leftcolumn">      
                     <?php
                            include("../scripts/checkuser.php");
                     ?>      
                   </div>
                   <!-- End Left Column -->
                   <!-- Begin Right Column -->
                   <div id="rightcolumn">      
                     <center><h2>Change an article</h2></center><br />  
                               <?php
                                    if( isset($_GET['id']) && is_numeric($_GET['id']))
                                    {
                                       $res = mysql_query("SELECT title, article, category, author FROM articles WHERE id = " .$_GET['id']) or die('QUERY_SELECT ERROR: <hr />' . mysql_error());
                                       $results = mysql_fetch_assoc($res);
                                       if($_SERVER['REQUEST_METHOD'] == 'POST')
                                       {
                                          if (strlen(trim($_POST['title']) < 2) && strlen(trim($_POST['article']) < 2))
                                          {
                                             $error = "One or both fields are empty. This is not allowed. Please fill something in.";
                                          }    
                                          if (empty($error))
                                          {
                                             //error is niet leeg dus query uitvoeren
                                             $update = mysql_query("UPDATE articles SET title     = '" . mysql_real_escape_string($_POST['title']). "', article = '". mysql_real_escape_string($_POST['article']) . "' WHERE id = "  . $_POST['id']) or die('QUERY_UPDATE ERROR: <hr />'. mysql_error());
                                             echo "Changes have been made!";
                                          }
                                          else
                                          {
                                             //error is niet leeg dus error weergeven
                                             echo $error;
                                          }
                                       }
                                    }
                                    // form without PHP
                                    ?>
                                    <!-- HIER FORMULIER -->
                                    <form method="post" action="" style="margin-left:1px;">
                                    <table>
                                       <tr>
                                          <td>
                                             <input type="hidden" name="id" value="<?=$results['id']?>" />
                                          </td>
                                       </tr>
                                       <tr>
                                          <td valign="top">
                                             Title
                                          </td>
                                          <td>
                                             <input type="text" name="title" value="<?php echo $results['title']; ?>"style="width:535px;" />
                                          </td>
                                       </tr>
                                       <tr>
                                          <td valign="top">
                                             Article:
                                          </td>
                                          <td>
                                             <textarea id="article"  name="article" rows="10" style="width:535px;"><?php echo $results['article']; ?></textarea>
                                          </td>
                                       </tr>
                                       <tr>
                                          <td></td>
                                          <td>
                                             <input type="submit" value="Change" />
                                          </td>
                                       </tr>
                                    </table>
                                    </form>    
                  <br />
                     <div class="clear"></div>                    
                   </div>
                   <!-- End Right Column -->                    
                     <div class="clear"></div>                    
         </div>        
         <!-- End Faux Columns -->
         <!-- Begin Footer -->
         <div id="footer">                  
               <h4>Jo Vanattenhoven&copy;2007</h4>            
         </div>
             <!-- End Footer -->            
   </div>
   <!-- End Wrapper -->
</body>
</html>
<?php
ob_end_flush();
?>
0
 
LVL 6

Expert Comment

by:deresh
ID: 18791691
<form method="post" action="" style="margin-left:1px;">

change to:

 <form method="post" action="<?= $_SERVER['PHP_SELF']?>" style="margin-left:1px;">

and you are retrieveing id variable from GET not POST , change:

if( isset($_GET['id']) && is_numeric($_GET['id']))

to

if( isset($_POST['id']) && is_numeric($_POST['id']))


i think that should do the trick :)


0
 
LVL 17

Expert Comment

by:psimation
ID: 18791694
Well, that error is generated by your JS validation, correct?

Just comment out the validation part and see what happens, may be the error is with the JS and not the PHP ( have a look in JS to make sure you are not still looking for "berichtID", it should now look for form field with name = id...)
0
 
LVL 17

Expert Comment

by:psimation
ID: 18791707
deresh, I have a feeling that will actually break his code. I think he is "landing" on this page via a link that has the ID in the URL, ie, the id is a $_GET[] var, however, when he posts the form to the page itself, it is now a $_POST[] var, so it complicates things a bit.

I think there just needs to be an extra "if" for the update query that now checks for the validity of the $_POST[] var.
0
 
LVL 6

Expert Comment

by:deresh
ID: 18791768
or better ( maybe :)) he could use $_REQUEST instead of both $_POST and $_GET.  $_REQUEST fetches variables from cookies, get and post at the sam time.

So te first time he enters this page it gets set from GET ( or url) and second time it gets it from POST

0
 
LVL 21

Author Comment

by:jvuz
ID: 18791831
You're correct, I get the id number from the link.
0
 
LVL 6

Expert Comment

by:deresh
ID: 18792935
then you can use $_REQUEST instead of initial $_GET

if( isset($_REQUEST['id']) && is_numeric($_REQUEST['id']))


then when you open this page first time i will get id from GET and second time from POST ( and your script checks if it is POST and only then saves changes back to database )
0
 
LVL 21

Author Comment

by:jvuz
ID: 18798307
Then I get, when I hit enter, 2 error messages:
Undefined index: id on line 11
$id = htmlentities($_GET["id"], ENT_QUOTES);
and the same error on line 13
$rsc = mysql_query("SELECT category FROM articles WHERE id=".$_GET['id']) or die(mysql_error());
and a mysql error:
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 '' at line 1
0
 
LVL 21

Author Comment

by:jvuz
ID: 18798309
This is my code till now:

<?php
ob_start();
error_reporting( E_ALL );
?>
<?php
// include/require hier evt nog andere zaken
require ("../scripts/connect.php");
// we willen op deze pagina gebruik maken van beveiliging mbv sessies,
// dus includen (requiren) we session.php
require("../scripts/session.php");
$id = htmlentities($_GET["id"], ENT_QUOTES);
   // Fetch the article category
   $rsc = mysql_query("SELECT category FROM articles WHERE id=".$_GET['id']) or die(mysql_error());
   $row = mysql_fetch_array($rsc);
      $cat = $row['category'];

  if (($cat == 2) && ((int)$_SESSION['slevel'] < 2)) {
      header("Location:accessdenied.php");
      exit(); //stop the script.
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>KB RBINS</title>
<link rel="stylesheet" type="text/css" href="../main.css" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
</head>
<body>
   <!-- Begin Wrapper -->
   <div id="wrapper">
         <!-- Begin Header -->
         <div id="header">
                  <h1>Knowledgebase System RBINS</h1>      
             </div>
             <!-- End Header -->
         <!-- Begin Faux Columns -->
             <div id="faux">            
                   <!-- Begin Left Column -->
                   <div id="leftcolumn">      
                     <?php
                            include("../scripts/checkuser.php");
                     ?>      
                   </div>
                   <!-- End Left Column -->
                   <!-- Begin Right Column -->
                   <div id="rightcolumn">      
                     <center><h2>Change an article</h2></center>  
                               <?php
                                    if( isset($_REQUEST['id']) && is_numeric($_REQUEST['id']))
                                    {
                                       $res = mysql_query("SELECT title, article, category, author FROM articles WHERE id = " .$_GET['id']) or die('QUERY_SELECT ERROR: <hr />' . mysql_error());
                                       $results = mysql_fetch_assoc($res);
                                       if($_SERVER['REQUEST_METHOD'] == 'POST')
                                       {
                                          if (strlen(trim($_POST['title']) < 2) && strlen(trim($_POST['article']) < 2))
                                          {
                                             $error = "One or both fields are empty. This is not allowed. Please fill something in.";
                                          }    
                                          if (empty($error))
                                          {
                                             //error is niet leeg dus query uitvoeren
                                             $update = mysql_query("UPDATE articles SET title     = '" . mysql_real_escape_string($_POST['title']). "', article = '". mysql_real_escape_string($_POST['article']) . "' WHERE id = "  . $_GET['id']) or die('QUERY_UPDATE ERROR: <hr />'. mysql_error());
                                             echo "Changes have been made!";
                                          }
                                          else
                                          {
                                             //error is niet leeg dus error weergeven
                                             echo $error;
                                          }
                                       }
                                    
                                    // form without PHP
                                    ?>
                                    <!-- HIER FORMULIER -->
                                    <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" style="margin-left:1px;">
                                    <table>
                                       <tr>
                                          <td>
                                             <input type="hidden" name="berichtID" value="<?php echo $results['id']; ?> " />
                                          </td>
                                       </tr>
                                       <tr>
                                          <td valign="top">
                                             Title
                                          </td>
                                          <td>
                                             <input type="text" name="title" value="<?php echo $results['title']; ?>"style="width:535px;" />
                                          </td>
                                       </tr>
                                       <tr>
                                          <td valign="top">
                                             Article:
                                          </td>
                                          <td>
                                             <textarea id="article"  name="article" rows="10" style="width:535px;"><?php echo $results['article']; ?></textarea>
                                          </td>
                                       </tr>
                                       <tr>
                                          <td></td>
                                          <td>
                                             <input type="submit" value="Change" />
                                          </td>
                                       </tr>
                                    </table>
                                    </form>    
                  <?php
                  }
                ?>
                     <div class="clear"></div>                    
                   </div>
                   <!-- End Right Column -->                    
                     <div class="clear"></div>                    
         </div>        
         <!-- End Faux Columns -->
         <!-- Begin Footer -->
         <div id="footer">                  
               <h4>Jo Vanattenhoven©2007</h4>            
         </div>
             <!-- End Footer -->            
   </div>
   <!-- End Wrapper -->
</body>
</html>
<?php
ob_end_flush();
?>
0
 
LVL 6

Expert Comment

by:deresh
ID: 18798445
just replace all $_GET to $_REQUEST and that should do it
0
 
LVL 21

Author Comment

by:jvuz
ID: 18798461
Thanx, but still getting those errors.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18798464
Also, your SQL is broken:

should be:

$rsc = mysql_query(SELECT category FROM articles WHERE id=".$_GET['id'].") or die(mysql_error());

But deresh is right, change all $_XXX vars to $_REQUEST['whatever']
0
 
LVL 21

Author Comment

by:jvuz
ID: 18798478
Thanx, the error on line 11 is gone, but I still have an error on line 13
$rsc = mysql_query(SELECT category FROM articles WHERE id=".$_REQUEST['id'].") or die(mysql_error());
0
 
LVL 21

Author Comment

by:jvuz
ID: 18798484
Sorry, it's a parse error, no undefined index as before
0
 
LVL 17

Expert Comment

by:psimation
ID: 18798564
that's coz u havn't changed this like we said u should ;)

    <input type="hidden" name="berichtID" value="<?php echo $results['id']; ?> " />

should be

    <input type="hidden" name="id" value="<?php echo $results['id']; ?> " />

berichtID should be id
0
 
LVL 21

Author Comment

by:jvuz
ID: 18798573
That's right, but sadly it doesn't change anything. I still get the parse error.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18798578
OK, just post the entire code ( with line number if you can) and the exact error message as you get on screen.
0
 
LVL 21

Author Comment

by:jvuz
ID: 18798594
You'll find it here:

http://www.plaatscode.be/4776/
0
 
LVL 17

Expert Comment

by:psimation
ID: 18798616
OK, replace the $_REQUEST['id'] on line 13 with $id -- you declare it on line 11 already

replace line 12 and 13 with this:

$sql = "SELECT category FROM articles WHERE id=$id";
echo $sql;
$rsc = mysql_query($sql) or die (mysql_error());

then post output of that here.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18798620
sorry, just do the replace line 12 and 13 part, the first line of my previous comment was just a comment...
0
 
LVL 21

Author Comment

by:jvuz
ID: 18798630
Is it possible you meant line13 and 14 because line 12 is comment.
0
 
LVL 21

Author Comment

by:jvuz
ID: 18798655
I get this:
SELECT category FROM articles WHERE id=38
Notice: Undefined variable: row in c:\program files\easyphp1-8\www\mysite\pages\changingarticle.php on line 17

This is my code http://www.plaatscode.be/4777/
0
 
LVL 17

Expert Comment

by:psimation
ID: 18798705
You need an extra mysql command to retrieve the value from the $rsc.

Add this on line 16:

$row = mysql_fetch_assoc($rsc);
0
 
LVL 21

Author Comment

by:jvuz
ID: 18798782
Thanx, now when I change the title and article and I submit the change I get the following:

SELECT category FROM articles WHERE id=<br /> <b>Notice</b>: Undefined index: id in <b>c:\\program files\\easyphp1-8\\www\mysite\\pages\\changingarticle.php</b> on line <b>83</b><br /> 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 '<br /> <b>Notice</b>: Undefined index: id i
0
 
LVL 17

Expert Comment

by:psimation
ID: 18798784
PS, you can also comment out the "echo $sql;" line now (we know it works fine now), else your "header("Location:accessdenied.php");" redirect script won't work in future.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18798793
oh, i spoke too soon; leave that echo $sql there for now; it's showing that you don't get the value for id anymore...


please update that link to your code. it's still showing the old code on my side...

0
 
LVL 21

Author Comment

by:jvuz
ID: 18798802
My code till now: http://www.plaatscode.be/4778/
0
 
LVL 17

Expert Comment

by:psimation
ID: 18798803
I think you will have to replace all the $_REQUEST['id'] BELOW line 11 with just $id.

Try that and lets see what it does.

Basically, line 11 takes the value of the $_REQUEST["id"] and loads/assigns it to $id anyway, so you should be safe working with just $id from that point on.
0
 
LVL 21

Author Comment

by:jvuz
ID: 18799027
With this code(http://www.plaatscode.be/4781/) I get a parse error on line 53

if( isset ['$id'] && is_numeric ['$id'])
0
 
LVL 6

Expert Comment

by:deresh
ID: 18799082
if( isset ($id) && is_numeric($id))

try this instead but you can also remove all but is_numeric function because $id is always set

so the correct line is:

if(is_numeric($id))

0
 
LVL 21

Author Comment

by:jvuz
ID: 18799098
Thanx!
Is there something wrong with this?
$update = mysql_query("UPDATE articles SET title = '" . mysql_real_escape_string($_POST['title']). "', article = '". mysql_real_escape_string($_POST['article']) . "' WHERE id = "  . $id]) or die('QUERY_UPDATE ERROR: <hr />'. mysql_error());
It's line66 and I'm getting a parse error
0
 
LVL 21

Author Comment

by:jvuz
ID: 18799108
I've got solved line 66, but now I'm again having an undefined index:id error on line 11

$id = htmlentities($_REQUEST["id"], ENT_QUOTES);
0
 
LVL 17

Expert Comment

by:psimation
ID: 18799124
Are you getting this error only once you submit a change? ie. does the script still work if you visit the page "for the first time"?
0
 
LVL 21

Author Comment

by:jvuz
ID: 18799143
When I arrive on the page there isn't a problem, it's when I want to change something and want to submit it.
0
 
LVL 21

Author Comment

by:jvuz
ID: 18799161
I also changed line 83

<input type="hidden" name="id" value="<?php echo $results['id']; ?> " />

to

<input type="hidden" name="id" value="<?php echo $id; ?> " />

But when I cahnge something now, I don't get an error message but it doesn't change anything. :/
0
 
LVL 17

Expert Comment

by:psimation
ID: 18799166
OK, just post the latest version of your code again, I think we close to a solution...
0
 
LVL 21

Author Comment

by:jvuz
ID: 18799179
I think so too. Fingers crossed! ;)

http://www.plaatscode.be/4784/
0
 
LVL 17

Expert Comment

by:psimation
ID: 18799180
actually, that's not a bad change to make, since the "id" will be the same for your "session", ie. it doesn't matter how many times you make changes, it's to the same row in the table...

But let's just have a look at the latest code, along with the latest output.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18799190
OK, just post the latest output from running the script and then changing and submitting an entry.
0
 
LVL 21

Author Comment

by:jvuz
ID: 18799204
OK, when I call the page, I don't get an error (already good!), then when I change something and hit "Change" I don't get an error either (so far so good) but I receive the same page (same layout) but without any data in the content block and when I check the data, nothing has been changed.
0
 
LVL 21

Author Comment

by:jvuz
ID: 18799214
I arrive on a page ../changingarticle.php but without the ID number, so just http://localhost/mysite/pages/changingarticle.php
not
http://localhost/mysite/pages/changingarticle.php?id=38 (-> number of the id, this is of course variable, depending of which article you take.)
0
 
LVL 17

Expert Comment

by:psimation
ID: 18799236
OK, change your "mysql_query" lines so that they are similar to the first query on line 15, ie, don't put your sql string inside of the mysql_query() function, replace it with a variable like $sql1 and $sql2 for the second one. Then also echo them just before you call the mysql_query so that we can see what the actual SQL string look like.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18799279
Quick and dirty fix for this problem is to simply explicitly change the action url to:
<form method="post" action="http://localhost/mysite/pages/changingarticle.php?id=<?=$id?> " style="margin-left:1px;">

instead of

<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" style="margin-left:1px;">
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 21

Author Comment

by:jvuz
ID: 18799283
You mean like line 13? And do I need to change the following 2 lines also?
0
 
LVL 17

Expert Comment

by:psimation
ID: 18799334
Change:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$res = mysql_query("SELECT title, article, category, author FROM articles WHERE id = " .$id) or die('QUERY_SELECT ERROR: <hr />' . mysql_error());
                                       $results = mysql_fetch_assoc($res);
                                      if($_SERVER['REQUEST_METHOD'] == 'POST')
                                       {
                                          if (strlen(trim($_POST['title']) < 2) && strlen(trim($_POST['article']) < 2))
                                          {
                                             $error = "One or both fields are empty. This is not allowed. Please fill something in.";
                                          }    
                                          if (empty($error))
                              {
                                 //error is niet leeg dus query uitvoeren
                                       $update = mysql_query("UPDATE articles SET title = '" . mysql_real_escape_string($_POST['title']). "', article = '". mysql_real_escape_string($_POST['article']) . "' WHERE id = "  . $id) or die('QUERY_UPDATE ERROR: <hr />'. mysql_error());
                     echo "Changes have been made!";
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

to:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$sql2 = "SELECT title, article, category, author FROM articles WHERE id = " .$id;
echo $sql2;
$res = mysql_query($sql2) or die('QUERY_SELECT ERROR: <hr />' . mysql_error());
                                       $results = mysql_fetch_assoc($res);
                                      if($_SERVER['REQUEST_METHOD'] == 'POST')
                                       {
                                          if (strlen(trim($_POST['title']) < 2) && strlen(trim($_POST['article']) < 2))
                                          {
                                             $error = "One or both fields are empty. This is not allowed. Please fill something in.";
                                          }    
                                          if (empty($error))
                              {
                                 //error is niet leeg dus query uitvoeren
$sql3 = 'UPDATE articles SET title =" '. mysql_real_escape_string($_POST['title']).'" , article = "'. mysql_real_escape_string($_POST['article']) .'"  WHERE id = '. $id;
echo $sql3;
                                       $update = mysql_query($sql3) or die('QUERY_UPDATE ERROR: <hr />'. mysql_error());
                     echo "Changes have been made!";
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Do copy that last $sql3 from here, coz it's got single quotes next to double quotes that you can't easily see...
0
 
LVL 6

Expert Comment

by:deresh
ID: 18799383
that isn't necessary because id is already set either in incomming uri the first time, and later its stored in form in hidden field and then when posted appears again in $_POST or $_REQUEST


Also you are getting error because this code doesn't handle new articles or articles that doesn't exists in database. So for this to function you have to call this script with id in url


0
 
LVL 21

Author Comment

by:jvuz
ID: 18799407
You mean like this?

http://www.plaatscode.be/4785/

When I perform it with this code, after I made the change and I come back to changingarticle (so without the id at the end of the url) the echo of the sql shows changingarticle.php?id=40 so I think it takes the id correctly. WHat do you think?
0
 
LVL 17

Expert Comment

by:psimation
ID: 18799451
put the ?id=<?=$id?> behind the URL in the action line of the form.

It *shouldn't * make any difference as deresh has pointed out, but then again, it wouldn't hurt either, we are doing fault diagnosis now, so the more input we get the better. This way, you will see immediately if you DON'T have the $id value in the URL when you do a submit.

Also, please post the output when running thescript, I want to see what the $sqlx looks like. At this point,the problem could be with the sql, and not with your script.
0
 
LVL 21

Author Comment

by:jvuz
ID: 18799492
Have you checked my last post (plaatscode), just to make sure I did the cahnges correctly.

For now I have two outputs: before I make the change:
one before the beginning of all the rest:
SELECT category FROM articles WHERE id=38

and one just before the form:
SELECT title, article, category, author FROM articles WHERE id = 38

Then after I change something and hit "change" and get back to (in this case: http://localhost/mysite/pages/changingarticle.php?id=38

and I get again before the rest starts:
SELECT category FROM articles WHERE id=38

But nothing's changed.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18799553
your latest code posting looks like you posted the code twice, also, the form action only has your page's name, NOT the ?id=<?=$id?> behind it.

The reason I want you to add this behind the URL is so that we can see if it passes the id correctly back to the page via $_GET , that way, simulating the way you enter the page the first time ( via a link; thus it's getting it's value for $id from a $_GET var).

The value for $id will be the same at the end of the day, regardless of whether it gets it from the URL or from the POST var in your form, but I need to cancell that as a possible reason why your script is not working.

In your output, you don't see the "update" sql at all? - that means the code does not get into that sub-routine, and it's also the cause for "nothing to be changed" in the db; the DB content won't change unless the "UPDATE" query runs... So, we need to see why the code is not going into that routine.

Please fix your code and post back so I can trouble shoot again.
0
 
LVL 21

Author Comment

by:jvuz
ID: 18799575
Here's the latest code:
http://www.plaatscode.be/4786/
0
 
LVL 17

Expert Comment

by:psimation
ID: 18799656
OK, try this:

change:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<?php
                                                if(is_numeric($id))
                                                {
                                             $sql2 = "SELECT title, article, category, author FROM articles WHERE id = " .$id;
                                                  echo $sql2;
                                                  $res = mysql_query($sql2) or die('QUERY_SELECT ERROR: <hr />' . mysql_error());
                                       $results = mysql_fetch_assoc($res);
                                      if($_SERVER['REQUEST_METHOD'] == 'POST')
                                       {
                                          if (strlen(trim($_POST['title']) < 2) && strlen(trim($_POST['article']) < 2))
                                          {
                                             $error = "One or both fields are empty. This is not allowed. Please fill something in.";
                                          }    
                                          if (empty($error))
                              {
                                 //error is niet leeg dus query uitvoeren
                                                                $sql3 = 'UPDATE articles SET title =" '. mysql_real_escape_string($_POST['title']).'" , article = "'. mysql_real_escape_string($_POST['article']) .'"  WHERE id = '. $id;
                                                                echo $sql3;
                                       $update = mysql_query($sql3) or die('QUERY_UPDATE ERROR: <hr />'. mysql_error());
                              echo "Changes have been made!";
                              }
                              else
                                    {
                                       //error is niet leeg dus error weergeven
                                       echo $error;
                                    }
                                       }
                                               
                                                // form without PHP
                                                ?>
<!-- HIER FORMULIER -->
                                                <form method="post" action="http://localhost/eindwerk2/pages/changingarticle.php?id=<?=$id?> " style="margin-left:1px;">
                                                <table>
                                                   <tr>
                                                      <td>
                                                         <input type="hidden" name="id" value="<?php echo $id; ?> " />
                                                </td>
                                                   </tr>
                                                   <tr>
                                                      <td valign="top">
                                                         Title
                                                      </td>
                                          <td>
                                             <input type="text" name="title" value="<?php echo $results['title']; ?>"style="width:535px;" />
                                    </td>
                                 </tr>
                                       <tr>
                                    <td valign="top">
                                       Article:
                                          </td>
                                          <td>
                                             <textarea id="article"  name="article" rows="10" style="width:535px;"><?php echo $results['article']; ?></textarea>
                                    </td>
                                       </tr>
                                       <tr>
                                          <td></td>
                                          <td>
                                             <input type="submit" value="Change" />
                                          </td>
                                       </tr>
                                                </table>
                                                </form>    

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

To:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<?php
                                                if($id)
                                                {
                                             $sql2 = "SELECT title, article, category, author FROM articles WHERE id = " .$id;
                                                  echo $sql2;
                                                  $res = mysql_query($sql2) or die('QUERY_SELECT ERROR: <hr />' . mysql_error());
                                       $results = mysql_fetch_assoc($res);
                                     // if($_SERVER['REQUEST_METHOD'] == 'POST')
                                        if($_POST['test'] == "posted")
                                       {
                                          //if (strlen(trim($_POST['title']) < 2) && strlen(trim($_POST['article']) < 2))
                                          //{
                                            // $error = "One or both fields are empty. This is not allowed. Please fill something in.";
                                          //}    
                                          //if (empty($error))
                              //{
                                 //error is niet leeg dus query uitvoeren
                                                                $sql3 = 'UPDATE articles SET title =" '. mysql_real_escape_string($_POST['title']).'" , article = "'. mysql_real_escape_string($_POST['article']) .'"  WHERE id = '. $id;
                                                                echo $sql3;
                                       $update = mysql_query($sql3) or die('QUERY_UPDATE ERROR: <hr />'. mysql_error());
                              echo "Changes have been made!";
                              //}
                              //else
                                //    {
                                       //error is niet leeg dus error weergeven
                                  //     echo $error;
                                   // }
                                       }
                                               
                                                // form without PHP
                                                ?>
<!-- HIER FORMULIER -->
                                                <form method="post" action="http://localhost/eindwerk2/pages/changingarticle.php?id=<?=$id?> " style="margin-left:1px;">
                                                <table>
                                                   <tr>
                                                      <td>
                                                         <input type="hidden" name="id" value="<?php echo $id; ?> " />
                                                </td>
                                                   </tr>
                                                   <tr>
                                                      <td valign="top">
                                                         Title
                                                      </td>
                                          <td>
                                             <input type="text" name="title" value="<?php echo $results['title']; ?>"style="width:535px;" />
                                    </td>
                                 </tr>
                                       <tr>
                                    <td valign="top">
                                       Article:
                                          </td>
                                          <td>
                                             <textarea id="article"  name="article" rows="10" style="width:535px;"><?php echo $results['article']; ?></textarea>
                                    </td>
                                       </tr>
                                       <tr>
                                          <td></td>
                                          <td>
 <input type="hidden" name="test" value="posted" />
                                             <input type="submit" value="Change" />
                                          </td>
                                       </tr>
                                                </table>
                                                </form>    

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
0
 
LVL 21

Author Comment

by:jvuz
ID: 18799686
Now I get also the following error message:
Notice: Undefined index: test in c:\program files\easyphp1-8\www\eindwerk2\pages\changingarticle.php on line 60

New code:http://www.plaatscode.be/4787/
0
 
LVL 17

Expert Comment

by:psimation
ID: 18799736
change
if($_POST['test'] == "posted")

to

if (isset($_POST['test']))
0
 
LVL 17

Expert Comment

by:psimation
ID: 18799919
PS, you do realize that the only reaon why this script is so "complicated" is because you are posting back to the same page? If you had the form post to a new page then things would have een much simpler and easier to trouble shoot. ;)

BUT, I know sometimes it looks better to do a post back...
0
 
LVL 21

Author Comment

by:jvuz
ID: 18801223
So, posting to a new page would be easier? That would be a reason to do that of course.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18801385
it would make it less "complicated" wrt keeping track of where variables come from, and if they have been posted already etc, BUT, I don't want to lead you off track now. How is the output looking after that latest changes?
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806021
Just calling the page, I get before the rest:
SELECT category FROM articles WHERE id=38
and before the form begins, I get:
SELECT title, article, category, author FROM articles WHERE id = 38

Then when I do a change, I don't get an error: Before everyhting starts I get:
SELECT category FROM articles WHERE id=38
and now before the form I get:
SELECT title, article, category, author FROM articles WHERE id = 38 UPDATE articles SET title =" test fdfsdf" , article = "test test dfsdfs" WHERE id = 38 Changes have been made!

And the changes really have been made!
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806027
But it doesn't yet do a check to see if one or the two fields are empty.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806049
Yes, the checks won't work, coz I commented them out in the last iteration of your code so that we could "simplify" the code to more easily see where the problems are.

Plz post the latest version again so we can start un-commenting the checking code.

Almost there ;)
 
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806061
Another issue (not a big issue, but still), when I change something, the changes are done stating with a space. Strange.
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806066
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806086
That's because there is a space after the title=" in your UPDATE SQL string.

change line 69. to this:
 $sql3 = 'UPDATE articles SET title ="'. mysql_real_escape_string($_POST['title']).'" , article = "'. mysql_real_escape_string($_POST['article']).'"  WHERE id = '. $id;

Now, for the "cehcking code":

start by removing the // at the beginning of the lines on lines:
62 to 67 and
73 to 79

and see if it works still...
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806090
oops, NOT line 76 and it';s 78 not 79. so:

uncomment
73, 74, 75 and
77 , 78
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806103
Now I get (before the form starts and after I tried to change something, I filled in something to see if this passes): SELECT title, article, category, author FROM articles WHERE id = 38 One or both fields are empty. This is not allowed. Please fill something in. Normally it shouldn't do that when I try to add something and when the 2 fields are filled in.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806117
That means that for some reason, the

if (strlen(trim($_POST['title']) < 2) && strlen(trim($_POST['article']) < 2)) is TRUE...

add this after line 60:

echo "title:".$_POST['title'];
echo "<br>article:".$_POST['article'];
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806128
If I do it like this (first line is line 60)
if (isset($_POST['test']))
echo "title:".$_POST['title'];
echo "<br>article:".$_POST['article'];

then I get:
SELECT title, article, category, author FROM articles WHERE id = 38
Notice: Undefined index: article in c:\program files\easyphp1-8\www\eindwerk2\pages\changingarticle.php on line 62

article:
Notice: Undefined index: title in c:\program files\easyphp1-8\www\eindwerk2\pages\changingarticle.php on line 64

Notice: Undefined index: article in c:\program files\easyphp1-8\www\eindwerk2\pages\changingarticle.php on line 64
One or both fields are empty. This is not allowed. Please fill something in.

Even before I made any changes, so just calling the page gives me that result.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806140
That's weird, maybe you have a caching problem. $_POST['test'] should not have a value UNTILL you submit a change, the errors you descibe above means that for some reason your script believes that it has already received a POST.

Try closing your browser and then when you re-open and it gives the same error, hit [Ctrl]+[F5] and see if that helps?
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806161
It doesn't change anything. Even when I clear all the cookies and cache...

Last code: http://www.plaatscode.be/4794/
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806242
OK, I'm just busy consulting the manual to see why it's doing that...

Will let u know shortly
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806270
No probs. Already very happy you ant help.

Thanx,
Jvuz
0
 
LVL 6

Expert Comment

by:deresh
ID: 18806403
                                       if (isset($_POST['test']))
                                        echo "title:".$_POST['title'];
                                                                                echo "<br>article:".$_POST['article'];
                                       {

this isnt right!!!!

move the two echo commands below bracket, now your code is terrible broken!

@psimation: don't be so hasty when consulting! you have broken this code several times now. Please double check befor posting.
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806422
The errors are gone now. Thanx deresh!
AfterI change something I get this:
SELECT title, article, category, author FROM articles WHERE id = 38 title:gfg
article:test test dfsdfsOne or both fields are empty. This is not allowed. Please fill something in.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806430
oops, I see.

yes, I'm a bit hasty sometimes, don't have alot of time on my hands, I'm leaving on leave in a couple of hours time, and won't be able to look at this post till next week Tuesday; that's why I'm trying to get things done in double time.

maybe you can take over from here?
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806463
jvuz

looks like this if statement is

if (strlen(trim($_POST['title']) < 2) && strlen(trim($_POST['article']) < 2)) is not "working"

change the two "echo" lines to this:

echo "title str len:".strlen(trim($_POST['title']));
echo "article str len:".strlen(trim($_POST['article']));

you could in theory also just change the if statement to this:

if (!$_POST['title'] || !$_POST['article'])

this will mean as long as there is at least 1 character in each, it will fall into the "error" routine. so if there is at least 1 char in each, it should do the UPDATE sql.



0
 
LVL 21

Author Comment

by:jvuz
ID: 18806474
After changeing I get :

SELECT title, article, category, author FROM articles WHERE id = 38 title str len:3article str len:16One or both fields are empty. This is not allowed. Please fill something in.
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806478
In thisarticle (38) the title is (without quotes) ' gfg'
article is 'test test dfsdfs'
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806484
Hmm, I can't remember now, but just try this, put the two "2" in the if statement in quotes, ie.:

if (strlen(trim($_POST['title']) < "2") && strlen(trim($_POST['article']) < "2"))

Don't know if it will change anything, but give it a try, else try to change the if staement to the one in y previous post.
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806499
Nope, doesn't change anything. Sorry.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806503
ok, just do a code update post plz.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806511
PS, deresh, where are u? Don't just come and make a post about how my help sux and then leave??? ;)

My head is full of images of the sand and sea - I'm practically useless, we really need a 3rd pair of eyes to see where the prob is. I think if we can get this "if" statement sorted, then your script will work...
0
 
LVL 6

Assisted Solution

by:deresh
deresh earned 150 total points
ID: 18806513
@jvuz:  your test is wrong, replace this line:

if (strlen(trim($_POST['title']) < 2) && strlen(trim($_POST['article']) < 2))

with:

if ((strlen(trim($_POST['title'])) < 2) && (strlen(trim($_POST['article'])) < 2))

the round brackets has been wrong placed

i think that this will be the last change :)
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806528
Well done man! See, a fresh pair of eyes always does the trick.
0
 
LVL 6

Expert Comment

by:deresh
ID: 18806530
@psimation:

firstly, this is NOT INSTANT MESSAGING, so i don't refresh this page every second or so. and secondly i have posted the right solution now.

I thought that you will solve this guy's problems, so i backed out. then i saw that you aren't getting anywhere so i decided to return and fix this.

so no hard feelings.
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806535
OK, now it passes, but when I fill in something blank it get filled in. Is it possible I need to put in a break after it says there are emty fields?
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806543
I really don't see this as a contest deresh.

Why do you feel you have to "back out" if someone else is commenting on the same problem, AFAIK, that's what EE is about, everyone pitches in to solve the problem. The Poster is the person who will decide who helped most, and that is always his/her perogative. I certainly don;'t participate for the points. It's about solving a problem.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806554
No, if the if statement now correctly checks and makes sure the str len for both fields are > 2, then it shouldn't do the "error" routine, but skip straight to the "Update" routine.

Plz post your updated code again.
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806558
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806566
When I make sure the fields are filled in, there is no problem. It saves the data. But when I leave some field empty, I get the message that there are some empty fields (so this is good), but it saves it anyway.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806574
OK, just out of curiosity: when you do fill in something blank, what is the output of the two "echo's" for the str lens?
I think spaces count as characters, but then again, the trim should take care of that...

Just post the output plz

Also, is it working as expected when you DO have something inside both fields ( ie. updating the DB)?
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806590
When I put something in both fields it accepts and saves all (this is good).

When I put only a space in title and test in the article I get this:

SELECT title, article, category, author FROM articles WHERE id = 38 title str len:0article str len:4UPDATE articles SET title =" " , article = "test" WHERE id = 38 Changes have been made!
0
 
LVL 17

Accepted Solution

by:
psimation earned 350 total points
ID: 18806604
try:

if ((strlen(trim($_POST['title'])) < 2) || (strlen(trim($_POST['article'])) < 2))


PS, I'm signing off now, hope you get it solved, I'm sure deresh will be able to help you out if there are anything else.
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806629
That did the trick. Thank you both guys for all the help. psimation, are you going on holiday now? If so, I'll hope you'll have a great time. You've earned it.
0
 
LVL 17

Expert Comment

by:psimation
ID: 18806651
Super! Glad it's working now!

Thx, will try to enjoy the holiday - only a week, but it's better than nothing ;)
0
 
LVL 21

Author Comment

by:jvuz
ID: 18806660
Have fun there!!!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now