Jump to content


  • Posts

  • Joined

  • Last visited

Previous Fields

  • Languages
    (X)HTML, CSS, JavaScript, PHP

Profile Information

  • Location

trollster's Achievements


Newbie (1/7)



  1. Hello all,I've built this site and layout using bootstrap. http://ankursinha.net/test/ . I've broke the index file into head.php (contains the whole html head like scripts, meta, link rel, etc), then header.php (contains the logo, search bar, etc), then navbar.php (contains the navbar), and the footer. I've placed an index file along with it and I used: include 'head.php', etc and got it working. But when I created a folder forums, added the same code, but used include '../head.php', etc all the content came, but the css and the image logo didn't appear. I saw the page source for both the links are the same. Here is the link. http://ankursinha.net/test/forums/The codes for both are the same, just that I added two dots to traverse back to the parent directory and include files under the forums folder, the source shows everything is included but the css and images do not appear. Please help.Thank you
  2. Hello everyone,I followed Alex's register and login series from PHP Academy. I made one like his just the same way just that my CSS files were different. Now this is my problem.My bootstrap folder contains css, js and img folders. My core folder contains init file, database folder having connect file and functions folder having general functions and user functions files. My includes folder contains the header, footer, navbar and all, along with an overall folder having overall header and overall footer.All the files included above are linked and relative to the index.I created a new folder called forums in the root directory and I put an index file inside it. I just put the path as include '../core/init.php', include '../includes/overall/header.php', etc. Just added two dots to traverse back and then include the files and styles but I am getting all sorts of warnings and errors. I want to create a new folder in the root directory and include all these files, functionality and styles. Please help me do this.Thank You!
  3. Hello people,I am building a website for my university. I need a shared hosting account for 2-3 months for testing the performance, so that based on that I can tell my college management on what to get but I will have to shell out the money from my pocket for the initial 2-3 months. Hence, inclined towards shared.So these are my requirements:10GB of space for the files, presentations, etc.2k students downloading 500mb of data each, so around 1-2TB bandwidth.Outgoing mail system, preferably 1-2k an hour or 5k a day.A forum system where 2000 members actively interact.A quiz system inbuilt in the site or along with the forums, please let me know a plugin to conduct quizzes in forums powered by phpbb.I looked out on reviews on many sites. These are the sites I checked out. HostGator, 1and1, iPage, BlueHost, JustHost, HostMonster, BigRock, GoDaddy, etc. I found HostGator serving most of my needs if not all. But with mixed reviews all over the internet, I need some help. I did have a chat with a few of them too.Also, I want to know how much will my expense be if I use AWS or RackSpace or Heroku. I am new to cloud and I don't understand their fancy terms at all. I need the monthly expense estimate.I will move to dedicated or VPS only after it goes live and when my Univ pays. But help me with going about for the next 2-3 months. Which plan do I opt for?Thank you
  4. Hello everyone, sorry for the dull title. Couldn't think of anything better. So this is my problem.I was using a registration form for teachers and one for students. There are ten fields in each, first name, last name, username, password, etc being similar whereas departments (teachers have 7, students have 3) and email ids (teachers have a different domain extension and students different) being different. I am using two tables, one for teachers and one for student.Now, I know I can use one login form, query against these two tables using the JOIN property and make them login. But I want to know if this method is efficient because two tables are being used.Or is this method more efficient: In the reg form, I put a radio button to select teacher or student and depending on what one chooses the remaining fields change, i.e, if I choose teacher, 7 departments show up or if I choose student only 3 of them show up. In this way, I have to use one table only, atleast I guess so.Or another possibility is I use two tables but two login forms, one for teacher and one for student, I know this is the easy way out but being a Comp Sci student I want to choose the efficient method of all.P.S: The teacher's role is going to be completely different from the student's in the site. And there will be lot of activities for the teachers and students, they are completely different. Will maintaining one table be a good bet?Thank you.
  5. I am using twitter bootstrap and my own CSS to achieve something.What I want to do is, all the input fields like username, password & search, on selecting them, the border becomes blue, I want to change it to black.Another thing is, I am using the navbar inverse. It has dropdowns. When I click the dropdown and hover over the list of elements, it is in blue color by default. I am trying to change that hover thing to black color too. How do I achieve this?Now these are the things I've tried. I tried inspecting with the firebug element and it always shows something in the bootstrap.min file. However I can't find anything related to hover there and I'm a bit weak when it comes to the transition things although I am not sure if it is related to transition. Another thing I did is, I I edited the value #08c to #000 from the variables.less file and compiled it and obtained a bootstrap file which contains the changed values but still the default color only shows.Please help me achieve these effects.Thank you!
  6. Hello everyone, I am trying to design a header using bootstrap. U want to put a logo at the top to the right of it the header. And I want to place a bootstrap search bar at the right of the entire header. I've tried to float the search bar right, but however it gets placed right after the header text. So the image, header text and the search bar come one after the other and hence when I keep minimizing the browser window, they do not stack properly either according to bootstrap. <div class="container"> <img src="http://www.computerclipart.com/computer_clipart_images/cartoon_computer_and_books_0521-1004-3015-4128_SMU.jpg" height="90" width="120" /> <h1 class="logo"> Resource Directory <form class="form-search pull-right"> <div class="input-append"> <input type="text" class="span2 search-query"> <button type="submit" class="btn">Search</button> </div> </form> </h1> </div> <div class="container"> <div class="navbar navbar-inverse"> <div class="navbar-inner"> <div class="container" style="width: auto"> <!-- Nav Bar Contents goes here, removed it to minimize the code --> </div> </div> </div> </div> <div class="container"> <div class="hero-unit"> <h2><center>XYZ University - Academic Resource Directory</center></h2> Welcome to the Academic Resource Directory of XYZ University. All the resources related to academics can be found here! </div> <hr> <footer> <p>© Copy 2012</p> </footer> </div> And this is another custom made css file. h1 { font-size:1.8em;}h2 { font-size:1.4em;}img { float: left;}.logo { font:2.5em Arial; margin:0 0 10px 0; padding-top: 35px; width:auto; color:#000; height: 70px; float: left;}body { background: #fff; font-family:Arial; font-size:0.8em;}.clear { clear:both;} Please help me design my header. The image at the left, next to, i.e, right of it header text and right most of the header the search bar.
  7. Thanks for the reply. So how do I get rid of the problem and give the error just like I have made in the code?
  8. I am making a file upload system. The user chooses where to upload using the dynamic drop down list. And this is the problem I am facing right now. This is my form. <form action="uploader.php" method="POST" enctype="multipart/form-data" name="uploads"> <label for="file">Choose a file: </label> <input type="file" name="userfile" id="userfile"><br/><br/> <select id="text-one" name="one"> <option selected value="base">Select Department</option> <option value="CSE" name="cse">Computer Science Engineering</option> <option value="ECE" name="ece">Electronics & Communication Engineering</option> <option value="MECH" name="mech">Mechanical Engineering</option> </select> <br /><br/> <select id="text-two" name="two"> <option>Select Semester</option> </select> <br /><br/> <select id="text-three" name="three"> <option>Select Subject</option> </select> <br/><br/> <button class ="btn btn-primary" button type="submit" name="upload" value="Upload" onClick="val()">Upload</button> </form> And this is my other php file to which it is linked. <?phpif(isset($_POST['upload'])){ $path1=$_POST['one']."/"; $path2=$_POST['two']."/"; $path3=$_POST['three']."/"; $upload_path=$path1.$path2.$path3;}else{ echo "Select a Subject"; echo "<br>";}$allowed_filetypes = array('.doc','.docx','.jpg','.jpeg','.png','.ppt','.pptx','.xls','.xlsx','.pdf','.txt','.zip','.rar');$max_filesize = 20000000;$filename = $_FILES['userfile']['name'];$ext = substr($filename, strpos($filename,'.'), strlen($filename)-1);if(!in_array($ext,$allowed_filetypes)) die("<script LANGUAGE='JavaScript'> window.alert('You cannot upload the following type of file!') window.location.href='upload.php'; </SCRIPT>");if(filesize($_FILES['userfile']['size']) > $max_filesize) die("<script LANGUAGE='JavaScript'> window.alert('The file you attempted to upload is too large!') window.location.href='upload.php'; </SCRIPT>");if(!is_writable($upload_path)) die("<script LANGUAGE='JavaScript'> window.alert('You cannot upload to the specified directory!') window.location.href='upload.php'; </SCRIPT>");if(move_uploaded_file($_FILES['userfile']['tmp_name'],$upload_path . $filename)) echo ("<script LANGUAGE='JavaScript'> window.alert('Your file has been uploaded successfully') window.location.href='upload.php'; </SCRIPT>");else echo ("<script LANGUAGE='JavaScript'> window.alert('There was an error during the file upload!') window.location.href='upload.php'; </SCRIPT>");?> I have edited the phpini file with the following settings and also made a .htaccess file in the php folder.upload_max_filesize 25M post_max_size 25M memory_limit 64MBut when I intentionally upload a file greater than 25 MB, I get the error as given in the title. Also, considering the max file size is being violated, it does not give the error related to the file size, i.e The file you attempted to upload is too large, it says You cannot upload the following type of file. And in the background that post length warning thing comes.Please help me with this. I am on my localhost.
  9. Yes, DarkxPunk is right. Try referring the Twitter Bootstrap Documentation, you might get a bit of help from there if I got you right.
  10. Sublime Text 2 is the best for anything!
  • Create New...