Search found 50 matches

by iam4423
Wed Dec 11, 2013 8:36 am
Forum: mySQL & php coding
Topic: Error in sql syntax
Replies: 0
Views: 663

Re: Error in sql syntax

your problem is that you are double quoting the values in the query and in the check_input() function either change your query to INSERT INTO spikes (type, brand, gender, size, hand, new, price, description, imgname, date, name, userid, phone) VALUES($type, $brand, $gender, $size, $hand, $isNew, $pr...
by iam4423
Thu Nov 21, 2013 3:45 am
Forum: PHP General
Topic: PHP/FI 1.0
Replies: 0
Views: 476

PHP/FI 1.0

I'm looking for a version of the original CGI scripts written in c that ran PHP v1 back when PHP still stood for Personal Home Page. Well if at all possible id like to get my hands on a copy of the original pearl scripts but i know that's even less likely. I was just wondering if anyone still has a ...
by iam4423
Thu Mar 07, 2013 6:14 am
Forum: PHP coding => General
Topic: A link that not exists
Replies: 1
Views: 953

Re: A link that not exists

im a little unclear on what you are asking here but if i have it right then the folder that the anchor tag is targeting doesn't actually exist but on the website you get a page to load at that address. my best guess would be that the live version of the wibsite is using a .htaccess rewriteRule to di...
by iam4423
Wed Jan 02, 2013 6:26 am
Forum: PHP coding => General
Topic: Warning Error - urgent
Replies: 0
Views: 1723

Re: Warning Error - urgent

is it just the warning messages that are the problem? if the site is working correctly despite the warnings you could simply suppass the warning by changing session_start() to @session_start(). the @ symbol stops warnings from being displayed its not exactly good practice but if you want a quick fix...
by iam4423
Wed Oct 17, 2012 7:12 am
Forum: mySQL & php coding
Topic: SQL ranking users with row limit
Replies: 0
Views: 492

SQL ranking users with row limit

i have this query SELECT x.Id, ( SELECT COUNT( points ) +1 FROM usr WHERE points > x.points ) AS rank FROM usr AS x which returns the correct data from the database and i can add in a where claws to limit the results like so SELECT x.Id, ( SELECT COUNT( points ) +1 FROM usr WHERE points > x.points )...
by iam4423
Sun Sep 02, 2012 8:03 am
Forum: PHP General
Topic: simple MVC tutorial?
Replies: 2
Views: 525

simple MVC tutorial?

Im looking into creating my own MVC framework and to be perfectly honest its a little above my skill level but thats not gonna stop me! i was just wondering if anyone had used or come accross a good simple tutorial for making one that i can follow and then add on to as i need? all im looking for is ...
by iam4423
Sat Aug 18, 2012 12:24 pm
Forum: mySQL & php coding
Topic: add fake colum to query string
Replies: 2
Views: 777

Re: add fake colum to query string

hmmm that's a lot more simple that i was expecting, it works perfectly.

Thanks a lot this has been doing my head in.
by iam4423
Sat Aug 18, 2012 8:05 am
Forum: mySQL & php coding
Topic: add fake colum to query string
Replies: 2
Views: 777

add fake colum to query string

Okay so im not actually sure f this is possible but i see no reason why it wouldnt be. Basically what im trying to do is create a site wide search function for my cms because i want to be able to sort the data received from multiple tables i have been using a UNION query //=====================defin...
by iam4423
Tue Jul 31, 2012 8:54 am
Forum: mySQL & php coding
Topic: unable to login in php mysql
Replies: 2
Views: 699

Re: unable to login in php mysql

i dont think it will be causing your problem but you dont need mysql_query($sql,$con) mysql_query($sql) will get the job done! there are a few things i would try to resolve this issue firstly put your table and field names inside ` ` $sql="SELECT * FROM `user` WHERE `LoginName`='$myusername' AND `Pa...
by iam4423
Tue Jul 31, 2012 8:43 am
Forum: PHP coding => General
Topic: Mp3 uploaded
Replies: 0
Views: 263

Re: Mp3 uploaded

what are you wanting to add this into? do you have a pre-existing cms because if you are using someone else's system there may be a plugin that allows it. if not are to be honest even if you are you could just use a file upload script to upload the mp3's into one centeral directory and then add the ...
by iam4423
Mon Jul 30, 2012 4:14 am
Forum: PHP General
Topic: Best way to learn PHP?
Replies: 2
Views: 558

Re: Best way to learn PHP?

learn by doing, id reccoment w3schools.com and if you can afford it get php/mysql the missing manual
by iam4423
Mon Jul 30, 2012 4:13 am
Forum: PHP coding => General
Topic: Multiple form actions/header("Location:") server side...
Replies: 0
Views: 249

Re: Multiple form actions/header("Location:") server side...

have you got an example script?

you might be better off using js to do this and just use php to pass that data along to the js.
by iam4423
Mon Jul 30, 2012 4:07 am
Forum: PHP coding => General
Topic: Echo variable in text box
Replies: 2
Views: 364

Re: Echo variable in text box

Code: Select all

echo "<b>";?> <input name="tupdate" type="text" id="tupdate" value="<?php $title ?>" /> 
thod id do

Code: Select all

<?php echo "<b>". <input name=\"tupdate\" type=\"text\" id=\"tupdate\" value=\"".$title."\" />"; ?>
its juyst preference
by iam4423
Mon Jul 30, 2012 4:02 am
Forum: JavaScript
Topic: How to pass '#' in url
Replies: 4
Views: 1232

Re: How to pass '#' in url

id forgetten to give this a try, did you manage to get it working or did you have to remove the # from your url's?
by iam4423
Thu Jul 26, 2012 2:47 pm
Forum: JavaScript
Topic: How to pass '#' in url
Replies: 4
Views: 1232

Re: How to pass '#' in url

The problem is that the # character defines an anchor, for example if you were to skip to a specific section on a webpage! I'm not too sure as I have never tried to pass a # as part of a get but there are two ways in which you might be able to do this: firstly and most likely would be to pass the HT...
by iam4423
Wed Jul 25, 2012 10:19 am
Forum: JavaScript
Topic: AJAX reload div (not from separate file)
Replies: 1
Views: 897

AJAX reload div (not from separate file)

Okay so im not too sure if this is possible, for that matter i dont think it will be possible but i though i might as well ask before i work round it. Here is an example of the kind of thing im looking at <body> <?php require("comments_lib.php"); $comment_class= new Comments('Some','Data','Passed')?...
by iam4423
Thu Jul 19, 2012 9:49 am
Forum: JavaScript
Topic: input value into js variable
Replies: 1
Views: 715

Re: input value into js variable

Okay, im an idiot the issue was that i was defining the variable outside of the function so it was grabbing the value on page load not when i ran the function
by iam4423
Thu Jul 19, 2012 9:07 am
Forum: PHP General
Topic: new line problem
Replies: 6
Views: 1365

Re: new line problem

no problem, glad i could belp but i am not 224 ¬¬
by iam4423
Thu Jul 19, 2012 9:05 am
Forum: JavaScript
Topic: input value into js variable
Replies: 1
Views: 715

input value into js variable

Hi, im trying to put the value of a hidden form field into a JavaScript variable but when i try to display the variable i just get NaN. Heres what ive got: function addElement(){ var count = document.getElementById("count").value; ++count; var AdEl = document.createElement('div'); AdEl.innerHTML = "...
by iam4423
Tue Jul 10, 2012 12:56 pm
Forum: PHP General
Topic: new line problem
Replies: 6
Views: 1365

Re: new line problem

from what i can tell you need to change

Code: Select all

$str.=$line;
to

Code: Select all

$str.=$line."\n";
by iam4423
Tue Jul 10, 2012 6:28 am
Forum: PHP General
Topic: styled code box
Replies: 0
Views: 359

styled code box

im wanting to add a styled code box to my website as found in this post http://www.php-forum.com/phpforum/viewtopic.php?t=17824#p4392804 the code box i have at the moment puts the code into all one color but id like one that defines syntax and colors it accordingly. an help would be appreciated than...
by iam4423
Wed Apr 25, 2012 5:59 am
Forum: PHP & MySQL Security
Topic: parametrized sql?
Replies: 8
Views: 3069

Re: parametrized sql?

I've got it sorted and I'll whatever the code as soon. As my internet comes back online! (Been doing research on my mobile all day! I don't recommended it XD Edit if anyone is interested here's how i got it working $pdo = new PDO('mysql:host=localhost;dbname=forum','user','password'); //sets $pdo as...
by iam4423
Wed Apr 25, 2012 1:22 am
Forum: PHP & MySQL Security
Topic: parametrized sql?
Replies: 8
Views: 3069

Re: parametrized sql?

hmmm luckily i have the day off so i can spend it doing research! at least yiuve given me a good place to start from, if i get it sorted ill let you know

cheers
by iam4423
Tue Apr 24, 2012 2:43 pm
Forum: PHP & MySQL Security
Topic: parametrized sql?
Replies: 8
Views: 3069

Re: parametrized sql?

how do i check the value types in query? i just dont understand how the array gets put into the query? php $db = new Dbase_(); $arg = array("thread" => $thread, "user" => $userid, "body" => $body); $qry = "INSERT INTO table (Thread_ID, User_ID, Post_Content) VALUES (:thread, :user, :body)"; $db->Que...