Using php to validate an html form and navigate appropriately
Hi all, Right now I have a "log in" page that displays a simple form. This form has two text boxes for input ("user name" and "password"), as well as a "submit" button. My desired functionality is...
View Articlecopy 2 data fields from every row to a new table
I am trying to copy two pieces of info from a table into a new table. I know if I wanted to do one piece of data it would look like this: $getemaipips = "SELECT emailaddress FROM...
View Articleis_numeric if one of the inputs isn't numeric then echo message!
hello guys just a quick question i have made a html form with php embedded. here is php code: how could i change the code if 1 of the inputs is'nt numeric then it would echo a message saying "insert...
View Articlephp code to make a table into the database
<?php include("../../connect.php"); $burger=$row['event_name']; $query=mysql_query("CREATE TABLE $burger (id int(10) AUTO_INCREMENT,event_id char(50), name char(100))")or die (mysql_error());...
View ArticleCall Function
Hello, how can i add a function call within this php script to echo the result as either "the bot is" or "no bots found" im not sure on how to code it and make use of this script? Thanks <?php...
View ArticlePrinting funny symbols
I would like to know why the following $myString = “Here’s a little string”; // Displays “Here-s+a+little+string” echo strtr( $myString, “ ‘”, “+-” ) . “ < br/ > ”; is printing this...
View ArticlePHP and WORDPRESS
Hello, Is there any way to -remotely- insert a post to a custom wordpress URL? Assuming I have a network of 5 websites and i would like to update all of them through some form i'll build (may say - a...
View Articlesimple html dom
i am trying to extract all the anchor texts that have the _blank attribute but for some reason it won't work as i expected (shows a blank screen) - <?php require('simple_html_dom.php');...
View ArticleProblem with 'LIKE' operator
This is a function that searches an address DB, compares the $name with 'LIKE' and returns the address details. If no address is found, I want to go to another function. In my form, if I leave $name...
View ArticleDifferent Pages For Different Users
I'm currently working on restricting access to pages for users who are logged into my site. However, I keen getting the wrong result. I have two senarios: Logged in users must see the logged in...
View ArticleCopy old tables
I got a new pc. Copy my whole wamp server directory to an external. I have installed wamp on my new pc. When i copied the old data to the new pc directory no tables are showing, only the database name....
View ArticleCodeigniter Calendar - Populating
Hi I am wanting to use codeigniter to build a calendar however to populate the calendar you need to provide the day numbers how can i do this with a database design like so id - int (10) check_in -...
View ArticleUpgraded to PHP 5.3 3 and now an error occurs in one bit of code
Hi I do hope someone can help. I recently upgraded to version 5.3 3 and since the upgrade I have 1 bit of code that causes the error message below Warning: substr() expects parameter 2 to be long,...
View ArticleCodeigniter Active Record
This is my code $this->db->select("b.id, p.name, CONCAT_WS(' ', u.first_name, u.last_name ) AS full_name, DATE_FORMAT(b.check_in, '%d %b %Y') AS ck_in, DATE_FORMAT(b.check_out, '%d, %b %Y') AS...
View ArticleArray to json is giving me trouble, help please...
Hello, I have an array with this structure: array (size=2) 0 => array (size=2) 'name' => string 'MR A' (length=4) 'location' => string 'A LAND' (length=6) 1 => array (size=2) 'name' =>...
View Articlephp calendar
There is sth wrong with my code. I am trying to program simple table that will display the days of the month. The internet explorer keeps on loading the page but without any output... Thanks in...
View Articlesubstr function
Hi im trying to use the substr function in php. I have a string called $finalString and im trying to grab the last character of that string the line of code im using is : $startIndex =...
View ArticlePHP Dynamic Cache
Hey Guys, So Currently i have a website that was my first web development project ( learning how to program and web design ). That now has generated a good amount of traffic and users, and although i...
View ArticleHelp me reverse the behavior of this current php code
I am modifying someone else's code to do this website and I am not sure how to do this correctly in html5 and php. This is how it currently is....
View Article2 forms on 1 page, processed on the same page
Hi guys, It's been a while since I coded in PHP (some 10 years or so). Now I need a web application and thought, I resource to my old talents but I think, I failed miserably :-) Here's the problem:...
View Article