Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
Ranked #4K
~8K People Reached
Favorite Forums
Favorite Tags
Member Avatar for rhodoscoder

function otherfunction (arg){ console.log(arg); } function executeFunction(otherfunction){ } executeFunction(otherfunction( "hello") ); This seems redudant , suggestions??

Member Avatar for diafol
0
104
Member Avatar for rhodoscoder

What i'm i doing wrong? here is my code FUNCTIONS.PHP <?php function get_header(){ include 'header.php'; } function get_footer(){ include 'footer.php'; } HEADER.PHP <?php function set_title($title){ echo $title; } ?> <!DOCTYPE html> <html> <head> <title><?php set_title();?></title> <meta charset="UTF-8"> <meta name="description" content="Photography site" /> <meta name="keywords" content=" Angelic Photography" /> <!-- <link …

Member Avatar for rhodoscoder
0
203
Member Avatar for rhodoscoder

I'm trying to work with the codeigniter CMS BONFIRE.I've used codeigniter before, I actually have an installation of both pure codeigniter and bonfire on my local server.First off I've been having trouble with my .htacess files on my xammp server but that's a topic for another day.My Bonfire installation for …

Member Avatar for cereal
0
431
Member Avatar for rhodoscoder

I've worked with alot of jquery galleries before but this one won't work.I'm using Twitter bootstrap and I wonder if it's JS bootstrap files are interfering with the JS file for the Unslider jquery gallery -> [Unslider](http://unslider.com/) that I'm using. ` <!-- Bootstrap Core CSS --> <link href="css/bootstrap.min.css" rel="stylesheet"> <!-- …

Member Avatar for rhodoscoder
0
267
Member Avatar for iamthwee

Hi friends, I'm wondering what is the best way to go about validating my forms with both php and ajax. For example, I want to use the form_validation library but also jquery such that the page doesn't require a refresh or redirect. How best to do this what is best …

Member Avatar for iamthwee
0
4K
Member Avatar for rhodoscoder

//index.php $img_dir ="C:/xampp/folders/img/*.jpg"; $thumb_width = 100; // Open a known directory, and proceed to read its contents $scan= glob($img_dir); foreach($scan as $image) { $im= imagecreatefromjpeg($image); $img_width = imagesx($im); $img_height=imagesy($im); $thumb_height= floor ($img_height *($thumb_width/$img_width)); $new_img=imagecreatetruecolor($thumb_width,$thumb_height); imagecopyresized($new_img, $im, 0,0, 0, 0, $thumb_width, $thumb_height, $img_width, $img_height); $thumb_path = "C:/xampp/folders/thumbs/"; imagejpeg($new_img,$thumb_path); } The error …

Member Avatar for minitauros
0
237
Member Avatar for Sabyre

Greetings, I have a site that was created back when the dinosaours were around and of course there is a feedback form that wasn't secure and was generating spam via injections. I have implemented my typical measures; CAPTCHA, preg_match, trim, stripslashes, strip_tags, and even preg_replace. Still the spam continues. I …

Member Avatar for diafol
0
373
Member Avatar for mattyd

*I apologize if this has already been asked/answered* I am have trouble with this, although I imagine the solution is rather simple: 1. User completes form and submits 2. Page either reloads displaying User-entered data *or* redirects to a *new* page displaying said data for User I have been trying …

Member Avatar for mattyd
0
277
Member Avatar for rhodoscoder

var 1 = document.getElementById("1").click(); var 2 = document.getElementById("2").click(); var 3 = document.getElementById("3").click(); if(1){ userChoice =="1"; }else if (2){ userChoice == "2"; }else if (3){ userChoice == "3"; } I'm working on code that gets user choice when the user clicks on a div.I'm attempting to 'get' the element and assign …

Member Avatar for JorgeM
0
100
Member Avatar for mattster

Hi again, We all know jQuery can really spice up a website, so what would plugins could I try to make my pages even more exiting? (ie. typeahead.js) Thanks!

Member Avatar for rhodoscoder
0
117
Member Avatar for rhodoscoder

<?php // post_view.php require 'connection.php'; $id =$conn->lastInsertId('id'); $stmt = $conn->prepare('SELECT * FROM posts WHERE id = LAST_INSERT_ID(id) LIMIT 1'); $stmt->execute(array('id' => 'LAST_INSERT_ID(id)')); while($row = $stmt->fetchAll(PDO::FETCH_ASSOC)) { //$row is an array object? that has one array in index 0 print_r($row); echo '<h2>'.$row[':title'].'</h2>'; //echo '<em>Posted '.date('F j<\s\up>S</\s\up>, Y', $row['date']).'</em><br/>'; echo nl2br($row[':body']).'<br/>'; echo …

Member Avatar for LastMitch
0
127
Member Avatar for rhodoscoder

<?php function html_escape($input) { return htmlspecialchars($input, ENT_COMPAT | ENT_HTML401, 'utf-8'); } require 'connection.php'; if(!empty($_POST)) { $ustmt=$conn->prepare('UPDATE posts SET title = :title, body=:body, WHERE id = :id'); $lpstid = $_GET['id']; $ustmt->bindValue('title', $_POST['title']); $ustmt->bindValue('body',$_POST['body']); $update_stmt->bindValue('id' , $lpstid); $ustmt->execute(); while($row = $update_stmt->fetch()){ print_r($row); } if($ustmt) redirect('post_view.php?id='.html_escape($_GET['id'])); } $sstmt = $conn->prepare('SELECT (title,body) FROM posts …

Member Avatar for diafol
0
207
Member Avatar for rhodoscoder

i have a form that posts to a database and i was testing code that prevents any javascript or othe client-side scripting from being submitted to the database.All javascript code i submitted ended up in the database, i figure this is bad.How can i prevent this?

Member Avatar for cereal
0
217
Member Avatar for rhodoscoder

<?php // post_add.php if( isset ($_POST['title']) && ($_POST['body']) && !empty($_POST) ){ require 'connection.php'; $stmt = $conn->prepare('INSERT INTO posts (title,body) VALUES (:title, :body)'); $stmt->bindValue(':title', $_POST['title']); $stmt->bindValue(':body', $_POST['body']); $stmt->execute(); echo 'Entry posted. <a href="post_view.php?id='.$conn->lastInsertId().'">View</a>'; }else if(empty($_POST['title']) || empty($_POST['body']) ){ echo "no values entered"; } ?> As my code is , empty fields …

Member Avatar for Eagle.Avik
0
174
Member Avatar for Asif Naveed

hi i am new in the development field i want a little guide line about the WYSIWYG editor i have website and i want to integrate a wix html 5 type http://www.wix.com/ editor in it i try to edit the tinymce editor but i does not found it flexible as …

Member Avatar for diafol
0
320
Member Avatar for rhodoscoder

I found this code online and i want to understand it, i have read the php documentation but i have found out that the php programming community offers better explanations PHP Code: function mysql_safe_query($query) { $args = array_slice(func_get_args(),1); $args = array_map('mysql_safe_string',$args); return mysql_query(vsprintf($query,$args)); } I figure the function isn't a …

Member Avatar for rhodoscoder
0
209
Member Avatar for rhodoscoder

I'm trying to create a simple blog and for some reason , it doesnt retrieve the dummy content from the mysql database. here is my entire code <?php $db_host = "host"; // Place the username for the MySQL database here $db_username = "root"; // Place the password for the MySQL …

Member Avatar for tpunt
0
157
Member Avatar for rhodoscoder

I'm working on a php blog , i created a database and it has several fields, i performed an sql command retrieving the id , performed a $query then a mysqli_fetch_array on the $query i retrieved the id and stored it ina variable as follows `$pid=$row['id']; so that the link …

Member Avatar for JorgeM
0
179