473,671 Members | 2,430 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help finding this syntax error

4 New Member
I keep getting this syntax error in one of my webpages and I have looked through it and I can't find it. Its not my includes because they work fine on my other pages. Please Help!

Parse error: syntax error, unexpected $end in /home/david/public_html/post/realestate/commercial/edit_ad.php on line 537

Expand|Select|Wrap|Line Numbers
  1. <?php # edit_ad6002.php
  2.  
  3. // Include the configuration file for error management and such.
  4. require_once('/home/david/includes/config.inc.php');
  5.  
  6. require_once('/home/david/includes/mysql_connect.php');
  7.  
  8. $sc = 6002;
  9. $no_redirect = 'true';
  10. $title = "Raptorads.com - Post Ad - Edit Ad";
  11.  
  12. if (isset($_SESSION['user_id'])){
  13.    if (isset($_GET['a'])) {
  14.       $a = mysqli_real_escape_string($dbc, $_GET['a']);
  15.  
  16.       $query = "SELECT s FROM re WHERE ad_id=$a AND user_id=" . $_SESSION['user_id'];
  17.       $result = mysqli_query ($dbc, $query);
  18.       if (mysqli_num_rows($result) != 0){
  19.          $row = mysqli_fetch_array ($result, MYSQL_NUM);
  20.  
  21.          if ($row[0] == 1){
  22.             // Do nothing
  23.  
  24.             $rdir = 0;
  25.             $furl = "edit_ad.php?a=$a";
  26.          } elseif ($row[0] == 2){
  27.             if (isset($_GET['t']) && isset($_GET['k'])){
  28.                $t = $_GET['t'];
  29.                $k = $_GET['k'];
  30.                $rdir = 1;
  31.                $furl = "edit_ad.php?a=$a&t=$t&k=$k";
  32.             } else {
  33.                require_once('/home/david/includes/header3.htm');
  34.                require_once('/home/david/includes/session.inc.php');
  35.                echo '<div id="middle">' . "\n";
  36.                echo ' <div class="errors">' . "\n";
  37.                echo '  <h2>Error!</h2>' . "\n";
  38.                echo "  <p>Invalid or expired URL.</p>\n";
  39.                echo ' </div>' . "\n";
  40.                echo "</div><!-- End of Middle div-->\n";
  41.                require_once('/home/david/includes/footer2.htm');
  42.                exit();
  43.             }
  44.          } else {
  45.             require_once('/home/david/includes/header3.htm');
  46.             require_once('/home/david/includes/session.inc.php');
  47.             echo '<div id="middle">' . "\n";
  48.             echo ' <div class="errors">' . "\n";
  49.             echo '  <h2>Error!</h2>' . "\n";
  50.             echo "  <p>Invalid or expired URL.</p>\n";
  51.             echo ' </div>' . "\n";
  52.             echo "</div><!-- End of Middle div-->\n";
  53.             require_once('/home/david/includes/footer2.htm');
  54.             exit();
  55.          }
  56.       } else {
  57.          require_once('/home/david/includes/header3.htm');
  58.          require_once('/home/david/includes/session.inc.php');
  59.          echo '<div id="middle">' . "\n";
  60.          echo ' <div class="errors">' . "\n";
  61.          echo '  <h2>Error!</h2>' . "\n";
  62.          echo "  <p>Invalid or expired URL.</p>\n";
  63.          echo ' </div>' . "\n";
  64.          echo "</div><!-- End of Middle div-->\n";
  65.          require_once('/home/david/includes/footer2.htm');
  66.          exit();
  67.       }
  68.    } else {
  69.       require_once('/home/david/includes/header3.htm');
  70.       require_once('/home/david/includes/session.inc.php');
  71.       echo '<div id="middle">' . "\n";
  72.       echo ' <div class="errors">' . "\n";
  73.       echo '  <h2>Error!</h2>' . "\n";
  74.       echo "  <p>Invalid or expired URL.</p>\n";
  75.       echo ' </div>' . "\n";
  76.       echo "</div><!-- End of Middle div-->\n";
  77.       require_once('/home/david/includes/footer2.htm');
  78.       exit();
  79.    }
  80. } else {
  81.    require_once('/home/david/includes/header3.htm');
  82.    require_once('/home/david/includes/session.inc.php');
  83.    echo '<div id="middle">' . "\n";
  84.    echo '<div class="login">' . "\n";
  85.    echo '<form action="http://account.raptorads.com/login.php" method="post">' . "\n";
  86.    echo '<h2>You must be logged in to view this page.</h2>' . "\n";
  87.    echo '<label>User ID</label><br /><input type="text" name="user_name" size="20" maxlength="20" value="" /><br />' . "\n";
  88.    echo '<label>Password</label><br /><input type="password" name="pass" size="21" maxlength="20" /><br />' . "\n";
  89.    if (isset($ecurl)) {
  90.       echo '<input type="hidden" name="ecurl" value="' . $ecurl . '" />' . "\n";
  91.    }
  92.    echo '<input type="hidden" name="submitted" value="TRUE" />' . "\n";
  93.    echo '<input type="submit" name="submit" value="Login" /><br />' . "\n";
  94.    echo '<p>I forgot my <a href="http://account.raptorads.com/forgot_user.php">User ID</a> or <a href="http://account.raptorads.com/forgot_password.php">Password</a></p>' . "\n";
  95.    echo "</form>\n</div>\n";
  96.    echo "</div><!-- End of Middle div-->\n";
  97.    require_once('/home/david/includes/footer2.htm');
  98.    exit();
  99. }
  100.  
  101. $query = "SELECT title, description, price, pn FROM re WHERE ad_id=$a AND subcat=$sc AND user_id=" . $_SESSION['user_id'];
  102. $result1 = mysqli_query ($dbc, $query);
  103. $row1 = mysqli_fetch_array ($result1, MYSQL_NUM);
  104.  
  105. $pn = array(substr($row1[3], 0, 3), substr($row1[3], 3, 3), substr($row1[3], 6, 4));
  106.  
  107. if (substr($row1[2], 0, 1) == '$'){
  108.    $c = strlen($row1[2]) - 4;
  109.    $np = substr($row1[2], 1, $c);
  110. } else {
  111.    $np = $row1[2];
  112. }
  113.  
  114. if (mysqli_num_rows($result1) == 0) {
  115.    require_once('/home/david/includes/header3.htm');
  116.    require_once('/home/david/includes/session.inc.php');
  117.    echo '<div id="middle">' . "\n";
  118.    echo ' <div class="errors">' . "\n";
  119.    echo '  <h2>Error!</h2>' . "\n";
  120.    echo "  <p>Invalid or expired URL.</p>\n";
  121.    echo ' </div>' . "\n";
  122.    echo "</div><!-- End of Middle div-->\n";
  123.    require_once('/home/david/includes/footer2.htm');
  124.    exit();
  125. }
  126.  
  127. $query = "SELECT `cat`, `fsb`, `type`, `sqft`, `year`, `mls`, `street`, `city`, `state`, `zip` FROM `$sc` WHERE ad_id=$a";
  128. $result2 = mysqli_query ($dbc, $query);
  129. $row2 = mysqli_fetch_array ($result2, MYSQL_NUM);
  130.  
  131. if (isset($_POST['submitted'])){
  132.    $errors = array();
  133.  
  134.    if (empty($_POST['cat'])){
  135.       $errors[] = '<p>Please select a Category!</p>';
  136.    } else {
  137.       if (strlen($_POST['cat']) <= 4){
  138.       $cat = escape_data($_POST['cat']); 
  139.       } else {
  140.       $errors[] = '<p>Category is invalid!</p>';
  141.       } 
  142.    }
  143.  
  144.    if (empty($_POST['fsb'])){
  145.       $errors[] = '<p>Please select a For Sale By!</p>';
  146.    } else {
  147.       if (strlen($_POST['fsb']) <= 7){
  148.       $fsb = escape_data($_POST['fsb']); 
  149.       } else{
  150.       $errors[] = '<p>For Sale By is invalid!</p>';
  151.       } 
  152.    }
  153.  
  154.    if (empty($_POST['type'])){
  155.       $errors[] = '<p>Please select a Type!</p>';
  156.    } else {
  157.       if (strlen($_POST['type']) <= 18){
  158.       $type = escape_data($_POST['type']); 
  159.       } else{
  160.       $errors[] = '<p>Type is invalid!</p>';
  161.       } 
  162.    }
  163.  
  164.    if (empty($_POST['sqft'])){
  165.       $errors[] = '<p>Please enter the SqFt!</p>';
  166.    } else {
  167.       $sqft = str_replace(",", "", $_POST['sqft']);
  168.       if (strlen($sqft) <= 5 && is_numeric($sqft)){
  169.       $sqft = escape_data($sqft); 
  170.       } else{
  171.       $errors[] = '<p>SqFt are invalid!</p>';
  172.       } 
  173.    }
  174.  
  175.    if (empty($_POST['year'])){
  176.       $errors[] = '<p>Please select the Year built!</p>';
  177.    } else {
  178.       if ($_POST['year'] >= 1900 && $_POST['year'] <= 2011 && is_numeric($_POST['year'])){
  179.       $year = escape_data($_POST['year']); 
  180.       } else{
  181.       $errors[] = '<p>Year is invalid!</p>';
  182.       } 
  183.    }
  184.  
  185.    if (empty($_POST['mls'])){
  186.       $mls = "NULL";
  187.    } else {
  188.       if (is_numeric($_POST['mls']) && strlen($_POST['mls']) <= 8){
  189.       $mls = "'" . escape_data($_POST['mls']) . "'"; 
  190.       } else{
  191.       $errors[] = '<p>MLS number is invalid!</p>';
  192.       } 
  193.    }
  194.  
  195.    if (empty($_POST['street'])){
  196.       $errors[] = '<p>Please enter the Street!</p>';
  197.    } else {
  198.       if (strlen($_POST['street']) <= 45){
  199.       $street = escape_data($_POST['street']); 
  200.       } else{
  201.       $errors[] = '<p>Street is invalid!</p>';
  202.       } 
  203.    }
  204.  
  205.    if (empty($_POST['city'])){
  206.       $errors[] = '<p>Please enter the City!</p>';
  207.    } else {
  208.       if (strlen($_POST['city']) <= 45){
  209.       $city = escape_data($_POST['city']); 
  210.       } else{
  211.       $errors[] = '<p>City is invalid!</p>';
  212.       } 
  213.    }
  214.  
  215.    if (empty($_POST['state'])){
  216.       $errors[] = '<p>Please select the State!</p>';
  217.    } else {
  218.       if (strlen($_POST['state']) <= 2){
  219.       $state = escape_data($_POST['state']); 
  220.       } else{
  221.       $errors[] = '<p>State is invalid!</p>';
  222.       } 
  223.    } 
  224.  
  225.    if (empty($_POST['zip'])){
  226.       $errors[] = '<p>Please enter the Zip Code!</p>';
  227.    } else {
  228.       if (is_numeric($_POST['zip']) && strlen($_POST['zip']) <= 5){
  229.       $zip= escape_data($_POST['zip']); 
  230.       } else{
  231.       $errors[] = '<p>Zip Code is invalid!</p>';
  232.       } 
  233.    }
  234.  
  235.    if (empty($_POST['ac']) && empty($_POST['phone1']) && empty($_POST['phone2'])){
  236.       $errors[] = '<p>Please enter a Phone Number!</p>';
  237.    } else {
  238.       if (is_numeric($_POST['ac'])){
  239.          if (strlen($_POST['ac']) <= 3){ 
  240.             $ac = $_POST['ac'];
  241.          } else {
  242.             $errors[] = '<p>Area Code is invalid!</p>';
  243.          }
  244.       } else {
  245.          $errors[] = '<p>Please enter an Area Code!</p>';
  246.       }
  247.  
  248.       if (is_numeric($_POST['phone1']) && is_numeric($_POST['phone2'])){
  249.          $phone = $_POST['phone1'] . $_POST['phone2'];
  250.          if (strlen($phone) <= 7){ 
  251.             $pn = $ac . $phone;
  252.          } else {
  253.             $errors[] = '<p>Phone Number is invalid!</p>';
  254.          }
  255.       }
  256.    }
  257.  
  258.    if (empty($_POST['price'])){
  259.       $errors[] = '<p>Please enter the Price!</p>';
  260.    } else {
  261.       $p = str_replace(",", "", $_POST['price']);
  262.       if (strlen($p) <= 14 && is_numeric($p)){
  263.          if ($cat == 'Rent'){
  264.             $p = '$'.number_format(escape_data($p)).'/mo'; 
  265.          } else {
  266.             $p = escape_data($p);
  267.          }
  268.       } else{
  269.          if (strtolower($_POST['price']) == 'please contact'){
  270.             $p = 'Please Contact';
  271.          } else {
  272.             $errors[] = '<p>Price is invalid!</p>';
  273.          }
  274.       } 
  275.    }
  276.  
  277.    if (empty($_POST['title'])){
  278.       $errors[] = '<p>Please enter a Title!</p>';
  279.    } else {
  280.       if (strlen($_POST['title']) <= 60){
  281.       $ti = escape_data($_POST['title']); 
  282.       } else{
  283.       $errors[] = '<p>Title is too long!</p>';
  284.       } 
  285.    }
  286.  
  287.    if (empty($_POST['desc'])){
  288.       $errors[] = '<p>Please enter a Description!</p>';
  289.    } else {
  290.       if (strlen($_POST['desc']) <= 1600){
  291.       $desc = escape_data($_POST['desc']); 
  292.       } else{
  293.       $errors[] = '<p>Description is too long!</p>';
  294.       } 
  295.    }
  296.  
  297.    if (empty($errors)) { //If everything's OK.
  298.  
  299.       $query = "SELECT city, state, zone FROM zips WHERE zip='$zip'";
  300.       $result = mysqli_query ($dbc, $query) or DIE;
  301.       if (mysqli_num_rows($result) == 1) {
  302.          $row = mysqli_fetch_array ($result,MYSQL_NUM);
  303.          $cs = $row[0] . ', ' . $row[1];
  304.          $z = $zip;
  305.          $lz = $row[2];
  306.  
  307.          $query = "UPDATE `re` SET `title`='$ti', `description`='$desc', `price`='$p', `cs`='$cs', `zip`='$z', `region`='$lz', `pn`='$pn' WHERE `ad_id`=$a AND `user_id`=" . $_SESSION['user_id'];
  308.          mysqli_query ($dbc, $query);
  309.  
  310.          $query = "UPDATE `$sc` SET `cat`='$cat', `fsb`='$fsb', `type`='$type', `sqft`='$sqft', `year`='$year', `mls`=$mls, `street`='$street', `city`='$city', `state`='$state', `zip`='$zip' WHERE `ad_id`=$a";
  311.          mysqli_query ($dbc, $query);
  312.  
  313.          if ($rdir == 1){
  314.             $url = "http://post.raptorads.com/realestate/ad_preview.php?a=$a&t=$t&k=$k";
  315.             header("Location: $url");
  316.          } else {
  317.             $url = "http://account.raptorads.com";
  318.             header("Location: $url");
  319.          }
  320.       } else {
  321.          $errors[] = '<p>This zip code is not in our database!</p>';
  322.       } 
  323.    }
  324. }
  325.  
  326. require_once('/home/david/includes/header3.htm');
  327.  
  328. require_once('/home/david/includes/session.inc.php');
  329. ?>
  330.  
  331. <div id="middle">
  332. <?php
  333.  
  334. echo '<div class="ad_upload">' . "\n";
  335.  
  336. if (isset($_POST['submitted'])){
  337.    if ($errors){ // If one of the data tests failed.
  338.       echo ' <div class="errors">' . "\n";
  339.       echo '  <h2>Error!</h2>' . "\n";
  340.       foreach ($errors as $msg) { // Print each error.
  341.                echo "  $msg\n";
  342.       }
  343.       echo ' </div>' . "\n";
  344.    }      
  345. }
  346.  
  347. ?>
  348.  
  349. <h3>Property Details</h3>
  350. <p>* = required field</p>
  351. <form name="re" method="POST" action="<?php echo $furl; ?>">
  352. <table>
  353. <tr>
  354. <th>*Category</th>
  355. <td>
  356. <select name="cat">
  357.   <option value="">Choose a Category</option>
  358. <?php
  359. $a = array("Own", "Rent");
  360. for ($i = 0; $i <= 1; $i++){
  361.    echo '  <option value="' . $a[$i] . '"';
  362.    if (isset($_POST['cat']) && $_POST['cat'] == $a[$i]){ 
  363.       echo ' selected="selected"';
  364.    } else {
  365.       if ($row2[0] == $a[$i]){
  366.          echo ' selected="selected"';
  367.       }
  368.    }
  369.    echo '>' . $a[$i] . "</option>\n";
  370. }
  371. ?>
  372. </select>
  373. </td>
  374. </tr>
  375. <tr>
  376. <th>*For Sale By</th>
  377. <td>
  378. <select name="fsb">
  379.   <option value="">For Sale By?</option>
  380. <?php
  381. $a = array("Agent", "Owner");
  382. for ($i = 0; $i <= 1; $i++){
  383.    echo '  <option value="' . $a[$i] . '"';
  384.    if (isset($_POST['fsb']) && $_POST['fsb'] == $a[$i]){ 
  385.       echo ' selected="selected"';
  386.    } else {
  387.       if ($row2[1] == $a[$i]){
  388.          echo ' selected="selected"';
  389.       }
  390.    }
  391.    echo '>' . $a[$i] . "</option>\n";
  392. }
  393. ?>
  394. </select>
  395. </td>
  396. </tr>
  397. <tr>
  398. <th>*Type</th>
  399. <td>
  400. <select name="type">
  401.   <option value="">Choose a Type</option>
  402. <?php
  403. $a = array("Apartment Building", "Office Building", "Retail Building", "Warehouse");
  404. for ($i = 0; $i <= 3; $i++){
  405.    echo '  <option value="' . $a[$i] . '"';
  406.    if (isset($_POST['type']) && $_POST['type'] == $a[$i]){ 
  407.       echo ' selected="selected"';
  408.    } else {
  409.       if ($row2[2] == $a[$i]){
  410.          echo ' selected="selected"';
  411.       }
  412.    }
  413.    echo '>' . $a[$i] . "</option>\n";
  414. }
  415. ?>
  416. </select>
  417. </td>
  418. </tr>
  419. <tr>
  420. <th>*Year Built</th>
  421. <td>
  422. <select name="year">
  423.   <option value="">Choose a Year</option>
  424. <?php
  425. for ($i = 2011; $i >= 1900; $i--){
  426.    echo '  <option value="' . $i . '"';
  427.    if (isset($_POST['year']) && $_POST['year'] == $i){ 
  428.       echo ' selected="selected"';
  429.    } else {
  430.       if ($row2[4] == $i){
  431.          echo ' selected="selected"';
  432.       }
  433.    }
  434.    echo '>' . $i . "</option>\n";
  435. }
  436. ?>
  437. </select>
  438. </td>
  439. </tr>
  440. <tr>
  441. <th>*SqFt.</th>
  442. <td>
  443. <input type="text" name="sqft" value="<?php if (isset($_POST['sqft'])){echo htmlspecialchars($_POST['sqft']);}else{ echo $row2[3];}?>" maxlength="6" />
  444. </td>
  445. </tr>
  446. <tr>
  447. <th>MLS number</th>
  448. <td>
  449. <input type="text" name="mls" value="<?php if (isset($_POST['mls'])){echo htmlspecialchars($_POST['mls']);}else{ echo $row2[5];}?>" maxlength="8" />
  450. </td>
  451. </tr>
  452. </table>
  453. <img src="http://raptorads.com/images/graphics/hr.gif" width="940" height="5" alt="" border="0" />
  454. <h3>Address of Property</h3>
  455. <div class="address">
  456.    <div class="street">
  457.    <label for="street">*Street</label>
  458.    <input type="text" name="street" value="<?php if (isset($_POST['street'])){echo htmlspecialchars($_POST['street']);}else{ echo $row2[6];?>" maxlength="45" id="street" />
  459.    </div>
  460.  
  461.    <div class="city">
  462.    <label for="city">*City</label>
  463.    <input type="text" name="city" id="city" value="<?php if (isset($_POST['city'])){echo htmlspecialchars($_POST['city']);}else{ echo $row2[7];}?>" maxlength="45" />
  464.    </div>
  465.  
  466.    <div class="state">
  467.    <label for="state">*State</label>
  468.    <select name="state" id="state">
  469.       <option selected value="">-Select-</option>
  470. <?php
  471. $a = array("AL", "FL", "GA");
  472. for ($i = 0; $i <= 2; $i++){
  473.    echo '  <option value="' . $a[$i] . '"';
  474.    if (isset($_POST['state']) && $_POST['state'] == $a[$i]){ 
  475.       echo ' selected="selected"';
  476.    } else {
  477.       if ($row2[8] == $a[$i]){
  478.          echo ' selected="selected"';
  479.       }
  480.    }
  481.    echo '>' . $a[$i] . "</option>\n";
  482. }
  483. ?>
  484.    </select>
  485.    </div>
  486.  
  487.    <div class="zip">
  488.    <label for="zip">*Zip</label>
  489.    <input type="text" name="zip" id="zip" value="<?php if (isset($_POST['city'])){echo htmlspecialchars($_POST['city']);}else{ echo $row2[9];}?>" maxlength="5" />
  490.    </div>
  491. </div>
  492. <img src="http://raptorads.com/images/graphics/hr.gif" width="940" height="5" alt="" border="0" />
  493. <h3>Ad Information</h3>
  494.    <div class="phone">
  495.     <label>*Phone #</label>
  496.     (<input type="text" style="width:30px" name="ac" value="<?php if (isset($_POST['ac'])){echo htmlspecialchars($_POST['ac']);}else{echo $pn[0];}?>" maxlength="3" />) <input type="text" style="width:30px" name="phone1" value="<?php if (isset($_POST['phone1'])){echo htmlspecialchars($_POST['phone1']);}else{echo $pn[1];}?>" maxlength="3" /> - <input type="text" style="width:50px" name="phone2" value="<?php if (isset($_POST['phone2'])){echo htmlspecialchars($_POST['phone2']);}else{echo $pn[2];}?>" maxlength="4" />
  497.    </div>
  498. <table>
  499. <tr>
  500. <th>*Price</th>
  501. </tr>
  502. <tr>
  503. <td style="padding: 0;">
  504. $<input type="text" class="small-input" name="price" value="<?php if (isset($_POST['price'])){echo htmlspecialchars($_POST['price']);}else{ echo $np;}?>" maxlength="14" /><br />
  505. <span>e.g. (1234 or please contact)</span>
  506. </td>
  507. </tr>
  508. <tr>
  509. <th>*Title</th>
  510. </tr>
  511. <tr>
  512. <td style="padding: 0;" colspan="2">
  513. <input type="text" class="large-input" name="title" value="<?php if (isset($_POST['title'])){echo htmlspecialchars($_POST['title']);}else{ echo $row1[0];}?>" maxlength="60" />
  514. </td>
  515. </tr>
  516. <tr>
  517. <th>*Description</th>
  518. </tr>
  519. <tr>
  520. <td style="padding: 0;" colspan="2">
  521. <textarea name="desc" onKeyDown="textCounter(document.re.desc,document.re.remLen2,1600)" onKeyUp="textCounter(document.re.desc,document.re.remLen2,1600)"><?php if (isset($_POST['city'])){echo htmlspecialchars($_POST['city']);}else{ echo $row1[1];}?></textarea><br />
  522. <input readonly type="text" name="remLen2" maxlength="4" value="1600" class="tiny-input">
  523. characters remaining
  524. </td>
  525. </tr>
  526. </table>
  527. <input type="hidden" name="submitted" value="TRUE" />
  528. <input type="submit" value="Save Changes">
  529. </form>
  530. </div>
  531.  
  532. </div><!-- End of Middle div-->
  533.  
  534. <?php
  535. require_once('/home/david/includes/footer2.htm');
  536. ?>
Jul 12 '11 #1
5 1819
dlite922
1,584 Recognized Expert Top Contributor
You missed a curly braces somewhere. The placement of which could depend on your code, so trace your curly braces {} and pair them up until you find the missing one.

Dan
Jul 12 '11 #2
David Morris
4 New Member
I have checked and rechecked and I still can't find it.
Jul 12 '11 #3
David Morris
4 New Member
I found it!!! I just kept removing sections of code until I found the section it was in. FYI its on line 458. Thanks for the help!
Jul 12 '11 #4
John Doe
20 New Member
David,

The closing curly brace is missing from line 458, just after the $row2[6];

Lol, looks like you found it while I was looking too.
Jul 12 '11 #5
David Morris
4 New Member
lol Thanks anyway it was a hard one for me to find.
Jul 13 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

7
3818
by: Julien - Marseille | last post by:
Hello, I need help for php syntax when i call Mysql database I have wrote that and my sql connection is working I just have a problem with this command line : $query = "SELECT * FROM utilisateurs WHERE pseudo_utilisateur='$login';";
14
3072
by: sam | last post by:
When I run this SQL query: SELECT u.*, o.* FROM users u, orders o WHERE TO_DAYS(o.order_date) BETWEEN TO_DAYS('2003-09-20')-10 AND TO_DAYS('2003-09-20')+10
1
3349
by: Steve | last post by:
I just spent waaaaaaaaaaaayy too much time trying to track down an error that was incorrectly reported just now, and I would like to see if someone can explain to me why it was reported that way. The purpose of the code is simply to delete a record and then redirect back to the page where the delete was started. The code looks like this: elseif ($_GET == "delete") { $query = "delete from product_subcategory2 where product_sku=$_GET and...
3
4801
by: priscilla.jenkins | last post by:
Alright, I'm really new to SQL and VBA and all this, so I might be completely off course...but just tell me. I know C and Assembly, but that doesn't help me much here. I'm trying to create a module that creates 5 queries (that a report is based on) based on a table that the user defines. My tables are named by date (not my choice), for example: -ArchivedActions05-20-05 Everything involving that seems fine. I'm getting a syntax error...
5
4501
by: r.nikhilk | last post by:
Hi, Currently, we are porting C++ applications from 32 bit to 64 bit on AIX platform. (The current version of AIX is 5.3 and xlC verison is 8.0). We are able to compile the applications by including the -q64 option in xlC compiler. And we are able to link all these libraries to one of the main applications and generate an executable. SKLoader. But, when we try to run this main executable, we are getting the following errors:
3
16232
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very strange error. In your experience, where I should looking to find the real error? Surely the sintax of glut is correct... gcc.exe -c glut_bitmap.c -o glut_bitmap.o -I"C:/Dev-Cpp/include" -I"../../include" -D__GNUWIN32__ -W -DWIN32 -DNDEBUG...
3
4120
by: Maximus | last post by:
Can some one help me with finding the error is this statement? strSQL_Update = "UPDATE tblWJS_SuperInput SET JobNumber= '"& strJobNumber &"', " _ & "WeekendingDate = '"& strWeekEndingDate &"', "_ & "CurrentHours = '"& strCurrentHours &"', "_ & "CurrentHoursTaping = '"& strCurrentHoursTaping &"', "_ & "ReportRequired_01 = '"& strReportRequired_01 &"', " _ & "ReportRequired_02 = '"& strReportRequired_02 &"', " _ & "ReportRequired_03 =...
14
44811
by: kigoobe | last post by:
Well guys, I have tested a script that's working well in FF, however while testing with IE7, I am finding errors. That famous yellow warning icon at the left of our status bar. Basically, I am opening a new popup window using dhtmlgoodies modal message tool. It opens well in FF, however in IE, the yellow icon appears with a bunch of erros as soon as the new window opens up. The erros are - 1. Syntax error, line 3, character 6. 2....
17
3127
by: trose178 | last post by:
Good day all, I am working on a multi-select list box for a standard question checklist database and I am running into a syntax error in the code that I cannot seem to correct. I will also note that I am using Allen Browne's multi-select list box for a report as a guide. I should also note that my access skills are not the best so I may need some explaining on certain things. First let me give some background on the database: I have a...
14
5497
riverdale1567
by: riverdale1567 | last post by:
Hi I am a newbie trying to get some of my first code working, yada yada yada. I have a drop down box which chooses a state then takes the post data to 'processform2.php' to use that to pull up all the rows which have the corresponding state. I am getting this 'Parse error: syntax error, unexpected T_STRING in /home/attorney/public_html/' on line 13 <? $username="XXXXXXXX"; $password="XXXXXX"; $database="XXXXXXXX";
0
8481
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8400
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8672
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7441
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4412
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2817
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2058
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.