-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Everything posted by ginerjm
-
Call to undefined method in included file
ginerjm replied to richarddunnebsc's topic in PHP Coding Help
Just noticed that you made a statement that wasn't true. I don't see where you instantiated $data in the logic class. You established it on the outer level of your script but you didn't pass it into the EmailVerify function call so that you could use it in there. Of course if there is more code that you could share with us you might want to show us so that we can help you. -
Call to undefined method in included file
ginerjm replied to richarddunnebsc's topic in PHP Coding Help
$data is not defined in the scope of your Logic class. Pass it in as an argument: public function EmailVerify($data) -
Call to undefined method in included file
ginerjm replied to richarddunnebsc's topic in PHP Coding Help
Yes - you need to include the module into the other module to reference it of course. But you are not referring to it correctly which is what php is telling you. Your mention of $data is a problem since you haven't shown us where it is defined and instantiated with your small sample of code. The proper use is: include_once 'data.php'; or require_once 'data.php'; -
Call to undefined method in included file
ginerjm replied to richarddunnebsc's topic in PHP Coding Help
Why the use of $data-> You are attempting to call a stand-alone function that is not part of any class, correct? So just say "Email()". -
Call to undefined method in included file
ginerjm replied to richarddunnebsc's topic in PHP Coding Help
This is a guess but when you reference "Logic::Email()" aren't you saying that Email() is a method of that class? It is simply a function in a different module which doesn't have to be referenced in that fashion. Try simply calling the function. PS - try using require instead of include. That way you get an error if it isn't found. PS#2 - you don't need the parens on the include or require statement. -
Good work! Although a lot of people here don't rely on 'checking' the button but I live by that and have never had an issue.
-
Is there a reason you have defined 2 forms? Why not one to include all of your 'data' in one process/one click?
-
Creating a quiz system with mysql and php (correction of code)
ginerjm replied to e-gab2's topic in PHP Coding Help
So have you searched for this $ques variable in your code? And is it being hit by your code or simply there without getting established? -
Creating a quiz system with mysql and php (correction of code)
ginerjm replied to e-gab2's topic in PHP Coding Help
Gizmola - you have way too much time on your hands. I do hope it is appreciated by the OP. -
Updating multi dropdown values to database in Codeigniter
ginerjm replied to KSI's topic in PHP Coding Help
So you have written all of this code. Good job. Where is this part you are asking about? The part that does the db updates? Most of is is quite complex so I assume that you are certainly capable of writing a simple db update process. -
Which image? Have you looked at your web page to see how the img tag looks?
-
What is wrong? Do you have an error to report?
-
how do i create a template page for multiple items
ginerjm replied to RaiN3772's topic in PHP Coding Help
I see that you have done something here. Don't know what is wrong with it so I guess you are happy. -
This seems beyond simple, but it's not working. Please help!
ginerjm replied to groston's topic in PHP Coding Help
You could use some quotes on those elements of EntityInfo. You don't have an if loop. You are simply testing a value of something and if it is true, outputting something. One time. And - I don't like the add of + 5 to dVal but you don't save it. So dVal is whatever it was in the table. If php is still new to you I would like to suggest that you stop using mixed case names. It is a case-sensitive language so if you get into the JS style of coding you are probably going to run into problems all down the road from mis-typing var names all the time. Stick with all lowercase. -
how do i create a template page for multiple items
ginerjm replied to RaiN3772's topic in PHP Coding Help
How about you take the div and form code and turn it into a php function. Run a query to get your data and then fetch it row by row and call the function, passing in the row data which will output a div/form for each record. If you don't need the form construct and just want to display the data, change it to an html table instead of a form and dump the div too. -
how do i create a template page for multiple items
ginerjm replied to RaiN3772's topic in PHP Coding Help
But he wants to see each item on one page as opposed to seeing one page with one item. I think anyway. That's why I suggested a table view. -
how do i create a template page for multiple items
ginerjm replied to RaiN3772's topic in PHP Coding Help
So you have a set of records and you want to show all of their data elements on one scrolling page? Why not an html table then? -
how do i create a template page for multiple items
ginerjm replied to RaiN3772's topic in PHP Coding Help
I have no idea what your vision is. -
how do i create a template page for multiple items
ginerjm replied to RaiN3772's topic in PHP Coding Help
Here's an example of the html you may need. Study it if you don't already know it. Look up what you don't know. <?php $code=<<<heredocs <!DOCTYPE html> <html> <head> <title>Untitled</title> <style type='text/css'> body { background-color:#c0c0c0; font-family:'Segoe UI','Trebuchet MS',Tahoma,Arial,Sans-serif; } #form_box { position:relative; float:left; width:50%; padding:15px; margin:1% 5%; border:1px solid blue; } .sz5 {width:5em;} .sz6 {width:5em;} .sz15 {width:12em;} .sz35 {width:30em;} </style> </head> <body> <div id='form_box'> <form method='POST' action='' autocomplete='off'> <label>Item id.: <input type='text' name='item_id' value="$item_id" class='sz5'> </label> <label>Name: <input type='text' name='item_name' value="$item_name" class='sz15'> </label> <br><br> <label>Desc.:<br> <textarea rows=4 cols=70 name='item_desc'>$item_desc</textarea> </label> <br><br> <label>Price.: <input type='text' name='item_price' value="$item_price" class='sz6'> </label> <center> <input type='submit' name='btn' value='Submit'> <center> </form> </div> </body> </html> heredocs; echo $code; exit(); -
how do i create a template page for multiple items
ginerjm replied to RaiN3772's topic in PHP Coding Help
Have you used your programming skills to attempt to build a web page? Even just the html portion? Something at all? -
OK - when I rearranged your code to read thru it I see this: require_once "db.php"; if(isset($_GET['image_id'])) { $sql = "SELECT imageType,imageData,comment FROM output_images WHERE imageId=" . $_GET['image_id']; $result = mysqli_query($conn, $sql) or die("<b>Error:</b> Problem on Retrieving Image BLOB<br/>" . mysqli_error($conn)); $row = mysqli_fetch_array($result); header("Content-type: " . $row["imageType"]); echo $row["imageData"]; echo $row["comment"]; } mysqli_close($conn); which looks like you are outputting the comment field. If you are not seeing anything perhaps it is not in the db. Have you taken a look at your table with phpmyadmin to see if it is actually there?