Jump to content

MinusMyThoughts

Members
  • Posts

    227
  • Joined

  • Last visited

Everything posted by MinusMyThoughts

  1. What doesn't support it? I'm testing with FF, Safari, and Opera on Mac, plus IE6, Opera, and FF on PC. It works on all of them...<br style="clear: right;"> worked wonderfully. Thanks!-Jason
  2. And a whole new era of CSS begins for me...I thought a clear could only be declared in the CSS as an attribute (i.e. clear:both;).I'll give it a shot. Thanks so much!-Jason
  3. Hey, guys.I'm having a frustrating issue with two divs in a CSS/PHP/HTML layout. I can't seem to get them to align with each other without floating both of them; one to the right, and one to the left.That fix is alright, sorta, but when I try to put another row of divs below it, it causes an alignment issue. You can see it at the link below (the CSS is embedded in the page to allow me to change it with variables from PHP):MY BROKEN LAYOUTSo what I guess I'm asking for is a cross-browser method of getting my two divs (the one containing a name like "Andrew" and the one containing a block of text) to line up properly so that the ones below them will do the same.This whole layout is fed by a set of PHP functions. I fed each database item into a div to format it the way that particular piece should be formatted. If I can get over this hurdle, I'm going to be extremely happy.Thanks for any help you can give me!-Jason
  4. What kind of error are you getting? Is it doing anything when you submit it? :)One thing I saw right off the bat, though, is that you need periods, not commas, to concatenate a string. You want to use this instead:echo '<option value=c1speed1>' . $a188 . '</option>'; Another idea would be to have your switch set a variable. That could help in debugging.i.e. <select name='selectbox2' id='selectbox2'><?php $box2 = 'Nothing selected!'; if(isset($_POST["selectbox1"])) { echo "<option value=''>Speed:</option>"; switch ($_POST["selectbox1"]) { case 'c1': $box2 = "<option value=c1speed1>" . $t220 . "</option>"; break; case 'c2': $box2 = "<option value=c2speed2>" . $t220 . "</option>"; break; case 'c3': $box2 = "<option value=c3speed3>" . $t220 . "</option>"; break; } }echo $box2;?></select> I think there might be far easier ways to do this with JavaScript, though. It may be worth looking into.-Jason
  5. I fudged it using a min-height:360px; setting for my container div.I know there's got to be a better way to do this, so I'd love any ideas. Thanks!-Jason
  6. It looks like you're checking to see if the user is in the database before allowing your script to insert that user into the database.I think you want the value of mysql_num_rows($sql) to be equal to zero, meaning the user does not already exist.Unless I'm misunderstanding your question.-Jason
  7. The best way I can explain what's happening is to show everyone, I suppose:My working siteBeta Site is breaking in FF and Safari on Mac. It works in Opera, though.What I'm attempting to figure out is what attribute will force my container div (<div id=body>) to adjust its height to encompass the image i've aligned to the right in the display paragraph...Here's an HTML snippet: <div id="body"> <div id="email"> </div> <div id="content"> <p id="layoutTitle">Welcome to MikeYuhaniak.com!</p> <p id="layoutTextarea"> <img id="layoutImage" src="images/userPics/Home6.jpg?78" align="right">This page is currently under construction. Please check back soon for updates. <br> <br> Posted 03/09/07 </p> </div></div> And here's my CSS: body { background-color: #000000; margin:0px; padding:0px; text-align: center; color:#000000; font: garamond, serif; }#master { background-color: #000000; width: 945px; margin: 0px auto; padding:0px; }#header { background: url('../images/MY_header.jpg'); width:945px; height:202px; margin:0px; padding:0px; }#menu { margin:0px; padding-top:170px; font-size:125%; }#body { width:871px; height:auto; margin-left:39px; padding-top:10px; padding-bottom:10px; background:#CCCCFF; }#email { background: url('../images/MY_newsletter.jpg'); width:206px; height:191px; float:left; }#content { width:660px; margin-left:211px; text-align:justify; }#footer { background: url('../images/MY_footer.jpg'); width:945px; height:49px; margin:0px; clear:both; }#footertext { color:#FFFFFF; font-size:80%; padding-top:18px; margin:0px; }/* Layout rules */#layoutTitle { margin:0; font:150% bold; }#layoutInput { margin:0; font:110%; }#layoutImage { margin:0; padding:5px; }#layoutTextarea { margin:0; padding:5px; } Thanks to anyone who has some suggestions!-Jason
  8. I haven't tested it, but I found THIS ARTICLE when I searched the w3schools JavaScript forum.Looks like a good way to create a RTE without allowing HTML.If I've wrapped my head around this properly, using BBCode and this editor allows the developer to utilize the strip_tags() function, making it safe from malicious code. HTML will be added later by a script written by the developer, meaning only tags that the developer specifically defines will be inserted into the post.This seems safer than the Dynamic Drive Rich Text Editor, since clicking "View Source" in that editor shows raw HTML. I didn't look too deeply into their safeguards against potentially troublesome code, but I'd prefer to do a little more work to ensure safety...Anyways, thanks so much for the input! Hopefully the stuff I dug up will help some folks out!-Jason
  9. Thanks, but I don't need the code for making the BBCode work...I'm looking for buttons that will insert the BBCode for my users. And, upon using my on-second-thought approach, I think I should have posted this in JavaScript.Hmm...Anyone?-Jason
  10. Hey, everyone!I'm trying to build a tool that will allow my users to format their text using BBCode. I found THIS POST on preg_replace(), and I think I can implement and customize the function with relative success.What I'm not clear on, however, is the code necessary to create the toolbars at the top of my textarea to allow users to click a button to add tags to their text.I'd also like to add the feature to allow a user to highlight a word and add opening and closing tags to their selection For example, the user starts with this phrase: This is some sample text By highlighting and clicking the "B" button, the user ends up with: [b]This is some sample text[/b] So, my question is this: does anyone have a good tutorial or any advice on creating a button toolbar that will integrate with the preg_replace() function?Thanks so much!-Jason
  11. Sorry for the extremely belated reply.Apparently, MySQL didn't initiate properly or something when I installed XAMPP.I just opened the XAMPP index in http://localhost (XAMPP has a page that shows up after installation to let you know it was successful), and the link to phpmyadmin gave me the following error: #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured) I get a socket error when I run mysql-test-run, too. So, is there a reference or a tip from anyone on configuring my local socket to cooperate?Thanks!-Jason
  12. Do you mean that you want to automatically generate the users' pages?You could set up a template page that could grab a $_GET variable from the link (i.e. <a href="users/profile.php?userid=89282752">).That would allow you to query your database of users and put their information into the page you created.Is that what you were asking for?-Jason
  13. Hey, everyone. I'm still wrestling with an install issue concerning XAMPP. I got everything running, and MySQL is present, it just isn't working yet. I can see that MySQL is working when I use the 'phpinfo();' command.Now, I'll be the first to admit that I know just enough about MySQL to store and retrieve information, so setting up my machine with a root user and all that jazz has proven to be a tad bit over my head.So, all I know for sure is that XAMPP documentation says MySQL comes without a root password.My understanding is that this means I use the following to connect to the database:host: 'localhost'user: 'root'pass: ''That fails when I attempt to connect, saying, "Can't connect to local MySQL server through socket '/Applications/xampp/xamppfiles/var/mysql/mysql.sock' (2)"So, I came across "mysql-test-run" in the XAMPP documentation, and ran it, to these results: I have no idea what this means or how to fix it.Help?Thanks!-Jason
  14. Thanks for the help! I ended up using XAMPP, and everything's working, except I haven't quite dialed in MySQL yet.You guys are great. Thanks again!-Jason
  15. I'm not sure why the online tutorials never seem to work for me, but they don't.Does anyone on this forum use a mac (I have OS X 10.4.8) and have PHP 5 installed and running?I just made the switch to mac for a company I'm working for, and I'm completely unfamiliar with things like Terminal and installing the source for things.I've had a mac for about 36 hours, so be gentle. I'm clueless.Thanks for your help and/or links to tutorials directly tailored to mac novices.-Jason
  16. Amazing.I think my favorite thing about getting help from you, justsomeguy, is that afterward, I know exactly why everything is happening in the code.Thanks so much!-Jason
  17. Thanks, boen_robot!I'm closer, now, but still not quite there...Running a slightly modified function: function queryTable($tableName,$select,$where,$orderbyASC_DESC,$limit) { $query = "SELECT * FROM {$tableName}"; if ( !empty($select) ) $query = "SELECT {$select} FROM {$tableName}"; if ( !empty($where) ) $query .= " WHERE {$where}"; if ( !empty($orderbyASC_DESC) ) $query .= " ORDER BY {$orderbyASC_DESC}"; if ( !empty($limit) ) $query .= " LIMIT {$limit}"; $result = mysql_query($query) or die(mysql_error()); $array = mysql_fetch_assoc($result); return $array; } I'm calling the variable later as: <?=queryTable('aKa_SOM','*','','studentID DESC','1'); echo $array['studentName'];?> The output is "Array" from that call.If I use: <?=$queryTable = queryTable('aKa_SOM','*','','studentID DESC','1'); echo $queryTable['studentName'];?> This returns "ArrayJohnny Student" when called.So, I guess I don't understand how to declare the variable as an array instead of a variable. I thought it was "array $array;" but I'm having no luck with that...Any suggestions?-Jason
  18. Hey, guys!I'm attempting to build a function library for myself so I can save time while programming, but I'm running into some issues right off the bat.Here's what I'm trying to do:I want to build a function called "queryTable()" that will pass a series of parameters to allow me to search my database tables and return an array.Here's what I'm having trouble with:I can't seem to get my array to carry on outside the function. I tried looking through the documentation, but because I'm not too clear on the terminology of what I'm trying to do, I'm not getting far.Here's the function I'm attempting to use: function queryTable($tableName,$select,$where,$orderbyASC_DESC,$limit) { $query = "SELECT * FROM {$tableName}"; if ( !empty($select) ) $query = "SELECT {$select} FROM {$tableName}"; if ( !empty($where) ) $query .= " WHERE {$where}"; if ( !empty($orderbyASC_DESC) ) $query .= " ORDER BY {$orderbyASC_DESC}"; if ( !empty($limit) ) $query .= " LIMIT {$limit}"; $result = mysql_query($query) or die(mysql_error()); return $queryTable = mysql_fetch_array($result) or die(mysql_error()); } My goal is to be able to use a variable later, such as "$queryTable['studentName']" in code outside the function, but so far I'm not having any luck.I'd appreciate any feedback, either relevant to my problem or relevant to the general look and cleanliness of the function itself. Like I said, I've never done this before, so I'm all for constructive criticism.Thanks!-Jason
  19. After what feels like years and what measures out to be about 14 wasted hours, I found the problem with my installation:In Apache's httpd.conf file, these lines: LoadModule php5_module C:/dev/server/PHP/php5apache2.dllAddHandler application/x-httpd-php .phpPHPIniDir "C:/your/path/to/PHP" Need to look like THIS: LoadModule php5_module C:/dev/server/PHP/php5apache2.dllAddHandler application/x-httpd-php .phpPHPIniDir C:\your\path\to\PHP\php.ini I looked at every tutorial I could find, and nearly every one of them was stalled out with somebody saying, "That didn't work. Does anyone have any other ideas?"Hopefully this will save someone else some heartache.-Jason
  20. aspnetguy-Here is my configuration:php.ini Lines 521 & 522; Directory in which the loadable extensions (modules) reside.extension_dir = C:\dev\server\PHP\ext\Lines 652, 653, & 654;extension=php_msql.dllextension=php_mysql.dll;extension=php_oci8.dll Also, I'm having a really weird issue with the php.ini path in the phpinfo(). It says C:\WINDOWS, but there is not a php.ini file there. So I copied one there and added the line PHPIniDir C:\dev\server\PHPin an attempt to correct the issue. Still C:\WINDOWS.I don't really know what's going on. I looked through the php.net manual and any other installation guide I could find online - no dice. At this point I think I'd just be happy to know how PHP is finding a ghost file in C:\WINDOWS.Thanks for the help!-Jason
  21. Hey, everyone!I wasn't entirely sure where this sort of question belonged, but my best guess was in here.I have just installed PHP 5, Apache 2.0, and MySQL 5 on my computer (Windows XP) for local testing. All the installations went according to plan and tested out fine. I followed the steps given HERE to install all three. My problem is this: I cannot, for whatever reason, get PHP to hook into MySQL. Everything looks the way the tutorial said it should, and I can use MySQL through the command line successfully, but I get the "Call to undefined function..." error when I call something like "mysql_query()" in a PHP file.Has anyone had this problem? Is there a better tutorial that I didn't see? Should I set my computer on fire?Thanks!-Jason
  22. awesome. yeah, i don't know much about CSS. just enough to slowly hack through it......thanks!love,jason
  23. i don't know what to call what i'm trying to do, so hopefully i can explain it adequately......i'd like to be able to set a default for something like text size inside a div called header, which will have multiple divs and other elements inside it. if i can avoid it, i'd like to be able to merely use a <p> tag, rather than needing to add <p class="headerText"> to every tag......but, when i get to the body, i'd like to reset that default text size, again without needing a class identifier......is there any way to set properties for a div that all contained elements will inherit?...thanks!love,jason
  24. i figured it out: apparently, FF doesn't read #3colSide. it has to be written #threeColSide......so. i learned something today. maybe this will save someone else a little heartache...love,jason
  25. i relocated the link and updated it in here. the link will work now. sorry about that!...this: left:50%; margin-left:-400px;is a work-around i found to center a div with position:absolute; everything else i found only worked on relatively positioned divs, which were leaving me with a margin i couldn't get rid of......is that a faulty code? it seems to work in both browsers (IE and FF), but i've learned that doesn't mean it's good code...love,jason
×
×
  • Create New...