Jump to content

Gighalen

Members
  • Posts

    193
  • Joined

  • Last visited

    Never

Everything posted by Gighalen

  1. Have you tried setting a fixed width on the right div? Div's have a width of 100% unless otherwise specified.
  2. Youtube would definitely be your best bet. As a rule of thumb, each of your main design elements should be in their own layer, and each layer will translate to it's own div, and may have multiple other divs or other elements contained within that div.
  3. This is debatable, but I generally try to have a fix width of anywhere from 980-1000 with a margin:0px auto; on the wrapping container to center it. I personally don't like using % because if someone happens to be running a tiny resolution it will shoot everything in the foot, where as fixed width forces the page to be that big so the user with the small resolution would get a scroll bar. A hybrid approach that you might consider is using something like jQuery to find the width of the window on page load, and then multiply that number by something like .9 (for 90% width) and apply that finished number as the fixed width of your parent wrapper.
  4. Just revamped quite a few things on my hosting company's site, let me know what you think: www.sitepearl.com I still need to add a few static pages (cPanel, Fantastico, etc), but the important stuff is there.
  5. #include <iostream> #include <iomanip> #include <string> #include <fstream> using namespace std; int main(){ string inputFile; ifstream inFile; int count = 0; // keep track of number of integers read int numbers[19]; // array to store our integers cout << "Enter the name of the data file now: " << endl; cin >> inputFile; inFile.open(inputFile.c_str()); while(!inFile){ cout << "==> Error opening file: " << inputFile << endl; cout << "==> Try Again..." << endl; inFile.clear(); cout << fixed << "Enter the name of the data file now: "; cin >> inputFile; cout << inputFile << endl << endl << endl; inFile.open(inputFile.c_str()); } while(count <= 19 && inFile >> numbers[count]){ cout << numbers[count] << endl; count++; } system("pause"); return 0; }
  6. Let's say I have a single dimensional array containing 10 elements, and have 0123456789 on my standard input stream. How would I read these values into my array, with 1 digit per element?
  7. My guess would be that it is because you have it encased in the STRONG tag. Try removing those tags, and applying the font-weight attribute to your styling, like so: echo " <form name='search' action=".$_SERVER['PHP_SELF']." method='post'> <table width='50%' align='center' style='position:relative;center:0px;top:30px;z-index:1> <tr> <td colspan='2' style='font-family:verdana;font-size:110%;font-weight:bold;'>Find</td><br></br> </tr> <tr> <td align='right' style='font-family:verdana;font-size:110%;'>Bebe:</td><td><select name='bebe'style='font-size: 18px;'> <option value='all'>All</option> <option value='Fy'>Fy</option> <option value='Kir'>Kir</option> </td> </tr> </select> <tr> <td align='right' style='font-family:verdana;font-size:110%;'>Om:</td><td><select name='om' style='font-size: 18px;'><option value='all'>All</option> <option value='F'>F</option> <option value='S'>S</option> <option value='j'>J</option></td> </tr> </select> <tr> <td align='right' style='font-family:verdana;font-size:110%;'>Pr:</td><td><select name='pr' style='font-size: 18px;'><option value='all'>All</option> <option value='ry'>Ry</option> <option value='am'>Am</option> </td> </tr> </select> </tr> <tr> <td colspan='2' align='center' ><input type='submit' name='submit' style='font-size: 15px;' value='Search!'></td> </tr> </table></form> <table> <td style='position:absolute;right:18px;top:36px' 'tdimage' BACKGROUND='for1.jpg' width='290' height='600'></td></tr> </table>" ;
  8. Use <?php, not <?. Remove unnecessary whitespace. Though unrelated, I would also change $mid = $_GET[mid]; to something like if(!is_numeric($_GET[mid]) || $_GET[mid] > 9 || $_GET[mid] < 1){ $mid = 1; } else { $mid = $_GET[mid]; }
  9. Your host could have their default time settings all funkified :3
  10. Exactly what code are you trying to align it to the left with?
  11. Try adding double quotes around the value attribute. <form action='processformmissing.php' method='POST'> <fieldset> <legend>Choose Department</legend> <select name='depart'> <option value=''></option> <?php while ($row = mysqli_fetch_array($result)) { extract($row); echo "<option value="'.$department.'">$department</option>\n"; } ?> </select> <p><input type='submit' value='Select Department' /></p> </fieldset> </form>
  12. You can never be too safe with stripping stuff out of data submitted to a database. I've personally never built an application that handled URLs, but I might suggest using str_replace to replace all the / in urls with a '-', then use the same str_replace function when you output the data to replace the '-'s with /. I hope that makes sense.
  13. Also, if all you're seeing is a blank screen, you might be receiving an error but have warnings turned off in your php.ini file.
  14. What happens when you use: <?php $db_host = "host"; $db_usernamen = "username"; $db_pass = "password" $db_name = "database name"; mysql_connect($db_host, $db_username, $db_pass) or die ("couldnot connect to mysql"); mysql_select_db("db_name") or die ("no database"); ?> and <?php require("connect_to_mysql.php"); echo "<h1>success in database connection! happy coding</h1>"; ?> ?
  15. Have you checked the php.ini file to make sure document_root or whatever is pointing to C:\Inetpub\wwwroot? And I think it goes without saying - have you checked the make sure the service is running?
  16. I'm not exactly sure how functions will behave if you create one that already exists, but I can tell you that you can create functions in older PHP versions that are used by newer PHP functions to achieve the same result. In example, the realpath_cache_size() function was added in PHP 5 but you can create a function in PHP 4 with that name to create a function that does the same that it would do in PHP 5 - or does something completely different. Hope this helps.
  17. All this is doing is loading .dll file to apache so apache knows how to interpret PHP, and the AddType lines are just telling Apache that it knows how to interpret those filetypes.
  18. If you decide to take a Joomla route, there is a component called JomSocial that handles almost everything you can think of. Many websites have templates out there modeled specifically for JomSocial.
  19. It may be a permissions problem of sorts. Is your form on the same server as your administration panel?
  20. I just use Joomla - even for static sites The themes and modules/components available for it is quite an extensive list, and support is pretty easy to come by.
  21. I always use WAMP on a machine where I need a fast install. It installs Apache, PHP, MySQL, and all the other critical components. Enabling/Disabling features is done through the control panel as well, so there in so need to edit the php.ini file, etc manually. http://www.wampserver.com/en/download.php As far as actually learning PHP goes, I would look into the tutorials over at w3schools.com.
  22. I'm almost certain you need a space between : and index.php.
×
×
  • 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.