Jump to content

powpow

Members
  • Posts

    59
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

powpow's Achievements

Member

Member (2/5)

0

Reputation

  1. Hello Freaks! I recently downloaded an ODBC driver to my linux server and after confirming that I could connect and run a query through isql I tried to connection through php. Using odbc_connect I followed the user guide to 'T' and I could not get it to work receiving the error: After searching the forums I decided to run php_info() to find out my php configuration, which is where I found: --with-unixODBC=shared,/usr --without-unixODBC './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '-- target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '- -bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/usr/share/file/magic.mime' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' What I would like to know is how Can I remove the “without -php-odbc” and “without -unixODBC” and download/install “with-php-odbc” and “with-unixODBC” to the php configuration? Any information would be grateful, thank you in advance. I am running php 5.1.6
  2. Thank you Kicken, I code in php and was expecting variables to work similarly. Thank you for giving me a work around, I build a report which consists of 10 unions where the criteria corresponds to the example I gave. In the past, I have replaced the criteria by using the replace function and believe that is what I plan on using moving forward.
  3. Hey Everybody, The issue I am having is that I would like to declare a varchar to hold a couple comma separated values to use in an in operator. DECLARE @TEST varchar(1000); SET @TEST=' ''test1'', ''test2'' '; to confirm the value is set correctly I run a select on the variable Select @TEST; The result is 'test1','test2' which is what I am looking to place in my where clause: Select * from testTable where col in (@TEST); the result should return rows but nothing is returned. I also tried to use where col =any(@TEST) and it errors. If any one can see the error in my ways I would be grateful. Thank you.
  4. Hey everyone, I am totally lost on this, I have a controller that is passed a parameter. This parameter is used to retrieve the contact information form the database. On a good return the controller will save the return a session variable. I can prove this by using print_r on the controller as well as when I am in the view. Now here is my problem, I have created a link using CI anchor which calls a different function within the same controller. When I try to call the variable it is no longer populated. I was wondering if I am not acknowledge how to use session variables correctly or if my understanding of how the function interact is a little flaky. here is the function that populates the sess variable $memDetail = $this->How_model->lookup($id); if(!$memDetail) { echo "member details are false "; // print_r($memDetail); } else { // echo "this is memDetai : "; // print_r($memDetail); $this->session->set_userdata('member_detail', $memDetail); print_r($this->session->all_userdata()); $this->load->view('view_lookup'); Let me know if you need any more information. Thank you in advance.
  5. Thank you for taking the time and explaining it, its one thing to know and another to share it. If I use extract I will be sure to use the 3rd parameter as you have shown.
  6. well it is so clear now... also I was wondering with your comment on not using extract, it seems like it is such a convenient function to use is it depreciated or prone to error?
  7. Hello Freaks, I am currently running into an issue with using CI email. It seems that when using my own created model that calls the email library I some how receive two emails. IMO the second email triggers the error because it does not have a subject(Note: I also receive the second email with no subject): A PHP Error was encountered Severity: Notice Message: Undefined index: Subject Filename: libraries/Email.php Line Number: 982 Here is my controller: $this->Usr_model->reg_confirm($regArray); $msg = array ( 'to' => $this->input->post('reg_email'), 'from' => 'XXXXXXXl@yahoo.com', 'sub' => 'Your energy service request.', 'msg' => "Thank you, you have successfully submitted your information. A representative will contact you within 3 business days."); $this->Usr_model->email($msg); $this->load->view('view_success',$msg); and here is the module: function email($msg) { extract($msg); $this->load->library('email'); $this->email->from($to); $this->email->to($from); $this->email->subject($sub); $this->email->message($msg); $this->email->send(); if ( ! $this->email->send()) { echo $this->email->print_debugger(); } }
  8. Great works perfectly thank you so much for your help!
  9. awesome, the links work but I have lost all of my css and images. since a Menu and Appetizers directory doesn't exist how do I map out my other files?
  10. Thank you for the speedy response... This is a call to the db, when I first set it up I decided to try by page name and for some reason decided to keep the file extension even though it is just a place holder in the db. I have updated my old naming convention to the following: Menu=Appetizers Menu=Specials Menu=SoupsSalads Menu=Entrèes Menu=VegOptions Menu=Desserts For this reason I updated your code example to the following However, my urls still stay in the same format: when I would like is there a way to problem shoot each step something like the following: is rewrite on? does it parse the url? does it take the menu name as an argument? Since I am hosting my site through hostgator I don't have my own personal httpd.conf file. I have been concerned since the beginning that rewrite is just not on. Any further assistance would be appreciated.
  11. Hello Everyone, I started working on a "clean url" process about a week ago. I have watched several youtube videos, read blogs/tutorials/forums, and have even used a mod_rewrite generated script @ http://www.generateit.net/mod-rewrite/. All I have to show for it is less hair and a deeper appreciation for people who understand this kind of stuff. I am hosting my website through gatorhost this particular domain is a sub domain of my site and the file hierarchy is that the subdomain is a child of my site. here is the url i am working with: http://arianadev.rppdesigns.com/index.php?page=SS.php I want it to be cleaned so it reads : http://arianadev.rppdesigns.com/SS.php or http://arianadev.rppdesigns.com/page/SS.php This first snippet of code causes my site to result in a "Internal Server Error" htaccess snippet Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteRule ^([^/]*)$ /index.php?page=$1 [L] With the following code the site runs but the urls are the same. htaccess snippet Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteRule ^page/([^/]*)\.html$ /index.php?page=$1 [L] If any one could be of any assistance that would greatly be appreciated. Thank you
  12. Hello Everyone, I know one freak's forum post shouldn't be more important than the next but I am the last hours of a web project and could really use the quickest help possible. I have coded a html form that has elements on multiple divs. The hope of this to add toggle functionality so the user does not have to view all of the information if they do not want to. here is my code(CTRL F <!-- FORM STARTS HERE -->) session_start(); #print_r($_SESSION); include '../connect.php'; function alert($test, $name){ $text = "this is ".$name." :"; $text .= $test; echo "<SCRIPT language=\"JavaScript\"> alert('".$text."'); </SCRIPT> "; }; //checking to see if edit button has been submitted if(isset($_POST['Special']) && ($_POST['Special'] !== "")) { echo "<p> is set </p>"; // set session $row0 = $_SESSION['editPage']; $row1 = $_SESSION['title']; $row2 = $_SESSION['slide']; $row3 = $_SESSION['subtitle']; $text = htmlentities($_POST['adminText']); $postSet = True; } else //if post hasn't been submitted { $row0 = $_SESSION['editPage'] = htmlentities($_GET['pagename']); //select * from pages table with this page name $sql="SELECT * FROM rpowell_ariana.pages where `page`='".$row0."'"; $results = mysql_query($sql); if(!$results){ die("<p> SQL pages error :<br/> sql: " .$sql. "<p/>".mysql_error()); } else { //use sql query results to pop sess and shorthand variables $row = mysql_fetch_array( $results ); $row1 = $_SESSION['title'] = $row['title']; $row2 = $_SESSION['slide'] = $row['slide']; $row3 = $_SESSION['subtitle'] = $row['subtitle']; } } ##### 1.1 ###### ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta name="description" content="Ariana Restaurant Cuisine from Afghanastan" /> <meta name="keywords" content="Boston, Ariana, Afghanastan food, Allston Massachusetts" /> <meta name="author" content="Rob Powell" /> <meta name="ROBOTS" content="INDEX, NOFOLLOW"/> <meta charset="UTF-8" /> <title>Admin Panel</title> <link rel="stylesheet" type="text/css" href="../style/reset.css" /> <link rel="stylesheet" type="text/css" href="../style/style.css" /> <link rel="stylesheet" type="text/css" href="../style/admin.css" /> <!--[if lt IE 7]> <link rel="stylesheet" type="text/css" href="../style/style-ie.css" /> <![endif]--> <!-- include jQuery library --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> </head> <body> <div id="page-wrap"> <div id="inside"> <div id="header"> <div id="hTitle"> <div id="lTitle"> <div id="titleImg"> <img src="../images/Tower.jpg" alt="Image of Afgany Tower"/> </div> </div> <div id="rTitle"> <div id="title1"> <p>Ariana Restaurant <br/> Cuisine from Afghanistan</p> </div> <div id="title2"> <p>129 Brighton Ave <br/> Allston, MA 02134 <br/> Tel 617-208-8072 <br/> FAX 617-562-0237 <br/> Sun-Thurs 5-10pm <br/> Fri, Sat 5-11pm</p> </div> <div style="clear: both;"></div> </div> <div style="clear: both;"></div> </div> <!-- row --> </div> <!-- header --> <div id="left-sidebar"> <ul> <li id = 'Home'><a href='home.php?pagename=index.php' id = 'Home1'>Home</a></li> <li id = 'Spec'><a href='specials.php?pagename=special.php' id = 'Spec1'>Specials</a></li> <li id = 'Apps'><a href='app.php?pagename=Apps.php' id = 'Apps1'>Appetizers</a></li> <li id = 'SS'><a href='ss.php?pagename=SS.php' id = 'SS1'>Soups & Salads</a></li> <li id = 'Ent'><a href='ent.php?pagename=Ent.php' id = 'Ent1'>Entrées</a></li> <li id = 'Vent'><a href='vent.php?pagename=VEnt.php' id = 'Vent1'>Vegeterian Options</a></li> <li id = 'Des'><a href='des.php?pagename=Des.php' id = 'Des1' >Desserts</a></li> <li id = 'Wine'><a href='wine.php?pagename=Wine.php' id = 'Wine1'>Wine</a></li> <li id = 'CU'><a href='cu.php?pagename=CU.php' id = 'CU1'>Contact Us</a></li> <li id = 'Rev'><a href='rev.php?pagename=Reviews.php' id = 'Rev1'>Reviews</a></li> </ul> </div><!-- left-sidebar --> <div id="main-content"> <h1 id="PageTitle"><? echo htmlentities($row1)?></h1> <div id="CUform"> <? if($postSet =="True"){ echo "<p>"; print_r($_POST); echo count($_POST); echo "</p>"; } else{ echo "<table border='1'>"; echo "<tr> <th>Link Text</th> <th>Linked Document</th> <th> Order</th> <th></th></tr>"; ####1.3###### $row0="special.php"; $row1="Specials"; $row2=1; // Print out the contents of each row into a table echo "<tr><td>"; echo $row0; echo "</td><td>"; echo $row1; echo "</td><td>"; echo $row2; echo "</td><td>"; echo $row3; echo "</td></tr>"; echo "</table>"; //find if default slide has been selected $sel0 = ""; $sel1= ""; switch ($row2){ case 0: $sel0 = "selected=\"yes\""; break; case 1: $sel1 = "selected=\"yes\""; break; } $disabled = "disabled=\"disabled\""; ?> <!--< for edit quick display>--> <form id="Edit" name="Edit" method="POST" action="home.php"> <label for="pageNameE">Page Name : </label> <? echo "<p id='pageNameE'> ".$row0."</p>"; ?> <label for="pageTitleE">Page Title : </label> <? echo "<p id='pageTitelE'> ".$row1."</p>"; ?> <label for="pageSlideE">Default Slide Show : </label> <select name="pageSlideE" <? echo $disabled ?>> <option value="0" <? echo $sel1;?>>Yes</option> <option value="1" <? echo $sel0;?>>No</option> </select> </form> <?php //find and retrieve any data associated to page and title $sql="SELECT * FROM rpowell_ariana.food where `parentpage`='".$row0."' order by `parentord` ASC"; $results = mysql_query($sql); if(!$results){ die("<p> SQL pages error :<br/> sql: " .$sql. "<p/>".mysql_error()); } else { ?> <!-- FORM STARTS HERE --> <form name="specialA" action="<?php htmlentities( $_SERVER['PHP_SELF']);?>" method="post"> <? #echo "<p> $sql </p>"; $foodTitle =""; while($row = mysql_fetch_array($results, MYSQL_NUM)){ /* echo "<p>"; print_r($row); if(strlen($foodFTitle) ==0){ echo strlen($foodFTitle); } if($foodFTitle ==""){ echo ($foodFTitle); } echo "</p>"; */ //if $foodtitle is populated and row[1] does not equal $foodTitle(previous row[1] if((($foodTitle !=="") || (strlen($foodTitle) == 0)) && ($foodTitle !== $row[1]) || (strlen($foodFTitle) == 0)) { /* echo "<p>this is food title \"".$foodTitle."\"</p>"; echo "<p>".$foodTitle."</p>"; echo "<p>".$row[1]."</p>"; */ ?> <fieldset class="specialAFields"> <div class="foodHeader"> <div class="row"> <p class="foodTitle"> <? echo $row[1]; ?></p> <div class="fHeaderR"> <label for="foodOrder">Order: </label> <input type="text" name="foodOrder" class="foodOTxt" value="<? echo $row[2]; ?>"> </div> <!-- // fheaderR--> </div> <!-- // row --> </div> <!-- //foodHeader --> </fieldset> <? } ?> <fieldset class="specialAFields"> <div id="menuDisplay"> <div class="foodSub"> <div class="row"> <div class="cellL"> <label for="foodT">Title: </label> <input type="text" name="foodT" class="foodTTxt" value="<? echo $row[3]; ?>"> </div> <!-- //cellL --> <div class="cellC"> <label for="foodO">Order: </label> <input type="text" name="foodO" class="foodOTxt" value="<? echo $row[4]; ?>"> </div> <!-- //cellC --> </div> <!-- //row --> </div> <! -- //foodSub --> <div class="foodDdesc"> <div class="row"> <label for="foodD">Desc: </label> <textarea id='elementText' name='foodD' cols='45' rows='8'> <? echo $row[5]; ?></textarea> </div> <!-- // row --> <div class="cellPrice"> <label for="foodP">Price: </label> <input type="text" name="foodP" class="foodPTxt" value="<? echo $row[6]; ?>"> </div> <!-- // <!--cellprice--> </div> <!-- // foodDdesc --> </div> <!-- // menuDisplay --> </fieldset> <? $foodTitle = $row[1]; $foodFTitle = True; }// ~while row echo "<input type=\"submit\" name=\"Special\" value=\"Update\"></input>"; echo "</form>"; } // ~else result } // ~ else post sub ?> </div> <!--CUform --> </div><!-- main content--> <div style="clear: both;"></div> <div id="footer"> <div id="fcontact"> <p id="address">129 Brighton Ave</p> <p id="Tel">Tel (617) 208-8072</p> <p id="Fax">Fax (617) 562-0237</p> </div> <div id="fcopy"> <p id="Copyright">Copyright ©</p> </div> <div id="fowner"> <a id="frpp" href="http://www.rppdesigns.com/" target="_blank">Created By RPP Designs</a> </div> </div> <!-- footer --> </div><!--inside --> <div style="clear: both;"></div> </div><!--page wrap --> </body> </html> When I click the update button on this form I am only returned the last input fields and the count of the array if you want to play with it, you can find the form at the following url : http://arianadev.rppdesigns.com/Login1/login/specials1.php Thank you in advance!
  13. Hello Freaks! I am having issues connecting to a virtual Windows SQL 2008 Server which is on our network. My PC can currently connect to the server through an ODBC connection. However, the ODBC connection is authenticated "with Windows NT authentication using the network login ID". If I try to authenticate "with SQL server authentication using a login ID and password entered by the user" it fails as follows: See attachment I have tried to make a connection through a php application that connects via odbc connection basically piggy-backing this connection; however I keep getting failure messages: function.odbc-connect</a>]: SQL error: [Microsoft][ODBC SQL Server Driver][sql Server]Login failed for user '[machine name]'., SQL state 28000 in SQLConnect in C:\xampp\htdocs\test\sqlsrv.php on line 2 the user for this error code is my actual machine name. After the odbc connection fail I set up a sqlserv_connect and tried connecting with my user name as well as leaving it blank to see what happened: [23-Jan-2012 17:40:37] sqlsrv_connect: entering [23-Jan-2012 17:40:37] sqlsrv_connect: SQLSTATE = 28000 [23-Jan-2012 17:40:37] sqlsrv_connect: error code = 18456 [23-Jan-2012 17:40:37] sqlsrv_connect: message = [Microsoft][sql Server Native Client 10.0][sql Server]Login failed for user 'rpowell'. [23-Jan-2012 17:40:38] sqlsrv_connect: SQLSTATE = 28000 [23-Jan-2012 17:40:38] sqlsrv_connect: error code = 18456 [23-Jan-2012 17:40:38] sqlsrv_connect: message = [Microsoft][sql Server Native Client 10.0][sql Server]Login failed for user '[mylogin]'. [23-Jan-2012 17:40:38] sqlsrv_errors: entering [23-Jan-2012 17:40:38] PHP_RSHUTDOWN for php_sqlsrv: entering [23-Jan-2012 17:46:47] PHP_RINIT for php_sqlsrv: entering [23-Jan-2012 17:46:47] sqlsrv.WarningsReturnAsErrors = On [23-Jan-2012 17:46:47] sqlsrv.LogSeverity = -1 [23-Jan-2012 17:46:47] sqlsrv.LogSubsystems = -1 [23-Jan-2012 17:46:47] sqlsrv_connect: entering [23-Jan-2012 17:46:47] sqlsrv_connect: SQLSTATE = 28000 [23-Jan-2012 17:46:47] sqlsrv_connect: error code = 18456 [23-Jan-2012 17:46:47] sqlsrv_connect: message = [Microsoft][sql Server Native Client 10.0][sql Server]Login failed for user '[machine-name]'. [23-Jan-2012 17:46:47] sqlsrv_connect: SQLSTATE = 28000 [23-Jan-2012 17:46:47] sqlsrv_connect: error code = 18456 [23-Jan-2012 17:46:47] sqlsrv_connect: message = [Microsoft][sql Server Native Client 10.0][sql Server]Login failed for user '[machine-name]'. Now to me this is a networking issue, some how the connection cannot resolve because of the NT authentication process. I was hoping some far superior developer had already figured a work around for this and felt like sharing . Any thoughts would be greatly appreciated.
  14. I really like the colors, font, and images. One thing I would like to see with the pdf is setting the zoom out to view the full page of the menu. I personally didn't know much about this functionality but I did a quick search and I hope the following link proves useful. http://www.activepdf.com/support/knowledgebase/viewKb.cfm?id=10884
  15. Hey Adam thank you for the critique. I have tested the site in IE 9, CHROME 16, and Fire fox 9. The site works in all of these browser but I have to admit that sometimes the slideshow will move to the right but after refreshing the page it realigns. Could you please send me that screen shot. Thank you in regards to spelling error, "Doh!" I agree with you that this design is basic but that is what the client wanted. Compared to sites like these http://webdesignledger.com/inspiration/40-tasty-restaurant-websites-to-inspire-you the site I created does fall short. However, you have to start somewhere and even though I had much grander ideas this was the layout they wanted. I hope my website sways you more than their one currently http://www.arianarestaurantboston.com/. I know you spoke about getting some free or cheap templates, but can you speak to the aesthetics you would like to see improvement in? I am trying to develop a designer's eye for these things... I appreciate your time and effort reviewing my site. Could you possibly speak to my concerns a few of them have to do with "best practices" however two coding problems I have is the layout of the text on the reviews page and how to get my images div to be in the middle regardless of how much content.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.