Member Avatar

Hey! Having some more fun with htaccess again! - I have tired everyhting and cant get it to play... Below is my code: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{REQUEST_URI} !(/$|\.) RewriteRule (.*) %{REQUEST_URI}/ [R=301,L] RewriteBase /v2/ RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f # Admin Pages RewriteRule ^admin/$ admin/index.php [NC,L,QSA] RewriteRule ^admin/([a-z0-9\-]+)/$ admin/$1.php [NC,L,QSA] # Super Admin Pages RewriteRule ^master/$ master/index.php [NC,L,QSA] RewriteRule ^master/([a-z0-9\-]+)/$ master/$1.php [NC,L,QSA] # If none just normal page RewriteRule ^([a-z0-9\-]+)/?$ users/$1.php [NC,L,QSA] ` https://domain.com/ - should load users/index.php https://domain.com/login/ (or any /XXX/) - should load users/$1.php https://domain.com/master/ - should load master/index.php https://domain.com/master/xxx/ …

Member Avatar
+0 forum 1
Member Avatar

Hi I have this script to show items in the database. but it is not showing the results. Pls can anyone help? <html> <div><br/><center><h2><font face="Lucida Handwriting" size="+1" color="#00CCFF">Casual Shirts</font></h2></center></div> <div style="width:100%;float:left" > <?php include("config.php"); $dress=$_REQUEST['dress']; $catg=$_REQUEST['catg']; $subcatg=$_REQUEST['subcatg']; $sel=mysqli_query($conn,"select * from items where catg='$catg' and subcatg='$subcatg'"); echo"<form method='post'><table border='0' align='center'><tr>"; $n=1; while($arr=mysqli_fetch_array($sel)) { $i=$arr['itemno']; if($n%4==0) { echo "<tr>"; } echo " <td height='280' width='240' align='center'><img src='admin/itempics/$i.jpg' height='200' width='200'><br/> <b>Item No:</b>".$arr['itemno']. "<br><b>Price:</b>Rs&nbsp;".$arr['price']. "<br><b>Description:</b>".$arr['desc']." <br><br><a href='index.php?con=12 & itemno=$i'><img src='images/MetalPlakDa5new.gif' width='70' height='20'/></a> <a href='index.php?con=14 & itemno=$i'><img src='images/view7.jpg' width='70' height='20'/></a> </td>"; $n++; } echo "</tr></table> </form>"; ?> <div><br> <marquee behavior="scroll" dir="ltr" align="absbottom"><img src="usepics/logo5.jpg" width="100" height="70"/> …

Member Avatar
+0 forum 1
Member Avatar

How important is Unit Testing taken by employers, is it something that every developer should have as one of their skills, do some jobs require it more than others or is a simple test like handing out a piece of software to be used by friends family etc sufficient enough.

Member Avatar
+0 forum 5
Member Avatar

this is my script but cannot connect. errot message error . user root has no password. I have created databse using phpmyadmin Warning: mysqli_connect(): (HY000/1049): Unknown database 'shop' in C:\wamp64\www\online_shopping\admin\index.php on line 4 pls help <?php //error_reporting(1); //include("config.php"); $conn=mysqli_connect("localhost","root","", "shop") or die(mysqli_error()); extract($_REQUEST); if($_REQUEST['sub']) { $name=$_REQUEST['t1']; $pass=$_REQUEST['p1']; $sel=mysqli_query($conn,"select name, pass from details where name='$name '"); $arr=mysqli_fetch_array($sel); if($arr['name']==$name and $arr['pass']==$pass) { session_start(); $_SESSION['eid']=$name; header("location:home.php"); } else { $er="name and password do not match"; } } ?>

Member Avatar
+0 forum 2
Member Avatar

Hello, I need some help from experts. I am testing a site I have created. I have an issue with login system. It worked fine using XAMPP on my computer but when I uploaded to a live server, login has been a problem. This is what I get when I try to login. "The page isn’t redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. This problem can sometimes be caused by disabling or refusing to accept cookies." The login script is below <?php if(isset($_POST['login-submit'])){ include 'dbh.inc.php'; …

Member Avatar
+0 forum 3
Member Avatar

I have three tables(table, table2,table3). From table1 i want to return three rows: Title, Desc,time,'products' AS type From table2 i want to return three rows: group_title, group_desc, created,'groups' AS type From table3 i want to return three rows: name, occupation,birth,'users' AS type $sql = "SELECT DISTINCT * FROM (SELECT table1.title, table1.desc, table1.time,'products' AS type FROM table1 ORDER BY rand() LIMIT 5) AS T UNION ALL (SELECT table2.group_name,table2.group_desc,table2.created,'groups' AS type FROM tabl2 JOIN table1 ON table2.id = table1.id ORDER BY rand() LIMIT 5) UNION ALL (SELECT table3.name,table3.occupation,table3.birth,'users' AS type FROM table3 JOIN table1 ON table3.id = table1.id ORDER BY rand() LIMIT …

Member Avatar
+1 forum 5
Member Avatar

Hi all at Daniweb, I'm quite new to PHP and I'm banging my head over this... query 1 WORKS: **$query = "CALL procedure_is_a_great_way_to_let_db_do_some_work('1','6')";** //both 1 and 6 are IN parameters! query 2 DOESN'T WORK: $id_pictures = 1; $id_names = 6; **$query = "CALL procedure_is_a_great_way_to_let_db_do_some_work('".$id_pictures."','".$id_names."')";** //both 1 and 6 are IN parameters!

Member Avatar
-1 forum 2
Member Avatar

I am developed a custom PHP page with filters, addto cart module, music playlist everything. How can i implement it into WordPress? I am a newbie, any help thanks. My custom PHP work directory structure : location : public_html/my_work website URL : website.com/my_work Everything working good, but my wordpress heaer and footer missing, thats what i am asking to how to implement my custom development multiple PHP page work into Wordpress.

Member Avatar
+0 forum 1
Member Avatar

I am trying to add Jquery validation to the comments page in WordPress. Everything works except it won't post the fields. May someone help? FUNCTIONS PAGE function comment_validation_init() { if(is_single() && comments_open() ) { ?> <script type="text/javascript"> jQuery(document).ready(function() { jQuery('#commentform').bootstrapValidator({ message: 'This value is not valid', feedbackIcons: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, fields: { author: { validators: { notEmpty: { message: 'Please Enter Your Name' } } }, email: { validators: { notEmpty: { message: 'Please Enter Your Email' }, emailAddress: { message: 'This Is Not A Valid Email Address' } } }, comment: …

Member Avatar
+0 forum 2
Member Avatar

Hi, I have been trying to code an timetable which allows timeslots to be booked. What I am finding difficult is the schedule settings. So three things, "schedule settings", "find common slots" and "make booking". The "find common slots" and "make booking" seems to almost work. But "schedule settings" is more difficult. The idea: The timetable is a typical one with days of the week on the top and hours of the day on the left side. Ofcourse bookings should be possible by choosing month and year also. There are three paricipants. Two of these have a schedule. The third …

Member Avatar
-1 forum 10
Member Avatar

Hi, I need advice on how to implement a Review Management System. Something like realized on mypresences.com or brightlocal.com Not all services allow you to interact with their API. Review services are productreviews, trustpilot, tripadvisor, whirlpool, wordifmouth, seek, indeed, glassdoor. Maybe you now a script or have an offer how it can be realize. Help me, please.

Member Avatar
+1 forum 1
Member Avatar

Hello, I'm quite nub in web development, so be gentle please. If this place is wrong for such problems point me to a more appropriate resource please. To became more familiar with web-programming I found good (as I thought) area for self-improvement. One of my friends owns web project. This project was developed during last 15 years with one programmer who seems to be slightly tired and probably is needed for backup. I've tried (for the very beginning) copy all stuff to the new development environment and found that project consists of several tens of sites: site1.domain.name, site2.domain.name, etc. So …

Member Avatar
+0 forum 2
Member Avatar

Really hoping someone can help me out or point me in the right direction. This is my first ever post in a coding forum so I apologize in advance if I’m breaking any forum rules. I already have a bunch of php code sorted from modifying web resources. I need help altering it further to help me accomplish my goals. Below I’ve included my code, along with screenshots of the code executed in a browser and my MySQL database table. Background: I’m a professional musician but I have extremely basic computer programming knowledge. Nothing formal.. I use google, YouTube, Forums, …

Member Avatar
+0 forum 2
Member Avatar

$query = "SELECT COUNT (*) AS spo FROM NAME_TABEL WHERE BEFORE_OURCE_OBAT = '1' AND ROOM = 'ORCHID' AND MONTH (DATE) = '$ month' "; $row = sqlsrv_query($conn, $query); $data = sqlsrv_fetch_array($row); $spo = $data['spo']; ?> why an error appears after the program is run, please help ? Warning: sqlsrv_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\siimut\name_tabel.php on line 140

Member Avatar
+0 forum 2
Member Avatar

Hello. I am using a lightbox form with a drop-down list. When I choose a value from the dropdown list, I want it to be assigned to a php variable which I will then use to update the total price of the form (the total price is already defined in the form). Here is the link to the relevant page: https://mobilitypro.eu/course/e-learning-blended-learning-and-introduction-to-web-designing/ . When the user clicks Book Now, the lightbox form appears. The problem is with the dropdown list "Select package": when an option is selected, I cannot pass its numerical value to a php variable (before submitting the form). …

Member Avatar
+0 forum 1
Member Avatar

<?php include 'connect.php'; $output = ''; if(isset($_POST["export"])) { $query = "SELECT * FROM order_details"; $result = mysqli_query($conn, $query); if(mysqli_num_rows($result) > 0) { $output .= ' <table class="table" bordered="1"> <tr> <th>MAIN BILLING NO</th> <th>ORDER TYPE</th> <th>ORDER NO</th> <th>DATE/TIME</th> <th>PORTING</th> <th>SWITCH PREFIX</th> <th>LCP</th> <th>LCPCUPID</th> <th>RH</th> <th>RH CUPID</th> <th>PORT DATE</th> <th>PORT TIME</th> <th>ASSOCIATED NUMBER</th> <th>POST CODE</th> <th>DDI START</th> <th>DDI END</th> <th>NOTE</th> </tr> '; while($row = mysqli_fetch_array($result)) { $output .= ' <tr> <td>'.$row["bill_no"].'</td> <td>'.$row["order_type"].'</td> <td>'.$row["orderno"].'</td> <td>'.$row["date"].'</td> <td>'.$row["porting"].'</td> <td>'.$row["prefix"].'</td> <td>'.$row["lcp"].'</td> <td>'.$row["lcp_cupid"].'</td> <td>'.$row["rh"].'</td> <td>'.$row["rh_cupid"].'</td> <td>'.$row["port_date"].'</td> <td>'.$row["port_time"].'</td> <td>'.$row["asso_no"].'</td> <td>'.$row["post_code"].'</td> <td>'.$row["start"].'</td> <td>'.$row["end"].'</td> <td>'.$row["note"].'</td> </tr> '; } $output .= '</table>'; header("Content-type: application/vnd.ms-excel; name='excel'"); header("Content-Disposition: attachment; filename=exportfile.xls"); header("Pragma: no-cache"); header("Expires: …

Member Avatar
+0 forum 1
Member Avatar

I am using magento for sending mail with condition, My code: <?php class Gta_MerchantNotification_Model_Observer { public function merchantremainder($Observer) { $order = $Observer->getEvent()->getOrder(); $order_details = $order->getAllVisibleItems(); $itemData = array(); foreach ($order_details as $list) { $incrementid = $order->getIncrementId(); $sku = $list->getsku(); $name = $list->getName(); $price = $list->getPrice(); $Qty = $list->getQtyOrdered(); $extra = $order->getIncrementId(); $message = " <tr> <!-- <td>$incrementid</td> --> <td>$sku</td> <td>$name</td> <td>$price</td> <td>$Qty</td> </tr>"; $itemData[$list->getId()] = $message; } $finalMessage = " <p>Order Id : $incrementid</p> <table border='1'> <tr> <!-- <th>Id</th> --> <th>Sku</th> <th>Product name</th> <th>Price</th> <th>Qty Ordered</th> </tr>"; if (!empty($itemData)) { foreach ($itemData as $data) { $finalMessage .= $data; } $finalMessage …

Member Avatar
+0 forum 2
Member Avatar

This is a partial of the code I have on my script. I have tried to make the backgrounds change color depending on the values and can't get it to read the arrays correct. Placing the conditions outside the while or inside the while returns same results when printed. If the value is 100, the color should be RED If the value is above 49, the color will be yellow If the value is 0 to 49, the color will be green Will appreciate if someone would find how the BILLED_TO_DATE_PERCENTAGE would change depending on number range when SQL read …

Member Avatar
+0 forum 1
Member Avatar

I need to add a name to a Telephone number which appears on the sceen on the phone in replace of the phone number any suggestions?

Member Avatar
-1 forum 3
Member Avatar

<?php include 'ProcessDAO.php'; $dest=""; if(isset($_POST['login'])){ session_start(); // i get an error in this line !! $_SESSION['status']='online'; $_SESSION['breadcrumb']='home'; $pro = new ProcessDAO(); $dest = $pro->LogIn($_POST['username'],$_POST['password']); }else{ session_start(); $dest ="Location: ../index.php"; session_destroy(); } header($dest); ?> guyss can you help me out because in my Login.PHP file when i login i always get this error . >** Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\IPMS\process\ProcessDAO.php:1) in C:\xampp\htdocs\IPMS\process\login.php on line 5**

Member Avatar
+0 forum 8
Member Avatar

hi everyone. can you help me to check why this error occur and how to fix it? when i want to insert the data, this error is coming out and data not insert into database. <?php define('DB_SERVER','localhost'); define('DB_USER','root'); define('DB_PASS' ,'root123'); define('DB_NAME', 'ems'); $con = mysqli_connect(DB_SERVER,DB_USER,DB_PASS,DB_NAME); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } //code for visitor registration if (isset($_POST['register'])) { $vname = $_POST['ems_visitor_name']; $vage = $_POST['ems_visitor_age']; $vgender = $_POST['ems_visitor_gender']; $vmaritalstat = $_POST['ems_visitor_maritalstatus']; $vnationality = $_POST['ems_visitor_nationality']; $vcontactnum = $_POST['ems_visitor_phonenumber']; $vemailadd = $_POST['ems_visitor_email']; $msg=mysqli_query($con,"insert into ems_visitor(ems_visitor_name,ems_visitor_age,ems_visitor_gender,ems_visitor_maritalstatus,ems_visitor_nationality,ems_status_phonenumber,ems_status_email) values('$vname','$vage','$vgender','$vmaritalstat','$vnationality','$vcontactnum','$vemailadd')"); if($msg) { echo "<script>alert('Visitor register successfully');</script>"; } …

Member Avatar
+0 forum 1
Member Avatar

I hav a syntax error in While <?php $query = "SELECT * FROM users"; $sql = mysqli_query($link, "SELECT * FROM users img_file WHERE id='$id' "); $_SESSION['id'] = $id; $result=mysqli_query($link, "SELECT * FROM `textArea` WHERE id='$id'"); // запрос на выборку $result = mysqli_query($link, $query) or die(mysqli_error($link)); function get_text($id) { $singles = mysqli_query($link, "SELECT * FROM users WHERE id='$id'"); foreach ($singles as $single) { return $single; } } while($row=mysqli_fetch_assoc($result)) { if(!empty($row['textArea'])) echo '<div class="media mb-4 p-4 status-content">' . // This while syntax error while ($row = mysqli_fetch_assoc ($sql)) { if (!$row['img_file']) { echo '<img class="mr-5 avatar" src="https://themes.3rdwavemedia.com/instance/bs4/assets/images/profile.jpg"/>'; } else { echo "<img …

Member Avatar
+0 forum 3
Member Avatar

Hi i am trying to view my blog or post in detail description at that time my browser title shows %page_title%, But it has to show my blog or post title in that place. please help me to solve this issue. My permalink settings as below /%category%/%postname%/ Note: i have attached a screen below for reference. ![27c5c942f9f63247e0b06405f4108a36.jpg](/attachments/large/4/c1425ec4428411c4dc083670938d1f1d.jpg)

Member Avatar
+0 forum 3
Member Avatar

I let users earn money through my site, and I want to record their daily earnings. I want to record their earnings starting from 00:01am I don't know how to do this using PHP and MySQL. I know how to create, update, etc database. But I am streuggling with PHP time. I don't know how to create a database row for each user at the start of the day and then update their earnings until the end of the day. Here is what I have come up with ... <?php $time = '00:01'; $day = 11; $month = 3; $year …

Member Avatar
+0 forum 5
Member Avatar

I am trying to set up a json object.array to retrieve the data from this mysql query. the data required is posted from java and that seems to work fine, but I get parsing errors. I tried testing the php file and I get the "Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\GetVerse.php on line 8" . previously I had a ';' at the end of the sql query and it said unexpected ';' at the end of line 7. now it i get the error message for line 8: $row = mysql_fetch_array($result); . What seems to be the problem? …

Member Avatar
+0 forum 11
Member Avatar

My site use to work fine. But today for some reason pages with mysqli_num_rows takes a very long time to load. I can visit the page but it takes a long time to load. When it loads there are no errors but the error file in the root directory have the following error: Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given There is no problem with my internet connection because other pages load fast and do not send reports to the error file. This is my first time encountring this problem. Here is the code for the error …

Member Avatar
+0 forum 1
Member Avatar

Now as the automated cms are coming in power for eg. wordpress. Is it leading to ending of web development career.?

Member Avatar
+4 forum 7
Member Avatar

Hello, I am new to this site and to php and mySQL...and I need some help. I know this topic is all over the web but after a couple of days of looking and refering to several text books it still doesn't work so please bear with me. I have created a web page with an associated mySQL database for our local women's golf club. I am trying to create a routine that will allow active members to get a web page displaying a listing of other members who live near them (in the same city/town). I have created a …

Member Avatar
+0 forum 2
Member Avatar

hi hope you are all fine. When user login in my web site the table update in database that the user is online and when they click on logout the table updated in database that the user is offline, it working fine but the problem is that when user login and close the browser without logout their account and my table show that the user is online but i want that when user close the broswer withot logout their account the table updated that this user is now offline tell me how can i do this. <script type="text/javascript"> function update(){ …

Member Avatar
+1 forum 7
Member Avatar

Hi all, this is my first post and would appreciate some insight as to where im going wrong. I have the following form that successfully registers a new user to my mysqsl database via PHP - with the following $sql INSERT Function The problem im having is sending the activation \ confirmation email to the new users email address. [code] //email function ini_set("SMTP", "smtp.server.com");//confirm smtp $to=$email; // Your subject $subject="activation required"; // From $header="from: test email <Test@test.com>"; // Your message $message="Your Comfirmation link\r\n"; $message.="Click on this link to activate your account\r\n"; $message.="You can not login to your new account until …

Member Avatar
+0 forum 8

The End.