39,326 Topics

Member Avatar for
Member Avatar for sam230

i have installed ssl on my server. i m just running payment part in https and rest of the website in http. when i try to use session variable from http to https. i got blank result, i think https destroy my session variables. i want to use session variable …

Member Avatar for Echo89
0
89
Member Avatar for dany12

Hello I was wondering how to create an array with all fields in a email form and then send the email <?php if(isset($_POST['submit']))//array{ $content=array( $name=strip_tags($_POST['name']); $email=strip_tags($_POST['email']); $phone=strip_tags($_POST['phone']); $address=strip_tags($_POST['address']); $city=strip_tags($_POST['city']); $title=strip_tags($_POST['subject']); $message=strip_tags($_POST['message']); ); } $to = "email@domain.com"; $subject =$title; $from = $name; $headers = "From:" . $from; mail($to,$subject,$content/*change array to string …

Member Avatar for priebd1
0
192
Member Avatar for vindom

Trying to redirect from inside an iframe ... that's the code: <?php include'file_constants.php'; $imgid = $_GET['id']; $con = mysql_connect($host, $user, $pass) or die("Can not connect to database: ".mysql_error()); mysql_select_db($db_name) or die("Can not select the database: ".mysql_error()); $sql = mysql_query("SELECT * FROM comments WHERE ImageID = '$imgid' ORDER BY Date DESC"); …

Member Avatar for vindom
0
3K
Member Avatar for divyakrishnan

Hi.. I want to hide/rewrite the URL of my php project. I found many forums regarding this. I have a doubt in .htaccess file. Is it need to create a new .htaccess inside my project folder ?

Member Avatar for divyakrishnan
0
2K
Member Avatar for Venom Rush

I have a url with parameters appended to it. I want to know if there's a way (similar to explode) that seperates a string based on a delimiter and makes the string on the left of the delimiter the key of an array and the string on the right of …

Member Avatar for Venom Rush
0
139
Member Avatar for rstandley31

well here it is crashing on line 76 and throwing the error in the Preg_match statement Why? Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in /home/content/73/9352073/html/includes.php on line 76 line 76 reads if(preg_match("index.php", $_SERVER[SCRIPT_NAME])) I cannot see a syntax error can you? Thanks Rob '

Member Avatar for pritaeas
0
199
Member Avatar for Buppy

Hi, I have a problem with strtotime displaying months. See the code: print(date('M-d')); //prints May-31 print(date('M-d',strtotime('-1 month'))); //prints May-01 Since i need it to get the previous month, why is the function ignoring the fact that there are 31 days in May? Thanks

Member Avatar for cereal
0
141
Member Avatar for riahc3

Hey When I try to interpret thru PHP, a Java web service that returns a boolean type, this error (more like a warning) pops up: Notice: Object of class stdClass could not be converted to int in C:\testing\page.php on line 29 How can I make the PHP page understand true …

Member Avatar for pritaeas
0
398
Member Avatar for tymaut

Hello I am working on a web page(php based). I want to put a `like` button, so that when a user clicks it, he is added to the likers list in my database.(like in the facebook). I wrote a php funtion to execute this database insertion, but since the event …

Member Avatar for IIM
0
320
Member Avatar for gotboots

Hi all, I have the following code to process through my requests, then use in a database. FIRST of all, I was wondering if i have it in the right order, and SECOND, if there are any other steps i could do to secure up my application. have a look, …

Member Avatar for veedeoo
0
258
Member Avatar for newbie1234

I am signin my lgoin page it will redirect to my home page. The probs is when i am pressing back button it will go to login page. Again come on home page by press forward button. Is there any method to stop all this things. means it should be …

Member Avatar for broj1
0
147
Member Avatar for divyakrishnan

I have a shared folder with images in a machine. How can I display images from that machine in a web page in another machine. I used the follwing code but obtained no output ** <?php $img_src="file://192.168.0.138/E:/img1/12/12N69/12N69$0001A1.JPG"; ?> <img src="<?php echo $img_src ?>" alt="" width="1000" height="220" id="myimg" />**

Member Avatar for vibhaJ
0
336
Member Avatar for Sanchixx

Hello, I am making a php comment box (without sql with a file where i post the comments) i'd like that the the time that the comment was posted be written along with the name of the person, but it gives me the current time, here is my php code. …

Member Avatar for Sanchixx
0
356
Member Avatar for kimmi_baby

I have the following code for a wordpress theme. For some reason an arrow appears on the page. I originally thought it was because of the thumbnail but once I removed the thumbnail it still appeared but in a different spot. What I'm aiming for is have the blog post …

Member Avatar for vibhaJ
0
170
Member Avatar for HasNor

Dear all, My database cannot accept uploading file when filename contain single quote " ' ". Then it show the error. For example my filename testuploads'.xls Got the error message Error, query failed : You have an error in your SQL syntax; check the manual that corresponds to your MySQL …

Member Avatar for vibhaJ
0
102
Member Avatar for newbie1234

In .php file i have $str = "I am in php file"; $str2; I want to copy specific amount of char in $str2. say suppose i want to copy " I am in" from $str. How to do? Is here any help???

Member Avatar for TitusShade17
0
115
Member Avatar for hwoarang69

it always goes to echo "failed;" and print error: Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\login_test\forgotpassword.php on line 49 failed $to = $email; $subject = "Forgot password"; $message = "Hi $firstname_db,\n Your …

Member Avatar for Transcendent
0
148
Member Avatar for riahc3

I have this code: <?php foreach ($_options as $_option) : ?> <input id="xyys" type="hidden" name="xyys" value="<?php echo($_option['value']);echo ($_option['option_id']);?>" /> <?php if($_option['label'] != 'Corte'): ?> <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?> <dt><?php echo $this->htmlEscape($_option['label']) ?></dt> <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?> <?php if (isset($_formatedOptionValue['full_view'])): ?> <div class="truncated_full_value"> <dl …

Member Avatar for McLaren
0
294
Member Avatar for PF2G

Hi, i trying to do a registration form (easiest thing ever) but i'm having trouble doing the validation :S <?php include 'db_connect.php'; ?> <html> <head> <title>Adminstração</title> </head> <body style="color=#FFFFFF" bgcolor="#666666"> <table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="1"> <tr> <form method="post" action=""> <td align="center" valign="middle"> <table width="300px" cellpadding="0" cellspacing="3" bgcolor="#FFFFFF" style=" …

Member Avatar for xShirowx
0
95
Member Avatar for monkeytherat

Hello forum! I was tinkering with a login script and I came accross the following error: Warning: mysql_result() expects parameter 1 to be resource, boolean given in /home/content/79/9398479/html/abyss/dio.php on line 60 //Code here: <?php $sqlError = 'We are experiencing very temporary downtime, please refresh or try again in 10 minutes.'; …

Member Avatar for dcdruck
0
878
Member Avatar for hwoarang69

i though i should try again.. i tring to display all the images of user who is loged in. my database called image: which has image_id user_id image(type long blob)(stores image here) image_full_name ---etc i have two files gallery.php where iam trying to display the images and it uses a …

Member Avatar for hwoarang69
-2
213
Member Avatar for Rizzuti

Hello there, I've got a search box that finds the item that I look for but it doesn't display the id number when i put the mouse cursor on top on the item. instead of showing the id number it shows the variable ($id). Any idea why this is not …

Member Avatar for junior_rosul
0
176
Member Avatar for didzmad

Hello there, I have been looking on the internet for the past week or so but no luck. I have come accross few bits and pieces but nothing that really worked or too much for what I am looking for. I am looking to have a Accordion Menu with 3 …

0
49
Member Avatar for veledrom

Hi, Code below is just to print a message. Nothing more. Question is: Whether we have the line `return $this->myname;` or not, it works fine but why some people still use `return` in such cases? Is it just a matter of taste or I'm missing something about OOP? Example below …

Member Avatar for veledrom
0
115
Member Avatar for my3h

Hi, I want to display my database records in <ul> <li> format. I have using a free template to design my front end. I am reading database data like this while ($row = mysql_fetch_assoc($result)) { $categoryname = $row['category_name']; } and within the loop i have to display records like this …

Member Avatar for my3h
0
150
Member Avatar for aristos32

Hi all. I have the following problem: I read this string from an XML file: "User Name ={$username}" and then store it in a local variable $test. I read this in a function, where I have a local variable $username. However the variable inside the string is not interpreted to …

Member Avatar for aristos32
0
205
Member Avatar for jersie03

Good day everyone, I want to know how to send email to outlook in php after signing up please give some example and discuss it to me clearly thanks very much .. :*

Member Avatar for jersie03
0
3K
Member Avatar for HasNor

Dear experties, Actually I don't know how to specify what I'm trying to do. I only tell you thru this figure. I don't know how to come out report by this way. How can I do? What kind of method to get report like this in a table? Please help …

Member Avatar for HasNor
0
135
Member Avatar for persianprez

So I have a text file that has 4 items in each line. I would like to store these into an array. So this is an example of how they are stored: imgur.com | link.com | 60 | 468 Thanks in advance

Member Avatar for madCoder
0
119
Member Avatar for KeithMon

I'm using PHP code from: [DetectMobileBrowsers.mobi](http://detectmobilebrowsers.mobi/) to redirect mobile users to a mobile site. I've got this code at the top of my page but I'm not experiencing any redirects. include('mobile_device_detect.php'); mobile_device_detect(true,true,true,true,'http://mydomain.com/mobile.php','http://mydomain.com/index.php'); I don't want to include the code from the website mentioned above because I believe it's copyright. Is …

Member Avatar for KeithMon
0
173

The End.