39,316 Topics

Member Avatar for
Member Avatar for pocix

in index.php i have 3 urls <li><a href="categories.php">Categories</a></li> <li><a href="Register.php">Register</a></li> <li><a href="login.php">Login</a></li> how do i change the text when i login, the "Register" will change into "Control Panel" and "Login" will become "Logout"? when i click logout, the control panel & logout will change back to register & login

Member Avatar for pocix
0
342
Member Avatar for Djmann1013

Hi I am having trouble with this code: <?php //init.inc.php file session_start(); mysql_connect('mysql.host.com', 'username', 'password'); mysql_select_db('DB name'); include('include'); // Get users from table function fetch_users() { $result = mysql_query('SELECT 'user_id' AS 'id', 'user_username' AS 'username' FROM profile'); // Error on this line: Parse error: syntax error, unexpected T_STRING on line …

Member Avatar for phorce
0
87
Member Avatar for writerervin

Hi there. I'm looking to create a textbased browser game based on my old favorite anime. I figured out the basic structure of the data, but i've got one problem. is there a way to set the data up where a single user can have several of one item, each …

Member Avatar for 8g2h8bt9
0
215
Member Avatar for shhh

Fatal error: Class 'XSLTProcessor' not found in C:\xampp\htdocs\easybasket\index.php on line 275 ` <?php /*########################################################################### Easybasket RESTful API Nigel Alderton 21st May 2011 www.easybasket.co.uk ############################################################################# This file exposes a RESTful HTTP interface to the client. It supports the following functionality; HTTP Method: GET Example Response ================= =============== ================================================================== / The Welcome …

Member Avatar for blocblue
0
233
Member Avatar for viktor.jiracek.5

Hello all, I am currently trying to insert a 0 value into a single field. The value is originally set to 1 and I would like to set it to its default value of 0. How would I go about doing that? The code I have works for other things, …

Member Avatar for diafol
0
127
Member Avatar for Danny159

Hey guys, I am having some trouble with json_decode... I used json_encode to encode a string that is the following: {"id":"121","firm":"DSD","address":"Test","address2":"Test","city":"Test","region":"Test","postcode":"Test","countryid":"13","firmtype":"Marketing","phone":"01545454587","fax":"","email":"dan@test.com","url":"http://www.test.com","mainuser":"Dan","contacts":"dan@test.com","info":"","numstaff":"15","numoffices":"1","disc":"","cat":"{"35":"1"}"} And I am using this php code to try and get it back into an array... however its just not working... the print_r(); doesnt echo anything out at all... …

Member Avatar for Danny159
0
193
Member Avatar for bsewell

Hi, I have a website, where I want all pages to be secure using https:// , but I want a folder to be ignored so the files in that folder will be using regular http:// . Eg, http://wwww.example/com/admin but the rest will be https://www.example/com/page1 , https://www.example.com/page2 etc. I have htaccess …

Member Avatar for blocblue
0
89
Member Avatar for Sanchixx
Member Avatar for kutchbhi

I am trying to connect and fetch messages of my hosting's email address using imap_open(), but its throwing errors. $server = '{mail.booksnearby.in:143/imap/ssl/novalidate-cert}INBOX'; $imap_connection = imap_open($server, $login, $password); $mailboxinfo = imap_mailboxmsginfo($imap_connection); $messageCount = $mailboxinfo->Nmsgs; The above throws this error: Array ( [0] => Retrying PLAIN authentication after [AUTHENTICATIONFAILED] Authentication failed. If …

Member Avatar for blocblue
1
846
Member Avatar for rpv_sen

Hi Friends i like to know more about the difference between mysql, Phpmyadmin, sql and also which one is more safe and secure for webpage. Can any one help me to know about it.

Member Avatar for pritaeas
0
1K
Member Avatar for ska_defender

Hello I want to have 4 files index.php go1.php go2.php admin.php in admin.php I want a switch command to switch between go1.php and go2.php for example in admin.php there must be two buttons go1 and go2 when I click on go1 index.php will behave as go1.php and when I click …

Member Avatar for ska_defender
0
222
Member Avatar for anita.kcx

In-spite of going through all the resources about rewriting URL, I am not able to successfully apply the same to my site. The URl is www.mysite.com/Client/?clientname=name I want it to be www.mysite.com/Client/name Client is another directory inside the root directory. Currently I have RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} Client/ [NC] …

Member Avatar for blocblue
0
124
Member Avatar for viktor.jiracek.5

Hello all, I am having problems with this code. Whenever I attempt to test the login system with a valid username and password, it says this: You have successfully logged in! Warning: Cannot modify header information - headers already sent by (output started at /Applications/XAMPP/xamppfiles/htdocs/ucairwebsite/facultykadrmas/kadrmaspages/login_1/login_LDDB.php:1) in /Applications/XAMPP/xamppfiles/htdocs/ucairwebsite/facultykadrmas/kadrmaspages/login_1/login_LDDB.php on line 213 …

Member Avatar for puneet bassi
0
271
Member Avatar for carol.cable.37

<?php $first = $_POST['first']; $last = $_POST['last']; $email = $_POST['email']; $phone = $_POST['phone']; $Submit = $_POST['Submit']; $first = strtolower($first); $last = strtolower($last); $first=ucfirst($first); $last=ucfirst($last); $general = " <br> Please try again ! "; $no_first = " your first name, please... "; $no_last = " your last name, please..... "; $no_phone …

Member Avatar for blocblue
0
314
Member Avatar for aruti

Hello, I Need a TCP / IP Port Listener on my centos VPS Hosting to receive gps tracker signals on ports and store in mysql db. For further processing of received stored data, we are working on a php mysql application, but to listen to port signals, which programming language …

Member Avatar for sharath.mohan.12
0
787
Member Avatar for shhh

whenever i put this code theyre will be an Error stating that there is unexpected ''"" Please help <input type="button" value="Add to Cart" onclick="addtocart(<?=$row['serial']?>)" />

Member Avatar for minitauros
-1
79
Member Avatar for ecinevenice

hey does anyone here knows how to change excel page orientation to portrait? i get landscape as default <?php header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=transactions.xls"); header("Pragma: no-cache"); header("Expires: 0"); ?>

Member Avatar for blocblue
0
176
Member Avatar for natehome

im working on a single player game in java and want to add a high scores table. what im thinking is when a player finishes a session my script will contact my server like this "mywebsite.com/sethighscore.php?secretkey=23234234&user=bob&itemscollected=45&timeplayed=1hour" <-- this would add a new user to database i have very little knowledge …

Member Avatar for veedeoo
0
172
Member Avatar for cali_dotcom

Hi guys, i have an application that seats on a single webserver that depends on a third party application running mssql, so i use mssql over free tds. now i have to scale this site so i have to think about how to handle the sessions. i ma basically looking …

Member Avatar for pritaeas
0
296
Member Avatar for joshmac

I want to convert my MVC framework to conform to the PSR-0 standards, but I am having a devil of a time trying to wrap my head around namespaces and how it works. I am using the suggested [SplClassLoader](https://gist.github.com/221634) class. Below is my file structure, and what I am trying …

Member Avatar for pritaeas
0
208
Member Avatar for zenp

Hi I am trying to run this code for long but failed.Can anyone help me? 1. <?php 2. $button_text=$_POST['button_text']; 3. $color=$_POST['color']; 4. 5. if(empty($button_text)||empty($color)) 6. { 7. echo 'Could not create image - form not filled out correctly'; 8. exit; 9. } 10. $imgname="I:\xampp\htdocs\test\button\"; 11. $im=imagecreatefrompng('$imgname'.$color.'-button.png'); 12. $width_image=imagesx($im); 13. $height_image=imagesx($im); …

Member Avatar for pritaeas
0
208
Member Avatar for LuxNova_1

Hello! I'm crazy new at PHP and I'm having problems with recieving all the info from the drop down portion of my form in the email submitted from php. The code for the HTML portion is: <label for="birthday">Birthday</label> <select name="Month" value="option"> <option value="January">January</option> <option value="February">February</option> </select> <select name="Day" value="option"> <option …

Member Avatar for Zagga
0
255
Member Avatar for LastMitch

Hi, I'm trying to understand how **HMAC Verification** works in general (big picture). I want learn and understand how this equation works. Writing the script it a bit hard too. I know that **HMAC Verification** can prevent people from tampering with variables passed in the URL. Here is the formula …

Member Avatar for LastMitch
0
108
Member Avatar for LastMitch

Hi, It's really late now, I am trying to figure out how to echo a message when I submit a form. Here is the code: <?php $msg = ""; if ($_POST['title'] != ""){ $title = $_POST['title']; $author = $_POST['author']; $author = stripslashes($author); if (!$title){ $msg = "Please Add Title"; } …

Member Avatar for LastMitch
0
213
Member Avatar for mehmatt

hello all, i have a website like forum not exactly forum but similar. honestly, i bought it cos i didnt have any idea for php. but something about linking is not as i want. for example: when i link some webpage it shows the link [Click Here](http://www.aaa.com) but i want …

Member Avatar for diafol
0
223
Member Avatar for rajeshgoblet

hello i am working on a c,c++,java tutorial website, & i want to insert lots of source code example in it. I am doing this using <span> & CSS classes. I have seen some online code highlighter. i want to make one for my site. And is there any other …

Member Avatar for Dani
0
113
Member Avatar for shhh

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\dl\cart\includes\functions.php on line 37 There was an error with your order! function get_order_total(){ $cnt = array(); $products = array(); foreach($_POST as $key=>$value) { $key=(int)str_replace('_cnt','',$key); $products[]=$key; $cnt[$key]=$value; } $result = mysql_query("SELECT * FROM shop WHERE id IN(".join($products,',').")"); if(!mysql_num_rows($result)) { echo …

Member Avatar for Kieran Y5
0
155
Member Avatar for naru vaishnaw

this mail system is working in my local domain(S.K@ r.j.com).i want to send mail to S.K@ j.com. please help me to how to configure mail system . <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("users", $con); $sql="INSERT INTO entryform (Name,Department, Problem, Ext_no, Ip_Add, …

Member Avatar for pritaeas
0
154
Member Avatar for tigersaver

I would like to have a cron job for my web host to take all files in a given directory and create a sub directory with the folder name as the date of the files in the directory and move all files for that date to this sub folder. Sounds …

Member Avatar for pritaeas
0
296
Member Avatar for weirdCreature7

Please help im a super beginner in php and I am doing this for my homework :) I just want to add a code that will Deny Access if password is wrong 3 times and the code for my alert box which is the Incorrect username and password is not …

Member Avatar for devianleong
0
298

The End.