Please Help PHP mysqli

Hello, i have made a website coded in php and it uses mysql to store some of it's data. It worked fine on my imac with normal snow leopard and their preinstalled php, but when i transfered the same files over to snow leopard server they where unable to access the mysqli. What should i do to fix this problem and make mysqli work on the server?

Ok, yes mysql in setup, and navicat is able to access it. Also i am somewhat new to php, and i am young so dont judge how the code looks, just know that it works, because it did on my own normal snow leopard server. You can view the site at forumz.forumzbb.com and download it's source at forumz.forumzbb.com/forumz.zip.
Two of the main parts i would like to point out are on index.html where it sets the connection data, and stores the connection in a global variable, that is where my error occurs the the script dies. It fails to connect. I have check user and pass, they are correct, and none of this code has changed from last server. Also go to almost any function on the functions/forumz.main.php or account.php and look at where it calls the global and executes a query, although this shouldnt matter because the code never even reaches there.

Similar Messages

  • Please Help PHP email!!!

    HelloGuys
    I am having a hard time getting my contact form to work via php, the problem is that whatever the customer puts in is not coming through to me only the field names please say you can help me
    Here the codes
    <?php>
    /* Subject and Email Variables */
         $emailSubject = 'Speech Creative Inquires';
         $webMaster = '[email protected]';
    /* Gathering Data Variables */
        $nameField = $_POST['fullname'];
         $companyField = $_POST['company'];
         $phoneField = $_POST['phone'];
         $emailField = $_POST['email'];
         $requestsField = $_POST['requests'];
         $body = <<<EOD
    <br><hr><br>
    Full Name: $fullname <br>
    Company: $company <br>
    Phone: $phone <br>
    Email: $email <br>
    Request: $requests <br>
    EOD;
        $headers = "From: $email\r\n";
         $headers .= "Content-type: text/html\r\n";
         $success = mail($webMaster, $emailSubject, $body,
      $headers);
    /* Results rendered as HTML */
        $theResults = <<<EOD
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Thank You from Speech Creative</title>
    <style type="text/css">
    <!--
    body,td,th {
         color: #FFFFFF;
    body {
         background-color: #000000;
         background-image: url(thanks.jpg);
         background-repeat: no-repeat;
    .style4 {
         font-family: "Abadi MT Condensed Light";
         font-size: 24px;
    -->
    </style>
    <script type="text/javascript">
    <!--
    function MM_swapImgRestore() { //v3.0
       var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
       var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
         var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
         if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
       var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
         d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
       if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
       for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
       if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
       var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
        if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    </head>
    <body>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p align="center" class="style4">Thank You for your interest in Speech Creative, We will respond as soon as possible</p>
    <p align="center" class="style4"> </p>
    <p align="center" class="style4"><a href="home.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','homeoff.jpg',0)"><img src="homeon.jpg" alt="Homepage" name="home" width="103" height="62" border="0" id="home" /></a></p>
    </body>
    </html>
    EOD;
    echo "$theResults";
    ?>

    Not the way to learn PHP, but you can save yourself a lot of effortfor $99.00
    see http://www.webassist.com/software/universal-email/
    I use it all the time with no problems.
    Howard WAlker

  • PHP/mySQL code help please

    Hi all,
    Thanks to David Powers fab tutorial I am now well on my way to competeing my first dynamique website using PHP/mySQL, (thanks David ), however I am stuck on one particular area....can anyone please help?
    I know that the mySQL database uses the format YYYY/MM/DD for dates, and that is fine. I've sorted out how to display in a more regular format (eg. 1st September 2011) for my application, but I am stuck on how to convert a more regular formatted date entered by the site user into the mySQL format.
    Ideally I would like for the users entry or say either 1/9/11 or 1-9-11 (or something along those lines, to be recognised and displayed on the entry form, but to have a backend function that converts the data to mySQL format. I seem to be reading plenty of forum posts which say this can be done, but unfortunately I can't quite seem to fathom how, or where the code should sit. Would someone mind taking a look at my code page to actually identify what I need to insert, and equally as importantly...where!!!
    Along these lines...is it possible to have a mini-calendar date picker that could be embedded next to the date entry field to ensure that a valid date is entered and in the correct format? Where could this be sourced?
    Thanks in advance of some much needed help
    Mark

    This is becoming really frustrating for me (so god knows how I am to you!!!!), but I usually pick things up so fast and yet this whole PHP/SQL thing is eluding me!!
    I can see (I think) how the code would work, but am struggling to see where it fits into place with my own Dreamweaver 'Update Record' code, as follows. I have spent a couple of days trawling through PHP.net and various other sites and forums before bringing my stupidity to the public domain, but I just can't seem to crack it.
    This one last time then i'll leave you in peace??????
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
        $updateSQL = sprintf("UPDATE gig_guide SET `date`=%s, town=%s, venue=%s, private_or_public=%s, start_time=%s WHERE `index`=%s",
                           GetSQLValueString($_POST['date'], "date"),
                           GetSQLValueString($_POST['town'], "text"),
                           GetSQLValueString($_POST['venue'], "text"),
                           GetSQLValueString($_POST['type'], "text"),
                           GetSQLValueString($_POST['start_time'], "text"),
                           GetSQLValueString($_POST['index'], "int"));
      mysql_select_db($database_online, $online);
      $Result1 = mysql_query($updateSQL, $online) or die(mysql_error());
      $updateGoTo = "index.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $updateGoTo));
    $colname_updatePost = "-1";
    if (isset($_GET['index'])) {
      $colname_updatePost = $_GET['index'];

  • I have downloaded MAMP for Mac and want to use it for working with Wordpress. I had mysql installed before this and would like to uninstall it and use MAMP. It was easy to turn off Apache and PHP but don't know how to uninstall mysql. Please help!!

    I have downloaded MAMP for Mac and want to use it for working with Wordpress. I'm on an Imac with Maverick OS 10.9. I had mysql installed before this and would like to uninstall it and use MAMP. It was easy to turn off Apache and PHP but don't know how to uninstall mysql. Please help!!

    It depends on how you installed it. You have to shutdown the MySQL service first. If you used the standard, but obsolete Startup Item, you can do that with the Startup Item. If you created a launchd script, you can do it with launchctl. Once MySQL is no longer running, you can delete the Startup Item or launchd script and the rest of MySQL.

  • I need help with DW, PHP & MySQL please.

    Hello, I am new to website development and am trying to set up a form for collecting data on my website and have a question that I can’t find an answer to anywhere else. I was wandering if someone there would be kind enough to help?  I am using Dreamweaver in CS4 and my host already has PHP & MySQL installed on the server that I can use.  My question is: Do I need to download XAMP or WAMP on my computer before trying to connect my form to the server?  Also, do I need to change the page I am putting the form on to .PHP extension or can I just embed the PHP form into an existing HTML page?
    Most of the training tutorials I’ve read don’t start at the most basic beginning but rather expect people to already have a basic knowledge of the topics they are trying to learn.  If anyone knows the best place to get answers to the most basic questions like this one or a beginners guide to working with DW, PHP & MySQL I will gladly go there rather than waste your time on questions you’ve probably already answered a bezillion times.
    Thank you for the help.

    Strictly speaking, you don't need XAMPP or WAMP on your local computer. But if you're serious about getting involved with PHP/MySQL, you should definitely set up a local testing environment with one or the other. It's safer and more efficient. Don't expose all your errors on a live server. You can find instructions on  how to set up a testing environment here: http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php.html.
    To develop with PHP, you should always use a .php file name extension. Any other choice is very rare.
    There's a tutorial on building your first dynamic website with DW here: http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt1.html.
    For more in-depth help, you might want to consider grabbing hold of a copy of "The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP". (Yes, I wrote it, so it's a bit of shameless self-promotion, but you'll find it answers many of your questions - and probably a lot you hadn't even thought of.)

  • Macromedia Dreamweaver "Unidentified Error" PHP MySQL, help please

    Ok,
    I've been developing web applications with with PHP/MySQL for some time now, but had been unable to afford dreamweaver to help me out. Thus every website I made came from strait "notepad" style typeing. Everything always worked just fine. Recently though I got my hands on Macromedia Studio MX, but have been having troubles ever since then.
    I wrote my own PHP script to connect to my MySQL database on my computer (localhost), and it worked like a charm. Then I went over to dreamweaver, followed all the steps, entered the information, clicked the "test" button and I get the an error "an unidentified error occured".
    At this point I checked everything tried again, and then that rendered the same result, I went online and found the same problem at Macromedia's webstie: http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_16515
    I've tried everything mentioned there to no avail. I was hopeing someone out there would know what is wrong with my connection. Quick summary:
    Trying to connect with Dreamweaver to localhost MySQL database, with PHP MySQL settings. I get "an unidentified error occured". But the informaiton has been verified as correct with my own PHP script.

    Sorry, but it doesn't help JTANNA.
    What is your definition of "more efficiently"? If it's limitation of search results, branded search, and limitation of styling your results then google search is more efficient. Real developers rely on their own developments. For example: how can google search display results from a password-protected site? They can't.
    best,
    Shocker

  • Apache2, PHP, MySQL Help

    Hi,
    Sorry if this is a bit of a newbie thing todo but I am not too good with solaris configuration yet.
    Can anyone supply a decent step by step and easy tutorial/how-to on how to set up Apache, PHP, MySQL and PHPmyadmin on a SPARC solaris 10 box please...
    Thanks Rob

    Can anyone supply a decent step by step and easy
    tutorial/how-to on how to set up Apache, PHP, MySQL
    and PHPmyadmin on a SPARC solaris 10 box please...Setting up Apache is very easy since all it takes is setting it up. Its installed by default, you can check /etc/apache for an example configuration file. Next to that www.apache.org/docs/ is also a very valuable read.
    <blunt SPAM>
    You could also consider looking into the Java webserver (formely SunONE). Its currently being made available for free with the Java Enterprise System and compares very well to Apache. If you'll also be doing some Java it would be a better choice (IMO its a better choice than Tomcat) and it can also do PHP.
    http://www.sun.com/software/products/web_srvr/home_web_srvr.xml
    http://www.zend.com/sun/?article=/sun/index.php&kind=&id=6179&open=1&anc=0&view=1
    http://www.php.net/
    </SPAM>
    As you'll note I included the PHP website because with the above setup you'd also need to manually setup PHP. If you have the companion CD present you can install the PHP module which will end up on /opt/sfw/apache. This directory will also present you a php.ini example which will need to be placed in /etc/apache as well. Setting it up is basicly following the documentation in the ini file, and the Apache documentation on adding an extra module (/opt/sfw/apache/libexec/libphp4.so).
    MySQL. Also very easy since its shipped with Solaris as well. Look into /etc/sfw/mysql for a README which covers the most essential steps to set it up. In short you'll need to setup a few directories for MySQL to work and optionally (but recommended) copy the default config file to /etc (/etc/my.cnf) which will define certain basic settings. The readme explains. Next you're likely to need the MySQL guide (if you're new with MySQL) which can be located at http://dev.mysql.com/doc/refman/4.1/en/index.html.
    This applies to the version (close enough anyway) which is shipped with Solaris. From personal experience I can say that MySQL 5 will also run very well on Solaris 10.
    Finally the PHPMyadmin... That really is an RTFM issue, once you have your environment setup (Apache and the likes) its likely you only need to copy it to your document root and point your browser to it.
    Hopes this helps somewhat.

  • HTTP error 0 testing not serving php pages please help

    Hello everyone,
    I am using DWCS3, the free version of MAMP on my MacBook Pro Leopard 10.5.6.
    I have built a customer registration form with a Transitional <!DOCTYPE>. I have been following the instructions from The Essential Guide to Dreamweaver CS3, using a wizard to build a registration form, in chapter 15.
    When I try to preview the form in the web browser, I get a white screen.
    When I click the live data button I get an; HTTP error 0 message occured while attempting to request the file http://localhost:8888/mywebsite/page_S9INUKZB.php from the testing server.
    possible reasons:
    1. Files in MacHD/Applications/MAMP/htdocs/mywebsite with .php extension are not being executed by the testing server.
    2. The MacHD/Applications/MAMP/htdocs/mywebsite does not map to http://localhost:8888/mywebsite URL on the testing server.
    I've gone over the site definitions several times and have configured MAMP differently twice, using ports 80 and 3306 and also 8888 and 8889. The same problem has happened in both instances here is my site definition info:
    Local info:
    Site name: mywebsite
    Local root folder: MacHD:Users:myname:Desktop:mywebsite
    links relative to document: http://localhost/
    Remote info:
    Access: Local/Network
    Remote folder: MacHD:Applications:MAMP:htdocs:mywebsite
    Testing server:
    Server model: PHP/MySQL
    Access: Local/Network
    Testing server folder: MacHD:Applications:MAMP:htdocs
    URL prefix: http://localhost:8888/mywebsite/
    Web sharing is turned off.
    Dreamweaver/Preferences/Preview in browser/preview using temporary files is turned off, yet in my HTTP error 0 message there is a string of characters after the page name, suggesting that dreamweaver is using temporary files.
    I have attached a compressed copy of the customer registration form maybe the problem is the page. I have gone round and round in circles with this and I can't seem to sort it out can somebody please help me.
    Thankyou.

    Hello David,
    Thanks for getting back to me, sorry for the late reply, I've been away for a few days.
    I have done what you suggested, and altered the links relative to document: http://localhost:8888/mywebsite/
    I have also restarted dreamweaver and mamp.
    Nothing has changed when I try to view the page through the browser I get a white screen and the HTTP error 0 is still displaying, With the same message as before.
    I have since created a new form, connected it to my user table, and populated the table with info, and that worked.
    I then added the php validating code as suggested in chapter 15, pages 481 through to 485. I've also checked the code against your example page register_user_03.php.
    However when I put the page on the testing server and try to view it, all I get is a white screen, and an HTTP error 0 the testing server is not executing pages with a .php extension. Or the URL prefix isn't mapped properly.
    I have also checked all my settings in MAMP and left a question on the forum but they haven't answered.
    Is there a setting or connection that I need to enable in Apache? I'm stumped.
    I'm hoping you might have some tricks up your sleeve.
    Thanks

  • MySQL error: "Incorrect table name ``": [was: please help me]

    the script language is php & mysql database
    i created 2 files :
    the first : i made in it the following steps :
    1- created recordset
    2- dragged and dropped one field which i need to delete
    3- put ( delete ) word and linked it with the second page by parameter id
    and the second page : i made a blank page with one recordset and made it filter by ( id )
    next, from insert menu clicked on data objects , insert record and delete record
    after that when i preview the the first page in the browser and click in ( delete ) link
    the massege appeared is :
    Incorrect table name ''
    the first page php code :
    <?php require_once('../Connections/dwcon.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $maxRows_rscomment = 10;
    $pageNum_rscomment = 0;
    if (isset($_GET['pageNum_rscomment'])) {
      $pageNum_rscomment = $_GET['pageNum_rscomment'];
    $startRow_rscomment = $pageNum_rscomment * $maxRows_rscomment;
    mysql_select_db($database_dwcon, $dwcon);
    $query_rscomment = "SELECT * FROM `comment`";
    $query_limit_rscomment = sprintf("%s LIMIT %d, %d", $query_rscomment, $startRow_rscomment, $maxRows_rscomment);
    $rscomment = mysql_query($query_limit_rscomment, $dwcon) or die(mysql_error());
    $row_rscomment = mysql_fetch_assoc($rscomment);
    if (isset($_GET['totalRows_rscomment'])) {
      $totalRows_rscomment = $_GET['totalRows_rscomment'];
    } else {
      $all_rscomment = mysql_query($query_rscomment);
      $totalRows_rscomment = mysql_num_rows($all_rscomment);
    $totalPages_rscomment = ceil($totalRows_rscomment/$maxRows_rscomment)-1;
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>التحكم في التعليقات</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <link href="../styles.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    #contmain #main #page #content table tr td div strong {
        color: #0F0;
    -->
    </style>
    </head>
    <body>
    <!-- start header -->
    <div id="contmain">
    <div id="menu">
            <ul>
                <li><a href="#"></a></li>
                <li><a href="#"></a></li>
                <li><a href="#"></a></li>
                <li><a href="#"></a></li>
                <li><a href="../index.php"></a></li>
            </ul>
        </div>
    <div id="main">
    <div id="header">
    <div id="logo">
        <h1><a href="../index.php"></a><a href="" id="metamorph"></a></h1>
        </div>       
    <!-- end header -->
    </div>
    <!-- start page -->
    <div id="page">
      <div align="center">
        <!-- start sidebar two -->
      </div>
      <div id="sidebar2" class="sidebar">
          <ul>
              <li>
                    <h2> </h2>
                    <div class="title_back">
                    <ul>
                      <table width="130" height="136" border="0">
                        <tr>
                          <td height="47" bgcolor="#99CC66"><h1><a href="cp.php">اللوحة الرئيسية</a></h1></td>
                          <td bgcolor="#99CC66"><img src="../images/icons/Dreamweaver.png" width="36" height="35" alt="" /></td>
                        </tr>
                        <tr>
                          <td height="40" bgcolor="#99CC33"><h1><strong>المقالات</strong></h1></td>
                          <td bgcolor="#99CC33"><img src="../images/icons/Dreamweaver.png" width="36" height="35" alt="" /></td>
                        </tr>
                        <tr>
                          <td height="41" bgcolor="#99CC66"><h1><strong><a href="logout.php">تسجيل الخروج</a></strong></h1></td>
                          <td bgcolor="#99CC66"><img src="../images/icons/Dreamweaver.png" width="36" height="35" alt="" /></td>
                        </tr>
                      </table>
                      <li></li>
                    </ul>
                </div>
              </li>
              <li>
                    <h2> </h2>
                    <div class="title_back">
                      <ul>
                      <li><!-- end sidebar two -->
        <!-- start content -->
    </li>
                    </ul>
                    </div>
              </li>
          </ul>
      </div>
      <div id="content">
                <div class="box">
                 <div class="box2">
                <h4 align="right"><a href="#"></a></h4>
                <p> </p>
                <p> </p>
                 </div>
                </div>
                <?php do { ?>
                  <table width="299" border="0" align="center" cellpadding="5" cellspacing="5">
                    <tr>
                      <td colspan="2" bgcolor="#006666"><div align="center"><strong>العمليات</strong></div></td>
                      <td width="154" bgcolor="#006666"><div align="center"><strong>العنوان</strong></div></td>
                    </tr>
                    <tr>
                      <td width="42" bgcolor="#99CC66"><p><img src="../images/icons/Multiply, delete.png" width="43" height="40" alt="hh" /></p>
                        <p><a href="deletecomment.php?comm_id=<?php echo $row_rscomment['comm_id']; ?>">حذف</a></p></td>
                      <td width="53" bgcolor="#99CC66"><p><img src="../images/icons/Configuration Files or Utilities.png" width="44" height="39" alt="yy" /></p>
                        <p><a href="updatecomment.php?comm_id=<?php echo $row_rscomment['comm_id']; ?>">تعديل</a></p></td>
                      <td bgcolor="#99CC66"><?php echo $row_rscomment['comment']; ?></td>
                    </tr>
                  </table>
      <p> </p>
                  <div class="box">
                <div class="box2"> </div></div>
                  <?php } while ($row_rscomment = mysql_fetch_assoc($rscomment)); ?>
      </div>
        <!-- end content -->
        <div id="bottom" style="clear: both;"></div>
    </div><!-- end page -->
    <!-- start footer -->
    <div id="footer">
        <h1>&copy;</h1>
        <h1><a href=http://www.metamorphozis.com/" title="Flash Website Templates"></a>
            </h1>
    </div>
    </div>
    </div>
    <!-- end footer -->
    <div style="text-align: center; font-size: 0.75em;"></div></body>
    </html>
    <?php
    mysql_free_result($rscomment);
    ?>
    the second page php code is :
    <?php require_once('../Connections/dwcon.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    if ((isset($_GET['comm_id'])) && ($_GET['comm_id'] != "")) {
      $deleteSQL = sprintf("DELETE FROM ``comment`` WHERE comm_id=%s",
                           GetSQLValueString($_GET['comm_id'], "text"));
      mysql_select_db($database_dwcon, $dwcon);
      $Result1 = mysql_query($deleteSQL, $dwcon) or die(mysql_error());
      $deleteGoTo = "commentcontrol.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
        $deleteGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $deleteGoTo));
    $colname_Recordset1 = "-1";
    if (isset($_GET['comm_id'])) {
      $colname_Recordset1 = $_GET['comm_id'];
    mysql_select_db($database_dwcon, $dwcon);
    $query_Recordset1 = sprintf("SELECT * FROM `comment` WHERE comm_id = %s", GetSQLValueString($colname_Recordset1, "int"));
    $Recordset1 = mysql_query($query_Recordset1, $dwcon) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    $colname_rscomment = "-1";
    if (isset($_GET['comm_id'])) {
      $colname_rscomment = $_GET['comm_id'];
    mysql_select_db($database_dwcon, $dwcon); 
    $query_rscomment = sprintf("SELECT * FROM `comment` WHERE comm_id = %s", GetSQLValueString($colname_rscomment, "int")); 
    $rscomment = mysql_query($query_rscomment, $dwcon) or die(mysql_error()); 
    $row_rscomment = mysql_fetch_assoc($rscomment); 
    $colname_rsdeletecomment = "-1";
    if (isset($_GET['comm_id'])) {
      $colname_rsdeletecomment = $_GET['comm_id'];
    mysql_select_db($database_dwcon, $dwcon);
    $query_rsdeletecomment = sprintf("SELECT * FROM `comment` WHERE comm_id = %s", GetSQLValueString($colname_rsdeletecomment, "int"));
    $rsdeletecomment = mysql_query($query_rsdeletecomment, $dwcon) or die(mysql_error());
    $row_rsdeletecomment = mysql_fetch_assoc($rsdeletecomment);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>حذف التعليق</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <link href="../styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <!-- start header -->
    <div id="contmain">
    <div id="menu">
            <ul>
                <li><a href="#"></a></li>
                <li><a href="#"></a></li>
                <li><a href="#"></a></li>
                <li><a href="#"></a></li>
                <li><a href="../index.php"></a></li>
            </ul>
        </div>
    <div id="main">
    <div id="header">
    <div id="logo">
        <h1><a href="../index.php"></a><a href="http://www.metamorphozis.com/" id="metamorph"></a></h1>
        </div>       
    <!-- end header -->
    </div>
    <!-- start page -->
    <div id="page">
      <div align="center">
        <!-- start sidebar two -->
      </div>
      <div id="sidebar2" class="sidebar">
          <ul>
              <li>
                    <h2> </h2>
                    <div class="title_back">
                    <ul><li></li>
                    </ul>
                    </div>
              </li>
              <li></li>
              <li>
                <div class="title_back"> </div>
                </li>
            </ul>
        </div><!-- end sidebar two -->
        <!-- start content -->
    <div id="content">
                <div class="box">
                 <div class="box2">
                <h4 align="right"> </h4>
    <p> </p>
                 </div>
                </div>
    <p> </p>
                <div class="box">
            <div class="box2"> </div></div>        
        </div>
        <!-- end content -->
        <div id="bottom" style="clear: both;"></div>
    </div><!-- end page -->
    <!-- start footer -->
    <div id="footer">
        <p>&copy; </p>
        <p><a href="http://www.metamorphozis.com/" title="Flash Website Templates"></a>
            </p>
    </div>
    </div>
    </div>
    <!-- end footer -->
    <div style="text-align: center; font-size: 0.75em;"></div></body>
    </html>
    <?php
    mysql_free_result($Recordset1);
    ?>--------------------------------------------------------------------

    When posting in a forum like this, please give your post a meaningful subject line. It helps everyone, including others who might have the same problem, and are looking for a solution.
    The cause of your error message almost certainly lies in your second page, which has this code:
    if ((isset($_GET['comm_id'])) && ($_GET['comm_id'] != "")) {
    $deleteSQL = sprintf("DELETE FROM ``comment`` WHERE comm_id=%s",
    GetSQLValueString($_GET['comm_id'], "text"));
    What's causing the problem is the extra pair of backticks around `comment`. It should be this:
    if ((isset($_GET['comm_id'])) && ($_GET['comm_id'] != "")) {
      $deleteSQL = sprintf("DELETE FROM `comment` WHERE comm_id=%s",
                    GetSQLValueString($_GET['comm_id'], "text"));

  • Urgent, Please help !!! Input Date field in Mysql database using JSP

    Hi All,
    Please help me ! I am trying to store a date field in MySql databaseusing JSP on Tomcat Server.I am gettting the following error.
    I am taking the String Input and then trying to convert it into date type
    inorder to store it into date field in a database.
    I am using the following code :
    <%
    try{
    String dt=request.getParameter("avldt");
    SimpleDateFormat adt= new SimpleDateFormat("dd-MM-yyyy");
    Date sqlToday = new java.sql.Date(adt.parse(dt).getTime());
    catch(ParseException e){
         e.printStackTrace();
    %>
    But I am getting the following error message :
    Class jsp.myjsp.SimpleDateFormat not found.
    Please help me !!!.It's very urgent.
    Thanks,
    Savdeep

    programming is more then copy pasting, it actually is usefull to think about what you are doing. First you declare that you date is format dd-MM-yyyy, then you want to parse a date in format dd/MM/yyyy and behold Java warns you it cannot parse the one into the second ! Cant you solve the rest of this puzzle yourself then ?

  • MySql - Connection Props - Please help - willing to pay

    Hi,
    My setup:
    Windows XP
    IIS ver 5
    MySQL databse
    Dreamweaver MX 2004
    Language ASP.NET VB
    This is driving me round the bend have searached all forums
    and nothing is pointing me in the right direction.
    1) First question, can I actually use dreamweaver MX 2004 to
    create ASP.NET VB pages and connect to a MYSQL database?
    The reason I ask is I have set up a system DSN in >
    control panel > administrative tools > Datasources (ODBC)
    All works fine connection is successful etc. (MySQl ODBC 3.51
    Driver)
    I then open dreamweaver, create new ASP.NET VB page. Go to
    the databases panel click the + sign and have 2 options:
    OLE DB connection or SQL Server connection. I assume its not
    the latter as that is for SQL seerver not MySQL. I have tried every
    combination of the OLE DB connection (2options - Templates or
    Build)
    Templates:
    Oracle (Microsoft Provider)
    Oracle (Oracle Provider)
    Microsoft SQL Server
    Microsoft Access 97 (Jet 3.5 provider)
    Microsoft Access 2000 (Jet 4 provider)
    UDL File
    I don't think any of the above are correct for connecting to
    a MySQL database, so I try:
    BUILD
    List of providers this time are :
    Microsoft ISAM 1.1 OLE DB Provider
    Microsoft Jet 4.0 OLE DB Provider
    Microsoft OLE DB Provider for Data Mining Services
    Microsoft OLE DB Provider for Indexing Service
    Microsoft OLE DB Provider for ODBC Drivers (***** I Guess its
    this one? ****)
    Microsoft OLE DB Provider for OLAP Services 8.0
    Microsoft OLE DB Provider for Oracle
    Microsoft OLE DB Provider for SQL Server
    Microsoft OLE DB Simple Provider
    MSDatashape
    OLE DB Provider for Microsoft Directory Services.
    So I choose the one highlighted above for ODBC drivers as I
    think this one is correct?
    1st option - Use data source name which has a dropdown box
    and I can choose my dsn as mentioned earlier.
    or 'Use connection String' - I Don't use
    2nd Option Logon to server info
    Username ***Is this the username and password of mySQL
    database because if so it doesn't work, have also tried leaving it
    bland and every time i do a test after choosing the initial catalog
    to use I get the eror message:
    Test connection failed because of an error in intialising
    provider. Catastrophic failure!
    All I want to is connect to a bl**dy databse so I can teach
    myself the basics but can't get past this first hurdle.
    Someone please help! Thanks in advance.
    Password

    For your eMac, you will need to go with a *miniDV camcorder*, such as the Canon ZR series (current lineup is the ZR900/930/950/960). They all have image stabilization & take stills; the 900, 930 and 960 also have an external mic input.
    You may also want to look into an earlier Canon Optura or Elura series camcorder or similar miniDV camcorder from Sony, JVC, Panasonic, etc. There aren't many new miniDV models available anymore, but you can still find them and they are on the lower end of the price scale these days!
    B&H Photo is a great supplier to deal with and you will be hard pressed to find prices lower elsewhere.
    The eMac does not support AVCHD, so that eliminates any of those newer camcorders (you need an Intel based Mac to capture & edit AVCHD video). The Canon FS line unfortunately records to MPEG2 MOD files, which needs to be converted before it can be imported into iMovie or Final Cut Express. And the conversion is not simple.

  • A php script works in IE but not in safari .. please help

    The following php works in internet explorer but not in safari or chrome .
    In IE all files are saved in specified folder .
    But in safari , xml portion works .. that is myxml.xml is saved in 'uploads/'.$temp directory ... but uploaded files are not saved in the given folder ..instead they are saved in 'uploads' folder .... not in 'uploads/'.$temp folder or 'uploads/'.$temp.'/image/' folder ...
    The script is called from flash ...
    I am new to php ... please help ...
    <?php
    session_start();
    $temp=$_SESSION['myfolder'];
    $raw_xml=file_get_contents("php://input");
    if(isset($_FILES['Filedata']['name'])){
    $whichfile=$_FILES['Filedata']['name'];
    $whichextension=substr($whichfile,-3);
    if($whichextension=='flv'||$whichextension=='pdf'||$whichextension=='txt'||$whic hextension=='mp3'){
    move_uploaded_file($_FILES['Filedata']['tmp_name'],'uploads/'.$temp.'/'.basename ($whichfile));
    elseif($whichextension=='jpg'||$whichextension=='png'||$whichextension=='gif'){
    move_uploaded_file($_FILES['Filedata']['tmp_name'],'uploads/'.$temp.'/image/'.ba sename($whichfile));
    elseif($raw_xml!=false){
    $fp=fopen('uploads/'.$temp.'/myxml.xml','w');
    fwrite($fp,$raw_xml);
    fclose($fp);
    else{
    echo "&fname=$temp";
    ?>

    Use this style rule for that image to get that custom cursor:
    <pre><nowiki>cursor: url("dart.cur"), auto;</nowiki></pre>
    See also:
    *https://developer.mozilla.org/en/Using_URL_values_for_the_cursor_property

  • PHP/MySQL Help Needed

    I'm a beginner with this PHP/MySQL language, but I'm using
    Dreamweaver CS3 to help things along. I've set up my database with
    my host (using PHPmyAdmin) and put in a table with some fields.
    Then I went into Dreamweaver and set up everything and it saw the
    database name perfectly. Then I made a recordset and it saw the
    fields just fine. I then made an input page to put the data into
    the database and that went off without a hitch. I then made a basic
    webpage with nothing but the call to display 2 of the fields in my
    database (I did the test in dreamweaver and it saw all the data I
    populated my database with perfectly). I then told it to preview in
    Firefox and got a blank page... Ok I must have done something
    wrong, so I put in some basic text just so I could see if even that
    would show up correctly. Then I previewed in Firefox again and not
    only did it show up, but the 2 fields showed up as well! Yea! So I
    made some changes to the fields I wanted to show and again did a
    Preview in Firefox. I was again treated to a blank page. Not even
    my basic text was showing up. I went back to Dreamweaver and added
    some more text... preview... works perfectly showing everything. I
    refresh the page and it's blank. I close Firefox and preview again.
    It's a blank page, but for the heck of it I decide to View Source
    and lo and behold all the data is there. I close the source and try
    reloading the page... blank. I'm at a loss. Any idea why this might
    be happening?

    jays99 wrote:
    > Thanks, David. I have your PHP5-Flash 8 book and egerly
    await your newest. I
    > installerd MySQL 5.027 for 10.4 intel which but it does
    not come up
    > automatically and there is no MySQL control on the
    Preferences. I read
    > somewhere that I have to open a file and change some
    lines of code in a config.
    > file. Do you have any insight to that? Thanks again, Jay
    Sorry, I haven't tested anything on an Intel Mac yet. Testing
    everything
    on Vista for my new Dreamweaver book has given me enough of a
    headache.
    However, I'm pretty sure that my editor has an Intel Mac, and
    he
    followed the instructions in "PHP Solutions" without any
    major hiccups.
    (They're pretty much the same as in the Flash book.)
    Isn't there a MySQL.prefPane icon in the MySQL installation
    package? I
    have found that MySQL won't start automatically on 10.4 (it
    did on
    10.3), but as long as you install the prefPane, you should be
    able to go
    in and start it manually.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Dreamweaver newbie - php & mysql help

    hi,
    new to dremweaver, have used .net in past with vwd and found it straight forward to drag over grid view etc to view data from sql database.
    i want to use php and mysql now and looking at dreameaver cs4 i really want to know what each navigation is. i.e. how do i create my mysql database and drag say a grid view in dreamweaver cs4 over to view?
    basically just need to know the basics navigation of what buttons i need for to interact using php and mysql?
    any help would be great, and also if anyone can recommend a good book on php/mysql with dreamweaver cs4 as a by the by then would greatly appreciate it.
    many thanks
    andy

    Take a look at this book:
    http://www.amazon.com/Essential-Guide-Dreamweaver-Ajax-Essentials/dp/1430216107
    I didn't read it, but I am currently reading the author's another book (David Powers: PHP Object-Oriented Solutions) and he is good.
    David is also a community expert on these forums.

  • Need help with Flash/PHP online form, please help, URGENT!

    ive made my online form with the scripts shown below, when i
    submit i dont get any errors... but i also dont receive any emails
    from the form, if you can see anything that ive done wrong please
    help me out..
    -------------------------------------------------------PHP
    mailer.php------------------------------------------------------------------
    <?php
    $fname = $_REQUEST["fname"];
    $mail = $_REQUEST["mail"];
    $add1 = $_REQUEST["add1"];
    $add2 = $_REQUEST["add2"];
    $add3 = $_REQUEST["add3"];
    $town = $_REQUEST["town"];
    $county = $_REQUEST["county"];
    $postcode = $_REQUEST["postcode"];
    $telephone = $_REQUEST["telephone"];
    $subject = $_REQUEST["subject"];
    $message = $_REQUEST["message"];
    $full_message = $_SERVER['REMOTE_ADDR'] . "\n\n" . $message;
    $message= $full_message;
    $fname = stripslashes($fname);
    $mail = stripslashes($mail);
    $add1 = stripslashes($add1);
    $add2 = stripslashes($add2);
    $add3 = stripslashes($add3);
    $town = stripslashes($town);
    $county = stripslashes($county);
    $postcode = stripslashes($postcode);
    $telephone = stripslashes($telephone);
    $subject = stripslashes($subject);
    $message = stripslashes($message);
    $subject = "Vision Ten Online Form ". $subject;
    if(isset($fname) and isset($mail) and isset($add1) and
    isset($add2) and isset($add3) and isset($town) and isset($county)
    and isset($postcode) and isset($telephone) and isset($subject) and
    isset($message)){
    mail("[email protected]", $fname, $mail, $add1,
    $add2, $add3, $town, $county, $postcode, $telephone, $subject,
    $message "From: $mail");
    ?>
    -------------------------------------------------------PHP-------------------------------- ----------------------------------
    -----------------------------------------------ACTIONSCRIPT
    for the
    form----------------------------------------------------------
    stop();
    System.useCodepage = true
    this.sent.onRelease = function () {
    my_vars = new LoadVars ();
    my_vars.fname = fname_box.text;
    my_vars.mail = mail_box.text;
    my_vars.add1 = add1_box.text;
    my_vars.add2 = add2_box.text;
    my_vars.add3 = add3_box.text;
    my_vars.town = town_box.text;
    my_vars.county = county_box.text;
    my_vars.postcode = postcode_box.text;
    my_vars.telephone = telephone_box.text;
    my_vars.subject = subject_box.text;
    my_vars.message = message_box.text;
    if (my_vars.fname !="" and my_vars.mail !="" and
    my_vars.add1 !="" and my_vars.town !="" and my_vars.county !="" and
    my_vars.postcode !="" and my_vars.telephone !="" and
    my_vars.subject !="" and my_vars.message !="") {
    my_vars.sendAndLoad("script/mailer.php", my_vars, "POST");
    gotoAndStop(2);
    } else {
    error_clip.gotoAndPlay(2);
    my_vars.onLoad = function (){
    gotoAndPlay(3);
    fname_box.onSetFocus = mail_box.onSetFocus =
    add1_box.onSetFocus = add2_box.onSetFocus = add3_box.onSetFocus =
    town_box.onSetFocus = county_box.onSetFocus =
    postcode_box.onSetFocus = telephone_box.onSetFocus =
    subject_box.onSetFocus = message_box.onSetFocus = function () {
    if (error_clip._currentframe !=1) {
    error_clip.gotoAndPlay(6);
    -----------------------------------------------ACTIONSCRIPT------------------------------- ---------------------------

    that php mail function looks suspect. that should be
    mail(to,subject,message,headers,parameters)

Maybe you are looking for

  • Iphone 6 Order Confusion

    I'm not sure what's going on with Verizon's ordering system. I ordered two Iphone 6 Plus on 9/19. When I returned from the weekend, I decided to call and check status, and I was told that there was only one phone on my order. They had to cancel that

  • Issues installing 10g2 on windows server 2008 R2 x64

    I'm trying to install 10g2 on a windows sever 2008 box. Oracle Version: Oracle 10g2 (10204_vista_w2k8_x64_production_db) - found on the page that claims to support server 2008 x64. Windows Version: Windows Server 2008 R2 Standard (6.1). After extract

  • Unable to perform "insert into table select ...." using DBF_JDBC30

    below i post my code : import java.util.*; import java.sql.*; import java.io.*; import com.hxtt.sql.*; public class backofficeDbfVerification { public backofficeDbfVerification(String path) throws SQLException { Properties prop = new Properties(); pr

  • SQL : Please can someone help ?

    Guys, Please can someone help me ? I've written the following query and struggling to get the correct outer join. In the first query, i look for all daily transactions of users registered under hill.com but it's not giving me a record for an game at

  • CS 5.5 Install after Acrobat X

    Hi, I have installed CS 5.5 on a number of PCs but we are finding a number of them are coming up saying that they are trial versions even though the serial number was enterend correctly.  I followed the process of creating a deployment with AAMEE and