Jump to content

WebStyles

Members
  • Posts

    1,216
  • Joined

  • Last visited

Everything posted by WebStyles

  1. so... it works now, but what was the problem, wanna share? (man your username really bugs me... how do you even remember that when you need to login?)
  2. the variable depends on how you're passing it over from the previous page: $variableName = $_GET['variableName']; $variableName = $_POST['variableName'];
  3. really? so if ID field in database is an int, you think SELECT * from `tableName` where `id` = '1' doesn't work?
  4. replace 1 with variable. $q = mysql_query("SELECT * FROM table WHERE `ID` = '$variableName'") or die(mysql_error()); $r = mysql_fetch_assoc($result) or die(mysql_error()); echo $r['AGE'];
  5. you can use javascript to check if all fields are filled in.
  6. personal habit. I always use backticks around field names, and always enclose the values in single quotes.
  7. how about detecting the language of the visitor's browser? I'm getting boxes in the top right corner, with questions in spanish, then french, etc... What If I don't speak those languages. Also, when a french or spanish message appears, the bottom link to read more actually says 'Read more...' in English, even though the rest is in another language. Maybe it should be translated accordingly.
  8. $q = mysql_query("SELECT * FROM table WHERE `ID` = '1'") or die(mysql_error()); $r = mysql_fetch_assoc($result) or die(mysql_error()); echo $r['AGE'];
  9. when you insert a wrong password, it jumps to a screen that displays both the username and password inserted (in plain text). You may argue that it doesn't matter 'cause the password was wrong anyway, but many people try other passwords they use (that actually work on other systems, maybe even with the same username)... This is not only disconcerting, as it also lets people know you actually have access to their passwords, and that you're probably not encrypting them.
  10. Tiny little detail: (that will mostly go undetected) The selected tab as we land on the homepage (wedding dresses) has a background fading from purple (top) to white (bottom). I would prefer it to fade to the color of the background directly below it (very faint blue), this would consolidate the connection with the button and the products being displayed. (it's probably unnoticeable on most systems)
  11. my "brutal honest opinion" is: (just homepage, didn't check out the rest) It seems very inconsistent in terms of text sizes, alignments, even box corner styles are different (yellow side box and green side box)... The shocking colors (I don't like them) and the large text makes it look like something cheap, unprofessional and unreliable. (in my humble opinion) Sorry.
  12. you can also search through the text to see if it has anything that will mess up your delimiters and escape them if necessary. or you can always choose something really far-out for your delimiters... |#|#|-|||||-|#|#| (what are the chances someone will write something like that?)
  13. in js you can loop through the array and create the string with your own separators before inserting it into the form. That should do the trick.
  14. in my opinion, there are several things you can improve to make it more pleasing to the human eye. (don't know if everyone sees the same as me, I'm on a Macintosh) HOMEPAGE: 1. main text is too 'glued' to the image 2. top text next to the logo could also be just a bit further apart from the logo and I would align it to the bottom of the logo and not the top. 3. the buttons beign bigger than the yellow line is weird, and frankly looks like a styling error. MENU: 1. text is too cluttered and hard to read like that. I would seperate each entry with a very faint horizontal line or something. CATERING & PARTY TRAYS AND PO-BOYS: 1. Just show a blank page and attempt to download a pdf file. CONTACT US: 1. why the change in style/harmony? homepage has the image on the left, I would keep this one on the left too. 2. too much space between image and text. 3. map seems completely out of place, hanging by itself at the bottom. Again, Maybe your code only displays correctly in Windows or specific browsers but not for me, I'm on a Macintosh with Firefox 5.0.1 Hope this helps
  15. true, for php that will be a very long string. But it gets there doesn't it? so you have 2 options: either seperate all the variables in js and place them in individual forms so that they arrive separated in your php file. or break down the entire string once it reaches your php file.
  16. sounds like a user permissions thing... Are you sure the user has enough privileges to create databases? also, you're trying to create a databse based on the value of $database, but I don't see that variable defined anywhere. (I'm assuming it's in mysql.php ??) anyway, just to debug, change: $sql1 = 'CREATE DATABASE IF NOT EXISTS `' . $database . '`'; mysql_query($sql1, $con) or trigger_error('Fail Connecting To Database: ' . mysql_error()); to something like: $database = 'phpFreaksTestDB'; $sql1 = 'CREATE DATABASE ' . $database; if(mysql_query($sql1, $con)){ echo 'database created'; }else{ echo 'failed '.mysql_error(); } and comment out everything that comes after that. This will at least tell you if the user has permissions.
  17. I guess you have an html template somewhere (or 5 in this case). If they're exactly the same for each user, there's really no point in duplicating them, if they're different, you probably need to change some code in each, so you would use file_get_contents() to read in the template, something like str_replace() to alter it, and then save it to another file.
  18. sorry, just added $fname = $l['fname']; to the code above (forgot about that part)
  19. try something like this (untested code, but hopefully will do the same) $query="SELECT * FROM extras"; // title, descr, fname $list = array(); while($result=mysql_query($query){ $list[] = $result; } foreach($list as $l){ echo '<div class="image" title="'.$l['title'].'">'; echo '<img src="images/work/th/kolie1.jpg" alt="" />'; echo '<div class="image-label"><span>'.$l['title'].'</span></div>'; echo '</div>'; echo '<div class="cycle">'; // second query $fname = $l['fname']; $query2="SELECT * FROM extraphotos WHERE fname = '$fname'"; while($result2=mysql_query($query2)){ echo '<img src="images/work/"'.$result2['picname'].'.jpg" width="710px" height="460px" />'; } // close divs echo'</div>'; echo '<div class="info">'; echo '<div class="title"><h2>'.$title.'.</h2></div> '; echo '<div class="descr">'.$descr.'</div>'; echo '<div class="item_url">'.$fname.'</div>'; echo '</div>'; echo '</div>'; } p.s. it's still not a 'brilliant' way to do it... I don't like mysql queries inside of loops like that.
  20. if the values get put into a form, all you need to do is submit the form (button or javascript can do this), then detect if a forma has been submitted (because you're submitting to the same page) and just use php to do whatever it is you want to do with the values.
  21. mysqlnumrows() should be mysql_num_rows(). AND mysql_numrows() should be mysql_num_rows().
  22. Not sure I understand the question, but it sounds like a simple POST issue. when you POST variables through a form, you need to use $_POST + the elements html name to grab the value. Here's an example: two html elements called 'johnny' & 'Misty' <select name="johnny"><option value="1">value is One</option></select> <input type="text" name="Misty"> you grab them with: echo $_POST['johnny']; echo '<br>'; echo $_POST['Misty']; in your case, I suggest you dump the entire $_POSt array to see what's in it first: echo '<pre>'; print_r($_POST); echo '</pre>'; hope this helps (and was what you were asking)
  23. Today I saw this post: http://www.phpfreaks.com/forums/index.php?topic=339734.0 (check out the username overlapping) There should be a limit when creating account or changing username. (it's actually strange that there isn't)
  24. Opps. Sorry. change if (isset($_POST['stand_id']) == $url_show ['stand_id']) echo ' selected'; to if (isset($_POST['stand_id']) && $_POST['stand_id'] == $url_show ['stand_id']) echo ' selected'; Keep in mind it's expecting that posted value to compare. you can change that line to any other variable if you're getting the selected item from somewhere else.
×
×
  • 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.