Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Orral

Members
  • Joined

  • Last visited

Everything posted by Orral

  1. Hi Guys, I'm currently looking at a few different options but am unsure what to go with so I thought i'd see what you guys use. So ... are there any decent invoicing applications that you use for business whether they are free or paid apps? Thanks, Mark
  2. Great to hear some peoples opinions/preferences ... I personally like to use wordpress currently.
  3. I'm just interested to know who uses what CMS and why? Do you prefer open source software or have you developed your own solution?
  4. Hi, I was wondering if anyone could give me a heads up on how to switch the CSS everytime someone views my site? So for instances it is always a different background colour etc If anyone could pass on some knowledge it would be great. Thanks, Mark
  5. Hi, I was wondering if anyone here has created their own custom ftp client using PHP before. I'm looking at developing one of my own (just for the hell of it) and i'm curious as to how others have constructed theirs before. If anyone can provide any advice on where to start i'd be pretty happy! Thanks, Mark
  6. Hi Guys, thanks for the quick replies! I'm not 100% sure exactly what i'm after/need. I'd rather have linux based and I currently have 4 websites on my bulk user package that i'm developing/have developed. MySQL databases are a must with whatever I choose and in terms of storage space/monthly banwidth... what do you guys suggest and at what kind of prices? Thanks!
  7. Hi people, i'm currently with Streamline.net and have a bulk user package which expires in January. I'm wondering if there is anyone that knows of any decent website hosting that is priced well. Something to host multiple accounts, possibly reseller packages. Suggestions would be much appreciated. Thanks, Mark.
  8. Thanks buddy, that did the job.
  9. Yes that is what i'm trying to do. Do you have a solution?
  10. I tried that....works exactly the same but doesn't solve the issue unfortunately.
  11. Hi people, i'm having trouble with limiting the number of words with regards to an advertising list. Instead of limiting it keeps repeating. Here is the code i've been tryin to get working, any help would be great thanks. while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) { if ($row) { $description = nl2br($row['description']); $words = explode(" ", $description); $small = array_slice($words, 0, 20); for($x=0; $x<sizeof($small);$x++) { echo "<tr><td><img src=\"ad_images/{$row['image_1']}\" width=\"150px\" height=\"85px\"/></td></tr>\n\n"; echo "<tr><td><a href=\"buyer.php?classified_ad=car&id={$row['ad_id']}\" target=\"_self\">{$row['title']}</a></td></tr>"; echo "<tr><td>{$row['mileage']} miles</td></tr>"; echo $small[$x] . "$description";; }}}
  12. Orral replied to Orral's topic in Server Side
    After a bit of playing around I have discovered that the problem lies somewhere around here in the code below. For some reason I believe when the data is posted from a form it isn't being posted onto the other pages, 2, 3, 4 etc only page 1. Can anyone think of a solution? Thanks, Mark. case 'list': require_once ('mysql_connect2.php'); [color="#FF0000"][b] if (!empty($_POST['make'])) { $getMake = escape_data($_POST['make']); }else{ $getMake = FALSE; echo ''; } if (!empty($_POST['model'])) { $getModel = escape_data($_POST['model']); }else{ $getModel = FALSE; echo ''; } if ($getMake && $getModel){ $display = 3; if (isset($_GET['np'])) { $num_pages = $_GET['np']; }else{ $query = "SELECT COUNT(*) FROM classifieds WHERE make='$getMake' AND model='$getModel' ORDER BY ad_id ASC"; $result = mysql_query ($query); $row = mysql_fetch_array ($result, MYSQL_NUM); $num_records = $row[0]; if ($num_records > $display) { $num_pages = ceil ($num_records/$display); }else{ $num_pages = 1; } } if (isset($_GET['s'])) { $start = $_GET['s']; }else{ $start = 0; } if (isset($_GET['make']) && isset($_GET['model'])){ $query = "SELECT * FROM classifieds WHERE make='$getMake' AND model='$getModel' ORDER BY ad_id ASC LIMIT $start, $display"; $result = mysql_query ($query); $row = mysql_fetch_array ($result, MYSQL_ASSOC); echo "'$result'"; echo '<div id="background4"> <div id="background6">'; for some reason I believe the data posted from a form isn't being being posted onto the other pages, just page one
  13. Hi people. I'm currently trying to build a kind of search method for a site i'm working on but currently I need a bit of help with my paginating as I can't seem to get it to work properly. At the moment when a user searches for a car the first three records are returned but when you click the next button or a numbered button the links take you to a page with no records. I've highlighted the area I believe the issue is surrounding. If anyone can help it would be much appreciated. Thanks! for some reason the code isn't highlighted switch ($_GET['classified_ad']) { default: echo "<div id=\"background1\"> <div id=\"background3\">"; echo "Search"; echo "</div>"; echo "<div id=\"background2\">"; echo "<form action=\"buy2.php?classified_ad=list&make=$getMake&model=$getModel\" method=\"post\">\n"; echo "<strong>Make</strong> \n<br />\n"; echo "<select name=\"make\"/> </select>\n<br />\n"; echo "<strong>Model</strong> \n<br />\n"; echo "<select name=\"model\"/> </select>\n<br />\n"; echo "<input type=\"submit\" name=\"submit\" value=\"Search\"/>\n"; echo "<input type=\"hidden\" name=\"search\" value=\"TRUE\"/>\n"; echo "</form>\n"; echo "</div> </div>\n"; break; case 'list': require_once ('mysql_connect2.php'); [color="#FF0000"][b] if (!empty($_POST['make'])) { $getMake = escape_data($_POST['make']); }else{ $getMake = FALSE; echo ''; } if (!empty($_POST['model'])) { $getModel = escape_data($_POST['model']); }else{ $getModel = FALSE; echo ''; } if ($getMake && $getModel){ $display = 3; if (isset($_GET['np'])) { $num_pages = $_GET['np']; }else{ $query = "SELECT COUNT(*) FROM classifieds WHERE make='$getMake' AND model='$getModel' ORDER BY ad_id ASC"; $result = mysql_query ($query); $row = mysql_fetch_array ($result, MYSQL_NUM); $num_records = $row[0]; if ($num_records > $display) { $num_pages = ceil ($num_records/$display); }else{ $num_pages = 1; } } if (isset($_GET['s'])) { $start = $_GET['s']; }else{ $start = 0; } if (isset($_GET['make']) && isset($_GET['model'])){ $query = "SELECT * FROM classifieds WHERE make='$getMake' AND model='$getModel' ORDER BY ad_id ASC LIMIT $start, $display"; $result = mysql_query ($query); $row = mysql_fetch_array ($result, MYSQL_ASSOC); echo "'$result'"; echo '<div id="background4"> <div id="background6">'; echo "{$row['make']} {$row['model']}"; echo '</div>';[/b] [/color] if ($row) { echo '<div id="background5">'; echo '<table>'; $description = nl2br($row['description']); echo "<tr><td><a href=\"buyer.php?classified_ad=car&id={$row['ad_id']}\" target=\"_self\">{$row['title']}</a></td></tr>"; echo "<tr><td>{$row['mileage']} miles</td></tr>"; echo "<tr><td><p>$description</p></td></tr>"; while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) { $description = nl2br($row['description']); echo "<tr><td><a href=\"buyer.php?classified_ad=car&id={$row['ad_id']}\" target=\"_self\">{$row['title']}</a></td></tr>"; echo "<tr><td>{$row['mileage']} miles</td></tr>"; echo "<tr><td><p>$description</p></td></tr>"; } mysql_free_result ($result); echo "</table>"; mysql_close(); [color="#FF0000"] [b]if ($num_pages > 1) { echo '<br /><p>'; $current_page = ($start/$display) + 1; if($current_page != 1) { echo '<a href="buy2.php?classified_ad=list&make=' . $getMake . '&model=' . $getModel . '&s=' . ($start - $display) . '&np=' . $num_pages . '">Previous</a> '; } for ($i = 1; $i <= $num_pages; $i++) { if ($i != $current_page) { echo '<a href="buy2.php?classified_ad=list&make=' . $getMake . '&model=' . $getModel . '&s=' . (($display * ($i - 1))) . '&np=' . $num_pages . '">' . $i . '</a> '; }else{ echo $i . ' '; } } if ($current_page != $num_pages) { echo '<a href="buy2.php?classified_ad=list&make=' . $getMake . '&model=' . $getModel . '&s=' . ($start + $display) . '&np=' . $num_pages . '">Next</a> '; } echo '</p>'; }[/b][/color] } else { echo "Nothing found"; } } echo "</div> </div>\n"; } break; case 'car': if (isset($_GET['id']) && is_numeric($_GET['id'])) { $class_id = $_GET['id']; require_once ('mysql_connect2.php'); $query = "SELECT * FROM classifieds WHERE ad_id='$class_id' LIMIT 1"; $result = mysql_query ($query); $row = mysql_fetch_array ($result, MYSQL_ASSOC); if ($row) { $description = nl2br($row['description']); echo "ADVERT"; echo "{$row['ad_id']}"; echo "$description"; }else{ } mysql_close(); }else { echo "nothing found"; } break; }
  14. You're a legend!
  15. Hey all, i'm building a car classified ad site using php, but at the moment I require some help with creating a dropdown list so that say for example in the make dropdown list the user selects peugeot, it would then only allow the user to select peugeot models from the model dropdown. so in dropdown box 1 you have: bmw peugoet mazda if peugeot is selected box 2 would then display: 106 206 306 etc Can anyone help with this please? Thanks, Mark.
  16. If there are no errors then it determines an absolute url by assigning it the values of http://, the domain name and the directory. So that it redirects the user....in this case to the same page once a user has logged in.
  17. I managed to fix the problem now. I believe it was a database error as I deleted the database and then built it again and it now works....strange. Now how would I go about setting permissions so that personal data is only accessible to the individuals who are logged in?
  18. Thanks Connetu_C, just tried it and still it is not working. I'm not too sure what the problem is as i've got this code working elsewhere just can't seem to get it working here in this directory. It's as if it isn't reading the data from the database or something.
  19. Sorry guys, completely bone idle of me due to rushing. I've edited my original post and hope someone can help. Thanks!
  20. Yes i'm using PHP and my login system is based on using cookies at the moment. That works fine, however I am having problems seperating what content users can access.
  21. Thanks for the reply. The only thing is that it is a bit of a learning project for myself so i'd rather build one from scratch. I've currently got the registration and login system sorted, however I need help with making the login system into individual user areas so that any user can only access their own details and adverts etc? Then i've just gotta work on the advert side and creating a search form for the cars, pretty sure I can handle most of the other parts.
  22. Hi all, i'm attempting to create my own car classified ad system from scratch using php but am slightly stuck at the moment. I've tried using google for help but it isn't much help at all for this kind of system and only offers systems that are already made. I need to make something where individual users can sign up, login and then create ads to sell their cars and upload them into the classifieds system which are then sorted via car manufacturer and model of car. So far i've built the registration system which works by inputting customer data into a database but am currently having problems with my login system recognising the email and password being used, it keeps saying that the email and password do not match those on file, however i've made sure the data is in the database....i'm puzzled The code i'm using is: if (isset($_POST['submitted'])) { require_once ('mysql_connect2.php'); $errors = array(); if (empty($_POST['email'])) { $errors[] = 'You forgot to enter your email address.'; } else { $eml = escape_data($_POST['email']); } if (empty($_POST['password'])) { $errors[] = 'You forgot to enter your password.'; } else { $pwd = escape_data($_POST['password']); } if (empty($errors)) { $query = "SELECT 'user_id', 'first_name' FROM 'users' WHERE 'email'='$eml' AND 'password'=SHA('$pwd')"; $result = @mysql_query ($query); $row = mysql_fetch_array ($result, MYSQL_NUM); if ($row) { setcookie ('user_id', $row[0], time()+3600, 'sites/carenthusiast/', '.markorral.co.uk', 0); setcookie ('first_name', $row[1], time()+3600, 'sites/carenthusiast/', '.markorral.co.uk', 0); $url = 'http://' . $_SERVER['www.markorral.co.uk'] . dirname($_SERVER['sites/carenthusiast/log.php']); if ((substr($url, -1) == '/') OR (substr($url, -1) == '\\')) { $url = substr ($url, 0, -1); } $url .= 'log.php'; header("Location: $url"); exit(); } else { $errors[] = 'The email address and password entered do not match those on file.'; //$errors[] = mysql_error() . '<br /><br />Query: ' . $query; } } mysql_close(); } else { $errors = NULL; } My login form looks like: <form id="login" action="log.php" method="post"> <p><label>Email</label> <input class="field" type="text" name="email" size="20" maxlength="20" /></p> <p><label>Password:</label> <input class="field" type="password" name="password" size="20" maxlength="20" /></p> <p><input class="button" type="submit" name="submit" value="Login" /></p> <p><input type="hidden" name="submitted" value="TRUE"/></p> </form>'; if (!empty($errors)) { echo '<h1>Error!</h1> <p>The following error(s) have occurred:<br />'; foreach ($errors as $msg){ echo " - $msg<br />\n"; } echo '</p><p>Please try again.</p>'; }
  23. Orral replied to Timmo's topic in Server Side
    Without seeing the code for both the form itself and the php file it's hard to tell. Would you be able to paste it up on here so we can check it out?! Thanks, Mark.
  24. Hi people, I was wondering if anyone has a solution for me. i've currently made a login which works with firefox but doesn't work with IE. It seems as though IE is not allowing the logged in page to read cookies or the logout page to send them. Perhaps something along those lines. i've set the cookies on the login page as: setcookie ('f_n', $row[0], time()+3600, '/', '', 0); setcookie ('l_n', $row[1], time()+3600, '/', '', 0); and i've set the logout cookies on the log out page as: setcookie ('f_n', '', time() - 3600, '/', '', 0); setcookie ('l_n', '', time() - 3600, '/', '', 0); now to my understanding the it should work as the log out cookie should overwrite the login one however, i've also tried changing the value to false or 0 same as the domain to false or 0 and even tried setting the time function to mktime back about a year or two. Nothing seems to be allowing it to delete the cookies though. So in internet explorer after you've logged out you can type the logged in extenstion into the brower and it allows you to access the page untill it expires in an hour. Would appreciate any help, cheers guys!

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.