Jump to content

talk2toyin

Members
  • Posts

    46
  • Joined

  • Last visited

Everything posted by talk2toyin

  1. Hey developers! I am a compete newbie to zf and zf-apigility. I am designing an pplication with zf2 and I have reached a point where I need to design a restful API for the appm this api will allow my users to perform the GET, POST, PUT and DELETE Request Methods on the app. I found how to install the zf-apigility and get it working but, this require I install the zf-apigility in a different folder and setup a virtual host for it. This will turn out to be a big problem when I have to specify the path to my application entity(having in mind that I'm using ORM Mapping, Doctrine2) which is in an entirely different folder. I am using wamp server and I have both the zf-application folder and zf-apigility folder in the www root directory of my wamp server. My questions is, is there a better way to have both my zf-application and zf-apigility installed in the same folder and have them mapped out correctly? Keeping in mind that I most definitely want to make use of the zf-apigility admin and postman for testing. Any help would be much appreciated, thanks in anticipation to a positive response from you guys.
  2. Please, I need some pointers to good resources (videos, books{pdfs}, etc) that a newbie can pick up and learn the in and outs of Zend Framework 2. I have to learn it if I am to live up to expectation and no bring regrets to those who have given me this opportunity. Any advice will be much appreciated. Thanks guys!
  3. Sorry, only the currently active .arch-menu have the .active class; ignore others please. urgent help needed. thanks
  4. I'm trying to use jquery effects for a menu system that lists out archives pulled dynamically from the database. The menu will be like this: 2013> . Jan . Feb . Mar . All 2012> . Jan . Feb . Mar . All and so on... The sub links will be hidden when the pages loads and then, on clicking any of the listed year, the sub links(months) are displayed or hidden using the jquery blind effect. Here's my html: <div class='arch'> <ul class='nav nav-list'> <li class='dropdown arch-dropdown'> <a href='#' class='' toggle-dropdown='dropdown'>2013 <span class='caret'></span></a> <ul class='arch-menu'> <li><a href='#' class='active'>Jan</a></li> <li><a href='#' class='active'>Feb</a></li> <li><a href='#' class='active'>Mar</a></li> </ul> </li> <li class='dropdown arch-dropdown'> <a href='#' class='' toggle-dropdown='dropdown'>2012 <span class='caret'></span></a> <ul class='arch-menu'> <li><a href='#' class='active'>Jan</a></li> <li><a href='#' class='active'>Feb</a></li> <li><a href='#' class='active'>Mar</a></li> </ul> </li> </ul> </div> I'm using Bootstrap for my HTML and CSS. Sorry if there are any mistakes in my html code, i had to type with my phone, off hand. My JQuery: $(document).function({ $(".arch-dropdown").click(function() { $(".arch-menu").toggle("blind", 500); }); }); but the above code only makes the whole sub-links of all the listed archives toggle. I can't seem to get it to work for only which was clicked. Thanks in advance.
  5. Ok thanks. I don't have access to any internet connection right now (not WiFi, or a router), but it was educative knowing I can do something like that. I guess, this brings me back to the simulator option. Thanks a lot though @Psycho
  6. @Psycho...thanks for your reply. I have WAMP installed on my pc. I don't really get what u said about a mobile device running on the same network. Do I need an internet connection for it?
  7. Hi gurus, I am currently learning JQuery Mobile and I'd like to test how it will look like on a mobile phone without putting it online. I heard of mobile simulator for pc but, I don't know how to go about this. I use windows 7 OS on my pc. Any help will be much appreciated
  8. Sorry about that Barand, my mistake. Both works perfectly...thanks for the help
  9. Thanks Barand for your reply, it was helpful. The first works great if I was to specify the numbers of results to be generated with a form. The second on the other hand doesn't output anything...why is this?
  10. A big thank you for your reply. I will try them out right now
  11. I need help returning 4 different values from and array containning mixed alphabets A to Z and a to z. My code looks something like this: <?php $mixedL = array ("A", "B", "C"......."Z", "a", "b", "c",....."Z" ); $randLet = rand($mixedL); return $randLet; ?>
  12. These errors were also outputed: Notice: Trying to get property of non-object in C:\wamp\www\Entourage\class_func.php on line 56 Fatal error: Call to a member function close() on a non-object in C:\wamp\www\Entourage\class_func.php on line 59
  13. Hi gurus! I'm currently working on my website and I have ecountered this warning message "SCREAM: Error suppression ignored for Warning: mysqli::query(): Couldn't fetch mysqli in C:\wamp\www\Entourage\class_func.php on line 55". Here's a function I created "class_func.php": <?php /***connect to the database***/ $mysqli = new mysqli("localhost","root","","test"); if($mysqli->connect_errno) { echo "Error: Connection To The Server Failed. " . ($mysqli->connect_errno) . $mysqli->connect_error; } /***End***/ $err = array();//set an array to hold all the errors that might be generated during login /***Create a function that will handle the Login Form***/ function checkLogin() { global $err;//declare the error array as global so it is available everywhere global $mysqli;//declare the connection as global so it is available everywhere for($i=0; $i<func_num_args(); $i++) { //get the number of arguments supplied(username & password) $data[$i] = trim(htmlentities(strip_tags(func_get_arg($i))));//using a for loop, format these arguments } /**Search the users table if user exists**/ //my line 55 $res = $mysqli->query("SELECT * FROM users WHERE user_name = '$data[0]' AND user_pass = '$data[1]'"); echo "Error Executing Query: " . ($mysqli->connect_errno) . $mysqli->connect_error; $num = $res->num_rows; if($num < 1) {//if no user found /* close result set */ $res->close(); $err[] = "-Invalid Username and/or Password!"; } else { //fetch the result set $obj = $res->fetch_object(); /***Assign the result sets to sessions***/ $_SESSION['user_name'] = $obj->user_name; $_SESSION['user_id'] = $obj->user_id; $logged = "Logged In";//set admin status to logged in $update = $mysqli->query("UPDATE users SET user_status = '$logged' WHERE user_id = '{$_SESSION[user_id]}' && user_name = '{$_SESSION['user_name']}'"); /* close result set */ if($obj->user_level == "Admin") { $update->close(); $res->close(); header('location:admin_page.php'); exit(); } else { $update->close(); $res->close(); header('location:members_page.php'); exit(); } } } /***End of checkLogin function***/ ?> And this is my page "index.php" that calls this function: <?php include "class_func.php"; if(isset($_POST['login']) && $_POST['login'] == "Continue >>") {//if the login button has been clicked /***Check to see if the user clicked the submit button without typing in any data***/ if(empty($_POST['username']) || empty($_POST['password'])) { $err[] = "-Both Fields are Required Please!"; } /***End***/ else { //assign user inputs to variables $username = $_POST['username']; $password = $_POST['password']; //call the checkLogin function to validate input checkLogin($username, $password); } } ?> Just like u can see, my form variables are username and password. Any help much appreciated
  14. That's the problem, I don't remember installing IIS7. WAMP server was working fine last night. I got tired of programming and played WE8 with my PC instead.
  15. And after re-installing, my localhost displays IIS7 and what not. The phpmyadmin still displays the same error I firdt stated. Help me out please
  16. Hi! Please my wamp server was working fine until last night before I went to bed. Suprisingly, this afternoon I tried doing some work and noticed the WAMP icon not turning GREEN, instead it stays BROWN. If I try to acces my localhost and phpmyadmin, I get an this error: Server Error in Application "DEFAULT WEB SITE" and an http Error 404.0 - Not Found. I uninstalled it, re-installed an still get the same error.
  17. You mean something like: if( isset( $_POST['user'] ) ) { $user = $_POST['user']; }
  18. The manuals I learned with doesn't say how to go around this, didn't mention it at all
  19. I was just trying to echo the user input should error(s) occur during submission. How do I go about it?
  20. Hey gurus. I just installed WAMP on my PC and I tried accessing my designs on localhost but I get notices like: Undefined index: user in C:\wamp\www\DemoADResources\index.php on line 297 and my line 297 looks like this: <name="user" type="text" value="<?=$_POST['user'];?>" size="20"> these notices stops the script from executing. What do I do to go around these errors?
×
×
  • 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.