Jump to content

rbragg

Members
  • Posts

    176
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rbragg's Achievements

Member

Member (2/5)

0

Reputation

  1. Thanks for your reply. I don't want to echo the form element for every value in $app. I would like to set the form element = to $app.
  2. Is it possible to set a form element value to an existing array? For example, I have an array called $app: <?php while (ocifetch($stmt1)) { $app = ociresult($stmt1, "FIELD"); # this is an array populated by a query results echo "<input type='checkbox' name='reminders[]' value='" . $app . "'>"; } ?> Ultimately, I would like the values in $app to be added to the reminders[] array. Is this possible or can someone divulge a way to do this? Thanks in advance.
  3. I should add, I want the file to be saved behind the scenes. I don't want to use the textfield that you browse to populate, etc.
  4. I have a php page that creates a PDF using strings and coordinates. My problem is that I need to write a php script that will temporarily save the created PDF remotely on the server that is hosting the scripts. I already have a script that will then insert the file into my database as a blob. So, I just need something in-between that will allow me to temporarily save the file that I have created so that I can use my insertion script. I'd like for this new script to also delete the file after my insertion. Does someone know how to do this or at least can point me in the right direction so that I know what phrase to use to research in Google? Thanks!
  5. Good afternoon! I am trying to retrieve a blob from my db like this: <?php $queryGetBlob = "SELECT contract_file FROM schema.TABLE WHERE contract_num = 23"; $getBlobResult = ociparse($connect, $queryGetBlob); ociexecute($getBlobResult); while($arrayBlob = ocifetch($getBlobResult)) { echo $arrayBlob['CONTRACT_FILE']->load(); } ocifreestatement($getBlobResult); ?> I get these errors: PHP Warning: Cannot use a scalar value as an array and PHP Fatal error: Call to a member function on a non-object I realize that the first error is stating that $arrayBlob is not an array but I'm not sure why it isn't. This is my first time trying to fetch a blob. Can someone lend a hand? Thanks.
  6. LOL! Yes. This type of query works in other places in the environment so I thought it could be asked as a general question.
  7. <?php $queryInsertParent4Student = " INSERT into schema.STUDENT (parent_num) SELECT parent_num FROM schema.PARENT WHERE email = '" . $_SESSION['pMail'] . "'"; ?> Why does the above give me this error: ORA-01400: cannot insert NULL ... when the session is tested and set AND there IS a parent_num for this email in the db? ??? I think I'm just being dumb here. Thanks.
  8. Nevermind. I needed to remove the comma from the last case.
  9. I get the ORA-00936: missing expression error here: SELECT COUNT(call_num) AS CALL, COUNT(CASE WHEN status_num = 1 THEN status_num END) AS CLOSED, COUNT(CASE WHEN status_num = 2 THEN status_num END) AS OPEN, COUNT(CASE WHEN status_num = 3 THEN status_num END) AS JACK, COUNT(CASE WHEN status_num = 4 THEN status_num END) AS TECHFOLLOWUP, COUNT(CASE WHEN status_num = 5 THEN status_num END) AS RESNETFOLLOWUP, COUNT(CASE WHEN status_num = 6 THEN status_num END) AS HOT, COUNT(CASE WHEN status_num = 7 THEN status_num END) AS PROGRESS, COUNT(CASE WHEN status_num = 8 THEN status_num END) AS APPT, COUNT(CASE WHEN status_num = 9 THEN status_num END) AS STUDENT, COUNT(CASE WHEN status_num = 10 THEN status_num END) AS THIRD, FROM schema.table; Can anyone see where the problem is?? Thanks in advance!
  10. I'm getting the PHP Notice: Undefined offset: error. I am developing a pdf and the problem arises when I wordwrap(). You have to tell the pdf to wrap because new lines are not automatically created, nor are they able to be created with (concatenated) html. The offset number will ALWAYS be the last line. Here is my script: <?php $display = pdf_findfont($pdf, "Courier", "host", 0); pdf_setfont($pdf, $threeC, ; pdf_show_xy($pdf, " ", 40, 694); $stringWrapped = wordwrap($string, 115, "|"); $array = explode("|", $stringWrapped); $i = 0; while ($array[$i] != "") { pdf_continue_text($pdf, $array[$i]); $i++; } ?> So, if this script counts 4 lines, I will get: PHP Notice: Undefined offset: 4. How can I keep from getting this error other than turning them off on the server? Thanks.
  11. rbragg

    SESSION

    Each form element will need to be stored in its own session. As thorpe showed you, the POST variables should be converted to sessions. As far as checkboxes, you will need to be familiar with arrays because a checkbox group will be stored in one session. I have no idea about this one. <?php $query = " INSERT into table(field1, field2) VALUES ('" . $_SESSION['element1'] . "', '" . $_SESSION['element2'] . "')"; ?> I'm not a mod or anything here but I hope this gets you going in the right direction.
  12. In the following query, why would RECORD_COUNT still give me a null value instead of 0 if the db was empty? <?php $queryContract = " SELECT action_num, status, NVL(COUNT(*),0) AS RECORD_COUNT FROM schema.HEC_ACTION WHERE schema.HEC_ACTION.contract_num = '" . $_SESSION['contract'] . "' AND schema.HEC_ACTION.step_num = '" . $thisStep . "' GROUP BY action_num, status ORDER BY action_num, status"; ?>
  13. I have: <?php $hallRoomSpace = ociresult($parsedQuery,"SPACE"); preg_match_all('/(?<=\d)[a-z]+(?=(?:\r?\n)|\z)/i', $hallRoomSpace, $matches); print_r($matches); echo implode('', $matches[0]); ?> This echoes: Array ( [0] => Array ( ) )
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.