39,326 Topics

Member Avatar for
Member Avatar for AndreRet

Stuck again... :) I am returning close to 60 records from a search in mysql. I want to add these records to a select box. When I am looping through the records, it adds a select box for each record. Not sure where I am going wrong. It does load …

Member Avatar for AndreRet
0
275
Member Avatar for rotten69

Hey guys, I don't see anything wrong in the function but mysql_result is complaining about the parameter value passed to it. function question_exists($question_id){ $question_id = (int)$question_id; return ( mysql_result(mysql_query("SELECT COUNT('id') from `posts` WHERE `id`=$question_id"),0) == 0) ? false : true; // if the question doesn't exist (equal to ZERO) then …

Member Avatar for rotten69
0
130
Member Avatar for moha_1990

<?php session_start(); if(isset($_SESSION['idAdmin'])){ include("config.php"); $id = $_SESSION['id']; $query = mysql_query("SELECT * FROM register WHERE id = '$id'") or die (mysql_error ()); ?> <!DOCTYPE html> <link rel="stylesheet" type="text/css" href="styles.css" /> <html lang="en"> <head> <title></title> <meta charset="utf-8"> <link rel="stylesheet" href="css/reset.css" type="text/css" media="all"> <link rel="stylesheet" href="css/layout.css" type="text/css" media="all"> <link rel="stylesheet" href="css/style.css" type="text/css" media="all"> …

Member Avatar for leviathan185
0
222
Member Avatar for <M/>

Hi, I wrote a php form and when I look at the confirmation email.... 2 things happen. 1. My logo dipslays as a link... I want it to be an image... 2. All the html tags display with the content that is meant to show... I don't want to see …

Member Avatar for Zagga
0
306
Member Avatar for bilal.saim

<?php $tipi = array("asd","222","dda","xcs"); $gun = array("qwe","vvv","zzz","bffg"); $ay = array("asd","bbb","23a","wqe"); $yil=array("zzz","sad","cxc","zxca"); $say=0 ?> <script> var tipi = new Array(); var gun = new Array(); var ay = new Array(); var yil = new Array(); for(var j=0;j<4;j++) { tipi[j] = " <?php echo "$tipi[$say]" ?> "; gun[j] = " <?php echo …

Member Avatar for bilal.saim
0
240
Member Avatar for mbhanley

I am trying to configure a menu for my CMS I want to be able to use Nested Sortables just like you have in WordPress. The problem Im having is getting my head around how I am going to start I already have a column in my database table called …

Member Avatar for mbhanley
0
721
Member Avatar for Rizi004

Hi I want to find friends on facebook from other websites. How i can find the facebook friends, i have read https://developers.facebook.com/docs/reference/api/ this but can't find the solution plz help me, tell me how i can find the facebook friends. Waiting for your reply Thanks

Member Avatar for LastMitch
0
52
Member Avatar for LastMitch

Hi I'm bit stuck on how to put a period in array. This is my example: <pre> <?php $str = 'I like to eat Strawberry Cheesecake.'; $words = preg_split('@([\W]+)@', $str); var_dump($words); ?> </pre> This is how it's `var_dump()`: array(7) { [0]=> string(1) "I" [1]=> string(4) "like" [2]=> string(2) "to" [3]=> …

Member Avatar for LastMitch
0
262
Member Avatar for FakeTales

I am able to set up a connection via client to server , however i am trying to write to a textfile the variables from a form this form is then sent to the server it is opened up then i exploded the data within the text file , place …

Member Avatar for FakeTales
0
326
Member Avatar for bilal.saim

<?php $say=0 ?> <script> for(var j=0;j<limit;j++) { tipi[j] = " <?php echo "$tipi[$say]" ?> "; gun[j] = " <?php echo "$gun[$say]" ?> "; ay[j] = " <?php echo "$ay[$say]" ?> "; yil[j] = " <?php echo "$yil[$say]" ?> "; <?php $say++; ?> } <script/> //I want to increase $say in …

Member Avatar for diafol
0
180
Member Avatar for <M/>

I am trying to add a feature into my webform that allows users to recieve text messages that confirm their web form submission... and I am kind of lost in doing so... Can someone guide me... I wasn't sucessful with google for the heads up....

Member Avatar for diafol
0
127
Member Avatar for AndreRet

I am totally stuck here and found tens of samples on posting to get and set values. What I am trying to do is - 1) Let a user enter a vehicles year model into a textbox in my form (set to post) 2) I then need to get this …

Member Avatar for AndreRet
0
224
Member Avatar for monkeybut

I recently moved one of my sites to a Red Hat server with MySQL 5.0.22 from a Windows XP server with MySQL 5.5.25a. Now whenever I try to log into the site it will not start the session, but it will work on my Windows machine. Is there a difference …

Member Avatar for monkeybut
0
88
Member Avatar for randomkid73

I'm having an issue accessing values of an AJAX response from a PHP script. I'm using an `alert()` for debugging purposes to show the data and it shows "undefined" as things are done below. Here's what I have so far. jQuery AJAX request: $(".edit").click(function(event) { var id = $(this).parents("tr").attr("id"); alert(id); …

Member Avatar for GliderPilot
0
12K
Member Avatar for newbie14

We have a php page inserting into mysql db. The problem all the tables in mysql we have been just using the default collation and character set as the latin1_swedish_ci. All have been working well where I can insert russian character and view it well. But I notice in the …

Member Avatar for diafol
0
397
Member Avatar for LastMitch

Hi, I want to know how did I came up with this error when I run my code: `Trying to get property of non-object in line 19.` What does it mean? I want to echo out `My favorite candy is M&M Peanuts.` But instead I echo out `My favorite candy …

Member Avatar for LastMitch
0
1K
Member Avatar for LastMitch

Hi I don't know how to do this. How can I delete a word from my array. $cheesecake = array("Apple Cheesecake", "Blueberry Cheesecake", "Strawberry Cheesecake", "Mango Cheesecake", "Raspberry Cheesecake"); I want to take out the `Blueberry Cheesecake` from the array. How do I do that? This is what I got …

Member Avatar for paulinetaylor85
0
254
Member Avatar for branding4you

Im stuck now it is day four, I have a bunch of clients that upload documents to the web server, the code works if I maually type the names of the documents into the array, but that is not what I want, Mysql has table called "transact" with a field …

Member Avatar for branding4you
0
774
Member Avatar for tapuwa2002

I would like to create a loop where it will count down and shift every thing to the right by one postion in the array. for example: array('1a','1b','1c','','','1f') should look like this array('1a','','','1b','1c','1f') Starting from position 5 and counting down.$i--

Member Avatar for diafol
0
185
Member Avatar for jamojo

Hello Everyone. Can you please advise how can I replace a string from this "[" to "]" this character and replace it with blank string? I believe I will use str_replace but I am having a hard time doing this. The quick brown fox jumped over [caption id="attachment_223" align="alignleft" width="900"] …

Member Avatar for jamojo
0
163
Member Avatar for Khav

Hello guys For my project i am tring to compare elements of an array with string.This could help at a certain extent to prevent pornographics uploads based on the filenames Here is my snippet $banned_file_names = array('bestiality','lolita','porn','xxx','incest','cock','teenporn'); $filen = preg_replace("/\\.[^.\\s]{3,4}$/", "", $file_name); if (in_array($filen,$banned_file_names) === true) { echo 'Adult image …

Member Avatar for Khav
0
236
Member Avatar for rainhider

This is the drop down list of security questions: [CODE] <form action="ddlprocess.php" method="post"> <select name="security1"> <option value="placeOfBirth">What city were you born in?</option> <option value="childhoodFriend">Who was your childhood best friend?</option> <option value="mothersMaiden">What is your mother's maiden name?</option> <option value="mothersMiddle">What is your mother's middle name?</option> <option value="fathersMiddle">What is your father's middle name?</option> …

Member Avatar for raithier
0
198
Member Avatar for vaultdweller123

hey guys... just wanna ask, is setting timezone on php automatically computes for daylight saving times? i mean does it autmatically detect DST and automaticaly add +1 hour on specific month? thanks in advance

Member Avatar for LastMitch
0
8K
Member Avatar for LastMitch

Hi, I'm having issue with understanding how this array works in `OOP`. I want to sort this from `ABC` or by `123`. I'm reading about it but I don't know how to run this code. I created the array but making it work is something new to me. //This is …

Member Avatar for LastMitch
0
422
Member Avatar for jvause3

I'm trying to use a drop down form box & select statements to gather certain pieces of information from my database however i'm recieving the error **Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /study/comp/c3329871/webpages/mysql/queryContinent.php on line 26** This is the code from my php file …

Member Avatar for LastMitch
0
304
Member Avatar for DarkSynopsis

I'm quite new to PHP and I'm looking to have a ID pulled from my Database to show a Image in a table and have it alternate in each column. Right now I have the following. <table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="white"> <tr bgcolor="#CCCCCC" align="center"> <td width="36%"><h4>Image</h4></td> </tr> <?php …

Member Avatar for LastMitch
0
1K
Member Avatar for paulmcdoodles

Hello, I am getting the following error message: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/mochas/domains/zoink.sx33.net/public_html/includes/blogpost.php on line 54 My code (Line 54): while($row = mysql_fetch_assoc($query))

Member Avatar for paulmcdoodles
0
181
Member Avatar for dayballer2285

Hello, I am using php to check if a URL is available using th if file exists function. [code] if(file_exists("http://www.domain.jsp")) { $lines = file('http://www.domain.jsp'); }else{ $lines= echo $variable } [/code] But it keeps giving me errors...is there an alternative to if file exists? Thanks

Member Avatar for sakkal
0
1K
Member Avatar for andyy121

<form action="index.php" method="post" enctype="multipart/form-data"> File: <input type="file" name="image"><input type="submit" value="Upload"> </form> <?php //connect to db mysql_connect("localhost","root","")or die(mysql_error()); mysql_select_db ("databaseimage")or die (mysql_error()); @$file =$_FILES['image']['tmp_name'];//kjo eshte e lidhur me <input type="file" name="image"> if (!isset($file)) echo ("Please select an image"); else { $image= addslashes(file_get_contents ($_FILES['image'] ['tmp_name'])); $image_name = addslashes($_FILES['image']['name']); $image_size = getimagesize ($_FILES['image'] …

Member Avatar for andyy121
0
214
Member Avatar for pawan768

Hi , I try form many days , but unable to do anything on this niche , Finally I come here to resolve my problem , please help me on that, Problem : I try to add a serach box which search from database and show top 5 result below …

Member Avatar for pawan768
0
98

The End.