Jump to content

bolty2uk

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bolty2uk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi there.. thanks for the reply, yes the catagories already have parent categories so not really the issue.. what we need is if a user types the word 'dentist' onto a search form it will query the 'CATEGORY' table to find the word dentist... when found dentist use the id assigned to denstist and with this id pull results with this same id from the LISTINGS table.. basically bring up all row which are in the dentist category.. I could do this if i added another column to the LISTINGS table called category and had the category as a word but for other reasons i need the two seperate tables.. its a bit of a nightmare, im just wondering if there is an easier way at all..??
  2. hi all, just a quick post to see if anyone one out there can help me or maybe suggest ways of attempting what i need done.. If i explain what i have first then what i would like to happen it will give you an idea of what i need advice on.. ------------------------------------------------------------------------- WHAT I HAVE I have mysql which i use phpmyadmin to edit/maintain.. I have two tables (listings and catagories) in 'catagories' there are two fields ID and CATS... 1 doctors 2 dentists 3 schools ert etc... in 'listings' there are three fields NAME, ADDRESS and ID joe norfolk 2 dave suffolk 1 sid essex 3 etc etc... These tables are linked via the id fields, for example 'joe in norfolk will be a dentist' and 'sid in essex will be a school' -------------------------------------------------------------------------- WHAT I WANT TO TRY Ok now what i want to try to do is create a search query that will be able to pull info from the above tables, problem is i think it will need a query inside a query so to speak.. the search i would like to try is by category, so if a user searches for dentists in norfolk it will bring back the info from the listings table (joes row) now i could achieve this easily by using checkboxes, dropdowns etc with the value of the ID number but there are just too many categories now. Anyway, if anyone has any advice or suggestions it would be much appreciated.. Many Thanks for any replies...
  3. hi again. ive now found a non adult version of what i am looking for, im after a script the same as thisbut with different user permissions for the forum and without all the rating systems. http://www.microscripts.net/product/miphoto many thanks
  4. Totally understand revraz and thats why i didnt turn it into a active link. Basically i need a non adult version of the site i highlighted. I cant find a non adult site with all the same features at present to use as a guide. some features i need will allow user login, different membership levels, chat boards for different member levels, user can have their own profile which thay can add/edit, advertisng columns for profiles of different membership levels, and and overiding admin section to control all content. the link i put does this and more, ive had a look at handshake, dolphin and many more but they all seem to offer too much. Basically i need something just a bit simpler. Many thanks
  5. hello all, i am thinking about putting a community site together and was after recomendations for scripts. The only place i can find something that offers all i want is here - http://www.sotonsex.com/public/index.php?module=pubmain I had a good look but just cant find something to suit, so if anyone knows of a script to do all of this it would be much appreciated. many Thanks
  6. Hello all, im just enquiring if anyone can offer me some inspiration or maybe have ideas of workarounds for a cross browser issue.. I have a html list which sits nicely beside an image. this works ok and validates nice. But i do have one small problem. In I.E and Opera the list will sit nicely aligned with the top of the image, yet in FireFox there is a gap at the top. Ive just got no idea what is pushing the list down in Firefox.. Anyway ive included code just in case anyone has ideas.. <div id="rotatingAndMenu"> <div id="menu"> <div id="navcontainer"> <ul id="navlist"> <li><a href="#" title="1">1</a></li> <li><a href="#" title="2">2</a></li> <li><a href="#" title="3">3</a></li> <li><a href="#" title="4">4</a></li> <li><a href="#" title="5">5</a></li> <li><a href="#" title="6">6</a></li> <li><a href="#" title="7">7</a></li> <li><a href="#" title="8">8</a></li> </ul> </div> </div> <div id="rotating"><a href="#"><img src="#" name='SlideShow' alt=""></a> </div> </div> and css... #navcontainer { width:203px; vertical-align:top; } #navcontainer ul { margin-left: 0; padding-left: 0; vertical-align:top; list-style-type: none; color:#FFF; text-align:center; text-decoration:none; font-weight:700; font-size:14px } #navcontainer a { display: block; vertical-align:top; padding: 7px; width: 203px; margin-bottom: 4px; cursor:pointer; background-color: #CE0000; border:1px solid #fe0f60 } #navcontainer a:link, #navlist a:visited { color: #EEE; text-decoration: none; } #navcontainer a:hover { background-color: #FFBFBF; color: #fff; } #rotatingAndMenu { width:100%; height:291px; vertical-align:top; } #rotatingAndMenu #menu { float:left; width:203px; height:100%; vertical-align:top; text-align:center; padding:0; } #rotatingAndMenu #rotating { float:right; width:597px; } Ive tried vertical-align but for some reason this is always pushed down?? Many Thanks for any replies this may generate..
  7. hello.. i have a quick query and i would appreciate it very much if someone could give me some advice or point me to a tutorial/guide that details this.. I have a mysql database and in that i have a users website and contact details.. when i display them on the page i use this code to make there details linkable.. <a href="<?php echo $website; ?>" target="_blank">website</a> | <a href="mailto:<?php echo $email; ?>?subject=Enquiry sent via my website" >contact</a> Now the problem i have is if a user hasnt put in a email or website or both then these links will still be there but wont work.. So what i am after is a way of displaying n/a if i dont have these details.. after doing a bit of reading up i tried this.. <a href="<?php echo $website; ?>" class="style3" target="_blank"><?php echo 'website';if (empty($website)) echo 'N/A'; ?></a> but this will show 'websiteN/A'.. so i am after a few ideas on how best to achieve this, so basically if the database hasnt got any info for the user it will display n/a.. many thanks for any responces.
  8. Hi all... I wonder if anyone can offer me any recommemdations. I the near future i would like to set up a feature packed shopping cart. I would rather it be with php/mysql, have a decent admin panel and be easyish to install and customize. I dont mind paying for a good solution its just a case of i dont want to get something that is a nightmare. I am thinking along the lines of cs-cart but would like to hear if other members have any suggestion as to what to look at or stay well away from.. Anyway... thanks for looking and any replies are well appreciated.. Cheers..
  9. Sorry if this has been touched on before but i am having problems finding a definite solution. Also this may be more of a javascript issue so i do apologise if i have chosen the wrong forum to start. Ok. I have a simple form where a user can enter details. What i need from this form is two seperate buttons with different actions. Basically they click 'Button One' then they go with all form info to one page. And if they click 'Button Two' then they go with all info to another page. I have seen possible solutions with javascript but this will require the user to have javascript enabled. So im just after advice on the best solution to this. thanks for any responce this may generate. Bolty2uk
  10. Thanks Guys.... your code did the trick.. Really is much appreciated. Thank you :-X
  11. Hello.. After quite a bit of reading up and playing about i just cant seem to find an answer that will work for something which should be very easy and straight forward. Basically i have a self-validating php form that sends the users input to my email inbox. What i need to do on the form is add a single check box (which i have already done) which the users will just tick if they wish to receive a newsletter.. Now my problem is i just cant get my head around the code i will have to use to send this details to me. All i need to receive is a simple "yes" in the email i get if they checked the box and nothing if they didn't... I just don't know how to achieve this.... Here is the code i am working with.... <?php $to = "admin@mymail.com"; if (!isset($_POST['submit'])) { showForm(); } else { $error = 0; if(empty($_POST['name'])) { $error = 1; $errstr[] = "Please enter a name"; } if(!preg_match("/^(?:[\w\d]+\.?)+@(??:[\w\d]\-?)+\.)+\w{2,4}$/", $_POST['email'])) { $error = 1; $errstr[] = "Please enter a valid email address"; } if(empty($_POST['message']) || preg_match("/^enter your message here$/i", $_POST['message'])) { $error = 1; $errstr[] = "Please enter a message"; } if(empty($_POST['imagetext'])) { $error = 1; $errstr[] = "Please validate the security code"; } else { include "securimage.php"; $img = new securimage(); $valid = $img->check($_POST['imagetext']); if(!$valid) { $error = 1; $errstr[] = "The security code you entered was incorrect"; } } if ($error == 1) { echo "<center>\n<font style=\"color: #FF0000\">\n"; foreach($errstr as $err) { echo "<li> " . $err . "</li>\n"; } echo "</font>\n</center>\n<br />\n\n"; showForm(); } else { @mail($to, "Enquiry","On" . date("r") . ", " . $_POST['name'] . " from " . $_POST['email'] . " sent the following message.\nEnquiry - " . $_POST['reason'] . "\n\n" . "\n\n" . stripslashes($_POST['message']), "From: " . $_POST['email']); echo "<font style=\"color: #003366\"><left>\n<b>Thank You.</b><br /><br /> Your contact form submission has now been successfully sent to us.<br /><br />One of our team will be responding to your enquiry very shortly.</font>"; } } //else submitted function showForm() { $_POST['message'] = @htmlspecialchars(@$_POST['message']); echo <<<EOD <form method="POST"> <table cellpadding="5" cellspacing="1" width="90%" align="left"> <tr> <td class="style3">Name:</td> <td align="left"><input type="text" name="name" size="40" value="{$_POST['name']}" /></td> </tr> <tr> <td class="style3">Email:</td> <td align="left"><input type="text" name="email" size="40" value="{$_POST['email']}" /></td> </tr> <tr> <td class="style3">Enquiry:</td> <td align="left"><input type="text" name="reason" size="40" value="{$_POST['reason']}" /></td> </tr> <tr> <td class="style3">Message:</td> <td align="left"><textarea name="message" rows="5" cols="35">{$_POST['message']}</textarea></td> </tr> <tr> <td align="right" class="style3"><input name="subscribe" type="checkbox" value="{$_POST['subscribe']}" /></td> <td align="left" class="style2">Subscribe me to the news letter.</td> </tr> <tr> <td align="center" colspan="2"><img src="securimage_show.php" alt="security code"></img></td> </tr> <tr> <td> </td> <td class="style4">(Enter above code) <input type="text" size="20" name="imagetext" /></td> </tr> <tr> <td> </td> <td class="body" align="left" colspan="2" ><input type="submit" name="submit" value="Submit" /> <input name="reset" type="reset" id="reset" tabindex="5" value="Reset" /></td> </tr> </table> </form> EOD; } ?> I know this must be relatively straight forward but im afraid on this occasion i just cant seem to see the wood from the trees... If anyone can offer any advice or know of a good tutorial it would be most appreciated... Thanks in advance for any responses this may produce.
  12. Hey administator try this... Leave the date your user put in in a date field... When the user inputs the form use simple drop down option boxes to choose the date.. Remember to put the correct values for each....( 1st, 2nd 3rd will be 01, 02, 03 and months will be the same jan , feb, march 01, 02, 03...) you get me.. This will save you much hassle as they will be entering a date that you know how to handle and is real.. Next put these in to named variables on the form, so day, month and year.... So you will end up with this.. $day="01" $month="02" $year="2006" so the date the user entered for his event would be 1st february 2006.. Next step you will need to put these variables so mysql can take them into a date field... So when you insert to mysql you will need this... [code]$name=$_POST['name']; $date="{$_POST['year']}-{$_POST['month']}-{$_POST['day']}"; $event=$_POST['event']; $listing=$_POST['listing'];[/code] Now enter the values to mysql... [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]"INSERT INTO events VALUES ('$name','$date','$event','$listing')";[/quote] Now the date we entered will sit in mysql DATE field like this [b]2006 02 01[/b] Now obviously getting the date out like that is no good so to get it from that to [b]1st February 2006[/b] you will need this.... [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]mysql_query("SELECT name, DATE_FORMAT(date,'%D %M %Y') AS date, event, listing FROM events");[/quote] Rock on tommy
×
×
  • 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.