39,320 Topics
| |
| -What, how, why? Any things I need to be specifically aware of? Only pros answer please... |
Hello. I created a simple registeration code for my form but I seem to get this error. Parse error: syntax error, unexpected T_IF on line 130. I tried to change everything, double check it. But still I get the same error. if ($_POST['loginbtn']){ $user = $_POST['user']; $password = $_POST['password']; } … | |
| I wanted to validate a string with preg_match but after a lot of struggle I just used if($str[0]!='x'.... but just out of curiosity I wonna know how to do this using preg_match I'm getting a string as an input- the 1st char in the string must be % the 2nd … |
i have got a very crazy! problem i am trying to erase an image from e web page iwrote this piece of code to show the image and the bullet for the uset to delete $dir2='../../random/images2/'; $files1 = scandir($dir2); foreach ($files1 as $value) { if ((substr($value, -3)==="jpg") or (substr($value, -3)==="JPG") … | |
Hello, I am trying to display various types of search results on a seperate page: Here is my PHP CODE for the form: --------------------------------------------------------------------------------------------------------------- <table width="75%" cellspacing="10" cellpadding="10"> <tr> <td width="22%" class="subtiwhite"><strong>Search by Name:</strong></td> <td width="74%"><form name="form1" method="get" action="searchname.php"> <input type="text" name="namelist" id="namelist"> <input type="submit" name="searchname" id="searchname" value="Submit"> </form></td> <td … | |
I can't seem to display the image.. Here is my code.. <?php $user='root'; $server='localhost'; $db='db_gamecube';//database name mysql_connect('localhost','root'); mysql_select_db($db); $pass=$_POST['password']; $uname=$_POST['uname']; $sql="select * from tb_register where username ='$uname' and password='$pass'"; $result= mysql_query ($sql) or die (mysql_error()); if(mysql_num_rows($result)==1) { session_start(); $_SESSION['guest']=$uname; echo "<form method ='post' action='login_edit.php'>"; $records=mysql_fetch_assoc($result); echo "<table border =10> <tr> … | |
Ok here is the code. ` mysql_query("UPDATE `special` SET `Counter` = `Counter` - 1"); $Counter = mysql_query("SELECT Counter FROM special where Id = 1"); if($Counter == 0) { echo "<meta http-equiv=\"refresh\" content=\"0;URL=winner.php\">"; mysql_query("UPDATE `special` SET `Counter` = `Counter` + 500"); } else { echo "<meta http-equiv=\"refresh\" content=\"0;URL=index.php\">"; } ?> im … | |
Hi, I tried to figure this out but i'm shooting in the dark :) What I want to do is compare two values, either value1 against value2 or if value2 is empty then value1 against value3. add to that, that I want to echo different images depending on the result. … | |
Hey guys, I want to make or download a script that would allow my users to creat social networks or blogs of their own. I have the social network ready, but i cant seem to get the main site up. I want someting that would give me the following features: … | |
Hi, Over the last few weeks I've been getting e-mails to my e-mail address, not spam, and the subject matter is blank. Usually, I avoid things like this, but being a tech for 15 yrs., my curiosity got the best of me, because I new these people.When I opened the … | |
how to register 2 letter domain? for example **co.nr** **co.cc** | |
Hi I have an array $months which holds the months of the year. I have a funcion echoArray($theArray) which contains a for loop to print out the months as month 1 is January, month 2 is February etc. I now have to create another function reverseArray which will output the … | |
Hello. I am trying to create a registeration system on my website using PHP and MySQL. BUt whenever I put <?php ?> tags and start coding and test it, I get this error Parse error: syntax error, unexpected T_STRING on line 39 Here is my code: <?php $form = "<form … | |
Im new to cakePHP and the whole table relations concept is very confusing! I have 2 tables, competencies and competenceRatings. competencies stores a list of names with ids. competencies ------------ id name And users can select various competencies from this table and rate them and their ratings are stored into … | |
Hello, I would like my customers to be able to add fields to a form, with differnt values, etc.. Basicly, i would like them to be able to add any type of fields and customize their forms; like google forms for instance. And of course, i need the databse to … | |
I have two problems... Here is code : <?php // Create connection to Oracle $conn = oci_connect("root", "admin", "//127.0.0.1/xe"); $query = 'select * from TEST_RESULTS'; $stid = oci_parse($conn, $query); $r = oci_execute($stid); print '</br>'; // Fetch each row in an associative array print '<b> MONITORING SRODOWISK TESTOWYCH </br>'; print '</br>'; … | |
Hi so i have a table created and it is to display the users age in column one, then in the second column half of the age and the last column is to display double the age. I know how to do this part, however the next part is to … | |
i have problem with my code, it didn't say any error but it wont receive a data from the textfield.. is there something wrong with my code? here is the code.. <?php include('config.php'); $email=$_REQUEST['email']; $sql ="SELECT * from employee where emp_work_email = '$email'"; $hasil=mysql_query($sql) or die("E-mail is invalid".mysql_error()); $data=mysql_fetch_array($hasil); $sql1 … | |
Hi again guys, I am getting information from a table that I would dearly love to format using my css styles in an external css sheet. Now I am calling the sheet in the header correctly, tested that to make sure. Here is the code I am using. This generates … | |
$u = mysql_real_escape_string($_POST["username"]); $p = sha1($_POST["passwd"]); $q = "SELECT * FROM profile WHERE email=`$u` AND passwd=`$p`"; $run = mysql_query($q); if(!$run){ echo mysql_error(); } this creates *Unknown column 'mymail@gmail.com' in 'where clause'* error. This code is from a tutorial and a piece of a submit-new-post php page. | |
This may already be out there in the forums, but I really don't know what to search for to find it. What I'm looking for is a way to have a dropdown filled with values, and have it select a value from the database and display it. For example. On … | |
I am building a contact form, and I made it out of html and css, but I can't apply php to it in order to make it functional... I wanted it to have the abilities to notify me if someone submits form, the ability to only apply valid information, and … | |
Hello everyone! I am a student and still a noob in PHP. Well, I'm trying to figure out what is the best method for a log in page system that provide the ability for an Administrator to log in using the same log in form for normal users but get … | |
Using a php funtion to display an array which contains the months of the year. The function echos month number 1 is January etc. However when I run the code it starts with month number 0 is January, month number 1 is February etc. Anyone know how to fix this? … | |
Does anyone have a example of a Purchase order form that allows multiple line items and pricing Thanks Charlie Crimmel [email]crimmelcp@suddenlink.net[/email] | |
hello, i was wondering if you could tell me what would you diffent/better on the following code. I am trying to become a better developer and i would like to learn what the best PHP pratice is. I remove the comments to make it a bit cleaner //THIS IS THE … | |
Hi, I've never used php or mysql but I need to I madee a site for a friends reptile pet shop. Now I need to make him an admin panel so he can update his availablity section his special offers section and most importantly he can add pictures to his … | |
Hie all, I'm developing a bulk sms website, there are users and resellers for the site. I want to map my to another ip through A record. Problem is how to identify the ip user / reseller ? Please help me. | |
Hi Every Body I have been working on a project Where user has to login and edit contents of his web The thing happening is every page is working fine and there is no error except only in one page & which is freaking me out.....when i hit submit button … | |
how do you get a php page to refresh or reload? start right from the top again? thanks in advance from sunny clearwater fl. |
The End.