Jump to content

pauleth

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

About pauleth

  • Birthday 11/07/1981

Contact Methods

  • MSN
    paul@activesolutions.us

Profile Information

  • Gender
    Male
  • Location
    Louisville, Colorado

pauleth's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. You guys are the best! That worked perfectly. Thank you!!!!
  2. Hey folks, I am trying to write a regular expression that will remove any html formating from a body of text and just leave the text in place. For example: <p><img src="img.jpg" alt="">This is the text that I want.</p> Will become, This is the text that I want. Does anyone have any suggestions on how I can accomplish this with regular expressions? I figure that I need to write an expression with ereg_replace() that removes the html brackets, '<' and '>', and also removes any text between the brackets... Thanks in advance for your suggestions.
  3. Sweet, I got it to work with the relative path. Thanks!
  4. No, I haven't tried yet. I'm actually at work right now, so it's hard for me to work on this stuff - so I thought I'd just get as much info as possible before I worked on it later. Thanks for the response.
  5. Do you need to provide an absolute path for this function to work, or can you include a path relative to where the script resides? For example, if I have the php script in a directory called mySite, and I have a directory in mySite called images, can I reference a file in the images directory as: $image = "images/myFile.jpg"; if (!file_exists($image)) { $error = "File does not exist!"; } Thanks in advance for your input.
  6. Hey Daniel, thanks a lot for the quick response. I tried to do some reading on the order or precedence online, but it was giving me a headache, haha. If the code looks okay to you, then I'll just keep it the way it is.
  7. Hey folks, So I am hoping to find a little help with logical operators. I have this code: if (empty($roll_id) || (!empty($manufacturer) AND !empty($iso))) { //////////////// CODE GOES HERE //////////////// } I want it to work like this... If Condition 1 is TRUE OR Condition 2 is TRUE, then... Condition 1 being: empty($roll_id) Condition 2 being: !empty($manufacturer) AND !empty($iso) The code actually appears to work the way I want it to, but I'm not very familiar with order of precedence, and I was wondering if there is a better way to write it. Thanks for your assistance.
  8. Thanks for the responses! I have used Smarty a little and I definitely like it. I think it's probably the way to go using one of those templating systems, but I was hoping I could be lazy and avoid learning one...
  9. Hey folks, just looking for some suggestions and recommendations on the best way to mix PHP and HTML, while effectively keeping presentation and logic separate. Do you tend to use more PHP tags in HTML blocks, or use PHP with echo to generate HTML output. How about templates such as Smarty? Thanks in advance.
  10. It looks like you have a period before the equal sign...
  11. Well, you could just forego installing the client portion, and install the server instead. Also, it may help to post the exact errors you are getting during the installation... But I agree about going with MySQL and staying away from Access...
  12. Also, it helps to post what the actual HTML output is from source when it is malfunctioning...
  13. I don't actually understand what you're saying... Could you elaborate a little bit?
  14. I don't think what you are trying to accomplish is that difficult, but your post sounds like you're pretty much asking the folks here to write the script for you. I agree that you should either find an open source package, or spend some time learning a little more about PHP and figure it out on your own... The actual database side isn't that hard, and if you did go with a sessions approach, you could set up something pretty straightforward to authenticate users and store particular session variables depending on who is logging in...
  15. The 'login' in /index.php?login and the 'register' in /index.php?register are referring to variables that are submitted to the script via the URL. They are not different pages, but just variables that are sent to the script at index.php for processing. So you might see /index.php?login=true&username=pauleth. When the script receives this, it defines two variables with those values. Here is an example: $login = $_GET['login']; // get the value stored in login in the URL $user = $_GET['username']; // get the value stored in username in the URL Now we have a variable called $login that contains the value 'true', and a variable called $user that contains the value 'pauleth'. You may have entire portions of your script that are only executed if a variable holds a particular value. Hence, someone who is actually logged into a site may see something quite different than an unregistered guest, such as a welcome message like: "Welcome back, pauleth!" I hope that helps...
×
×
  • 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.